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 d...@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 signature.asc Description: OpenPGP digital signature
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 signature.asc Description: OpenPGP digital signature
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 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 +, 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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_w...@pobox.com wrote: On Tue, Oct 18, 2011 at 08:21:34PM +, 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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_w...@pobox.com wrote: On Tue, Oct 18, 2011 at 08:21:34PM +, 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 russel...@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 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 nat...@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_w...@pobox.com wrote: On Tue, Oct 18, 2011 at 08:21:34PM +, 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 +, 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_w...@pobox.com wrote: On Tue, Oct 18, 2011 at 08:21:34PM +, 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 russel...@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 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Craig White ~ craig.wh...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 russel...@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 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Craig White ~ craig.wh...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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 y...@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 russel...@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 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Craig White ~ craig.wh...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.