Dan White
2011-Oct-18 20:21 UTC
[Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
Are there any exapmples out there that show an intelligent way to do this ? My searches are not turning up anything useful “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Russell Van Tassell
2011-Oct-18 20:23 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
It might be helpful to include the O/S you''re asking about, possibly with the package... sometimes it''s a matter of just changing/adding a respository. Sometimes it might be a little more involved. On Tue, Oct 18, 2011 at 1:21 PM, Dan White <ygor@comcast.net> wrote:> Are there any exapmples out there that show an intelligent way to do this ? > > My searches are not turning up anything useful > > “Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Christopher Wood
2011-Oct-18 20:40 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
On Tue, Oct 18, 2011 at 08:21:34PM +0000, Dan White wrote:> Are there any exapmples out there that show an intelligent way to do this ?http://docs.puppetlabs.com/references/stable/type.html#service That makes it sound like as long as you have the right init script (or platform-specific variant thereof) installed, puppet will do the right thing.> My searches are not turning up anything useful > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nathan Clemons
2011-Oct-18 20:47 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
The one thing that I''ll mention is that you want to use "hasstatus => true" whenever possible, I''ve found, at least on older versions of Puppet (0.25.x). Sometimes the logic it tries to use otherwise doesn''t quite work, but using the "/etc/init.d/<servicename> status" check seems to work fine. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Tue, Oct 18, 2011 at 1:40 PM, Christopher Wood < christopher_wood@pobox.com> wrote:> On Tue, Oct 18, 2011 at 08:21:34PM +0000, Dan White wrote: > > Are there any exapmples out there that show an intelligent way to do this > ? > > http://docs.puppetlabs.com/references/stable/type.html#service > > That makes it sound like as long as you have the right init script (or > platform-specific variant thereof) installed, puppet will do the right > thing. > > > My searches are not turning up anything useful > > > > “Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us.” > > Bill Waterson (Calvin & Hobbes) > > > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan White
2011-Oct-18 20:54 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
Yes, I agree. If it were something as simple as pulling in a binary to the right location and setting up a script in /etc/init.d to let services/xinitd run it. But I am looking for something that might pull in a tar-ball, unroll it, compile it (maybe) and set up the appripriate stuff. I can (and will) try tinkering up something, but a working example would be very nice. ----- Christopher Wood <christopher_wood@pobox.com> wrote:> On Tue, Oct 18, 2011 at 08:21:34PM +0000, Dan White wrote: > > Are there any exapmples out there that show an intelligent way to do this ? > > http://docs.puppetlabs.com/references/stable/type.html#service > > That makes it sound like as long as you have the right init script (or platform-specific variant thereof) installed, puppet will do the right thing. > > > My searches are not turning up anything useful“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan White
2011-Oct-18 20:56 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
RHEL 5, and the packages in question come as tar-balls that have to be unrolled into place and then compiled/configured. Not your simple "yum install...", sad to say. ----- Russell Van Tassell <russellvt@gmail.com> wrote:> It might be helpful to include the O/S you''re asking about, possibly with > the package... sometimes it''s a matter of just changing/adding a > respository. Sometimes it might be a little more involved. > > > On Tue, Oct 18, 2011 at 1:21 PM, Dan White <ygor@comcast.net> wrote: > > > Are there any exapmples out there that show an intelligent way to do this ? > > > > My searches are not turning up anything useful > >“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan White
2011-Oct-18 20:59 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
I''m on puppet 2.6.something, and I fully plan to use the "/etc/init.d/<servicename>" mechanism to define my service. Is there any other (correct) way to do it ? I''m just looking for an automated way to install it with puppet. ----- Nathan Clemons <nathan@livemocha.com> wrote:> The one thing that I''ll mention is that you want to use "hasstatus => true" > whenever possible, I''ve found, at least on older versions of Puppet > (0.25.x). Sometimes the logic it tries to use otherwise doesn''t quite work, > but using the "/etc/init.d/<servicename> status" check seems to work fine. > > -- > Nathan Clemons > http://www.livemocha.com > The worlds largest online language learning community > > > > On Tue, Oct 18, 2011 at 1:40 PM, Christopher Wood < > christopher_wood@pobox.com> wrote: > > > On Tue, Oct 18, 2011 at 08:21:34PM +0000, Dan White wrote: > > > Are there any exapmples out there that show an intelligent way to do this > > ? > > > > http://docs.puppetlabs.com/references/stable/type.html#service > > > > That makes it sound like as long as you have the right init script (or > > platform-specific variant thereof) installed, puppet will do the right > > thing. > > > > > My searches are not turning up anything useful > > >“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Christopher Wood
2011-Oct-18 21:04 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
On Tue, Oct 18, 2011 at 08:54:22PM +0000, Dan White wrote:> Yes, I agree. If it were something as simple as pulling in a binary to the right location and setting up a script in /etc/init.d to let services/xinitd run it. > > But I am looking for something that might pull in a tar-ball, unroll it, compile it (maybe) and set up the appripriate stuff. > > I can (and will) try tinkering up something, but a working example would be very nice.I can''t paste in my work stuff, but the basic flow (with appropriate dependencies, and keeping in mind that this is expected to work once only) is: file resource to emplace a tarball exec resource to untar the tarball exec depends on the file to untar exec happens "before" the service exec uses "creates" to ensure it isn''t run twice exec runs your customized non-rpm''y install procedure install procedure should install the init script or variant thereof service resource ensures your service is started I have additional steps instead of that last line: file resource emplaces a monit config fragment exec resource "bumps" monit to re-read its config ("monit reload") Then monit starts the service on its next check run and monitors the service. However, writing all that, it sounds like you might be better off creating RPMs on a staging machine and running your own internal yum repository. It''s far easier to upgrade an RPM than something like the above.> ----- Christopher Wood <christopher_wood@pobox.com> wrote: > > On Tue, Oct 18, 2011 at 08:21:34PM +0000, Dan White wrote: > > > Are there any exapmples out there that show an intelligent way to do this ? > > > > http://docs.puppetlabs.com/references/stable/type.html#service > > > > That makes it sound like as long as you have the right init script (or platform-specific variant thereof) installed, puppet will do the right thing. > > > > > My searches are not turning up anything useful > > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Craig White
2011-Oct-18 21:10 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
I''ve always thought that if you wanted, consistent, repeatable methodology for install/remove/upgrade that the native packaging is always the way to go and rpm-build does exactly that with tarballs. I don''t think Puppet is the way to drop tarballs && config && make && make install because so many things will break along the way. Craig On Oct 18, 2011, at 1:56 PM, Dan White wrote:> RHEL 5, and the packages in question come as tar-balls that have to be unrolled into place and then compiled/configured. Not your simple "yum install...", sad to say. > > ----- Russell Van Tassell <russellvt@gmail.com> wrote: >> It might be helpful to include the O/S you''re asking about, possibly with >> the package... sometimes it''s a matter of just changing/adding a >> respository. Sometimes it might be a little more involved. >> >> >> On Tue, Oct 18, 2011 at 1:21 PM, Dan White <ygor@comcast.net> wrote: >> >>> Are there any exapmples out there that show an intelligent way to do this ? >>> >>> My searches are not turning up anything useful >>> > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Scott Smith
2011-Oct-18 21:30 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
Use fpm. On Tue, Oct 18, 2011 at 1:21 PM, Dan White <ygor@comcast.net> wrote:> Are there any exapmples out there that show an intelligent way to do this ? > > My searches are not turning up anything useful > > “Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan White
2011-Oct-19 01:11 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
Thanks for the opinion. I understand your concern, but I have a need to do exactly that. Making a long story short, RPM''s do not work for this need unless you consider a relocatable package <http://www.rpm.org/max-rpm/s1-rpm-reloc-building-relocatable.html> and I have seen some serious objections to this particular rpm-extension. I need to install multiple instances of a service, some are as simple as "drop tarball, unroll, run a config script", but at least one needs instance-specific parameters compiled into it. I want to automate it. If not puppet, I am open to suggestion, but I have a Cobbler/Puppet combo running very nicely (so far) on RHEL5 boxes, and any alternative needs to "play nice" with that environment. On Oct 18, 2011, at 5:10 PM, Craig White wrote:> I''ve always thought that if you wanted, consistent, repeatable methodology for install/remove/upgrade that the native packaging is always the way to go and does exactly that with tarballs. > > I don''t think Puppet is the way to drop tarballs && config && make && make install because so many things will break along the way. > > Craig > > On Oct 18, 2011, at 1:56 PM, Dan White wrote: > >> RHEL 5, and the packages in question come as tar-balls that have to be unrolled into place and then compiled/configured. Not your simple "yum install...", sad to say. >> >> ----- Russell Van Tassell <russellvt@gmail.com> wrote: >>> It might be helpful to include the O/S you''re asking about, possibly with >>> the package... sometimes it''s a matter of just changing/adding a >>> respository. Sometimes it might be a little more involved. >>> >>> >>> On Tue, Oct 18, 2011 at 1:21 PM, Dan White <ygor@comcast.net> wrote: >>> >>>> Are there any exapmples out there that show an intelligent way to do this ? >>>> >>>> My searches are not turning up anything useful >>>> >> >> “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” >> Bill Waterson (Calvin & Hobbes) >> >> -- >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >> > > -- > Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com > 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com > > Need help communicating between generations at work to achieve your desired success? Let us help! > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nathan Clemons
2011-Oct-19 01:16 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
If it''s a straightforward compilation, you should be able to do this with a set of chained execs. For instance, a file resource to push the tarball, then an exec to extract it (which depends on the tarball), an exec to configure it (which depends on the previous exec), and an exec to install it (which depends on the configuration exec), and a service (which depends on the install exec). Using names for the exec steps (rather than just the command as the name, use a custom name and specify the command parameter), you should be able to overwrite the configuration exec in a sub-class appropriately. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Tue, Oct 18, 2011 at 6:11 PM, Dan White <ygor@comcast.net> wrote:> Thanks for the opinion. > I understand your concern, but I have a need to do exactly that. > > Making a long story short, RPM''s do not work for this need unless you > consider a relocatable package > <http://www.rpm.org/max-rpm/s1-rpm-reloc-building-relocatable.html> > and I have seen some serious objections to this particular rpm-extension. > > I need to install multiple instances of a service, some are as simple as > "drop tarball, unroll, run a config script", but at least one needs > instance-specific parameters compiled into it. > > I want to automate it. If not puppet, I am open to suggestion, but I have > a Cobbler/Puppet combo running very nicely (so far) on RHEL5 boxes, and any > alternative needs to "play nice" with that environment. > > On Oct 18, 2011, at 5:10 PM, Craig White wrote: > > > I''ve always thought that if you wanted, consistent, repeatable > methodology for install/remove/upgrade that the native packaging is always > the way to go and does exactly that with tarballs. > > > > I don''t think Puppet is the way to drop tarballs && config && make && > make install because so many things will break along the way. > > > > Craig > > > > On Oct 18, 2011, at 1:56 PM, Dan White wrote: > > > >> RHEL 5, and the packages in question come as tar-balls that have to be > unrolled into place and then compiled/configured. Not your simple "yum > install...", sad to say. > >> > >> ----- Russell Van Tassell <russellvt@gmail.com> wrote: > >>> It might be helpful to include the O/S you''re asking about, possibly > with > >>> the package... sometimes it''s a matter of just changing/adding a > >>> respository. Sometimes it might be a little more involved. > >>> > >>> > >>> On Tue, Oct 18, 2011 at 1:21 PM, Dan White <ygor@comcast.net> wrote: > >>> > >>>> Are there any exapmples out there that show an intelligent way to do > this ? > >>>> > >>>> My searches are not turning up anything useful > >>>> > >> > >> “Sometimes I think the surest sign that intelligent life exists > elsewhere in the universe is that none of it has tried to contact us.” > >> Bill Waterson (Calvin & Hobbes) > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > >> To post to this group, send email to puppet-users@googlegroups.com. > >> To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > >> For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >> > > > > -- > > Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > craig.white@ttiltd.com > > 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > www.ttiassessments.com > > > > Need help communicating between generations at work to achieve your > desired success? Let us help! > > > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Doug Warner
2011-Oct-19 13:31 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
Creating your own init script if one is not provided is definitely the best approach; but failing that, you can still use the "service" resource as a glorified exec; I''ve done this w/ my arpwatch daemon on redhat boxes since it''s otherwise difficult to run multiple arpwatch daemons: ## # maintains an arpwatch daemon for a specified interface # # $name: name of interface to monitor # define arpwatch::interface { $interface = $name service { "arpwatch.${interface}": provider => "base", ensure => running, start => "/usr/sbin/arpwatch -i ${interface} -u arpwatch -e root -s ''root (Arpwat ch)''", stop => "/usr/bin/pkill -f arpwatch.*${interface}", status => "/usr/bin/pgrep -f arpwatch.*${interface}", require => Class["arpwatch"], } } -Doug On 10/18/2011 04:21 PM, Dan White wrote:> Are there any exapmples out there that show an intelligent way to do this ? > > My searches are not turning up anything useful
Doug Warner
2011-Oct-19 14:09 UTC
Re: [Puppet Users] How-To Question: Installing a "service" that does not come in an RPM ?
Back on-list: Looks like you''re developing for a Red Hat-based distro; I know the rpmdevtools package in Fedora contains /etc/rpmdevtools/template.init file that is a great start. Also check out the related wiki page: http://fedoraproject.org/wiki/FCNewInit/Initscripts -Doug On 10/19/2011 10:04 AM, Dan White wrote:> That looks interesting, but I think I would prefer to make a script to put into /etc/init.d so that I can use "service foo start|stop" and chkconfig > > Any examples/recipes like that available ? > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > ----- Doug Warner <doug@warner.fm> wrote: >> Creating your own init script if one is not provided is definitely the best >> approach; but failing that, you can still use the "service" resource as a >> glorified exec; I''ve done this w/ my arpwatch daemon on redhat boxes since >> it''s otherwise difficult to run multiple arpwatch daemons: >> >> ## >> # maintains an arpwatch daemon for a specified interface >> # >> # $name: name of interface to monitor >> # >> define arpwatch::interface { >> $interface = $name >> >> service { "arpwatch.${interface}": >> provider => "base", >> ensure => running, >> start => "/usr/sbin/arpwatch -i ${interface} -u arpwatch -e root -s ''root >> (Arpwat >> ch)''", >> stop => "/usr/bin/pkill -f arpwatch.*${interface}", >> status => "/usr/bin/pgrep -f arpwatch.*${interface}", >> require => Class["arpwatch"], >> } >> } >> >> -Doug >> >> On 10/18/2011 04:21 PM, Dan White wrote: >>> Are there any exapmples out there that show an intelligent way to do this ? >>> >>> My searches are not turning up anything useful >> >
Matt
2011-Oct-19 17:28 UTC
[Puppet Users] Re: How-To Question: Installing a "service" that does not come in an RPM ?
RPM itself does not mean that there is a service. A service is an init script that is placed in /etc/init.d and the appropriate installation commands used. You could create an init script and then execute chkconfig --add <initscript filename> that will add it. You need a header in the init script that is parsed by chkconfig, which the link below should give you some help. http://www.cyberciti.biz/tips/linux-write-sys-v-init-script-to-start-stop-service.html The other thing is puppet service resource type does not require that you have an init script configured like above. One of the caveats is that if you dont configure it to the rhel 5 way, the system wont start it up on boot and it will start up when puppet runs. The other caveat that I encountered is the way puppet determines a service is running by default is it looks for it in the process table, which means that your init script might be named one way but the actual process is named another way. You would need to use the meta "hasstatus" to get around that. On Oct 18, 4:21 pm, Dan White <y...@comcast.net> wrote:> Are there any exapmples out there that show an intelligent way to do this ? > > My searches are not turning up anything useful > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes)-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.