Puppet With Runit
Author: Peter Hoeg <peter@…>
The purpose of this page is to describe how to run puppet(master)d under runit as opposed to the normal SysV unit scheme.
Missing items will be updated shortly
Assumption
- Puppet is properly configured and running using the standard SysV init scheme
- Runit is properly configured
- You are running Debian (it'll probably work on other distributions too)
- Your service directory is in /service
Steps
Stop and disable currently running puppet(master)d (as root)
$ /etc/init.d/puppetd stop $ /etc/init.d/puppetmasterd stop $ update-rc.d -f puppetd remove update-rc.d: /etc/init.d/puppetd exists during rc.d purge (continuing) Removing any system startup links for /etc/init.d/puppetd ... /etc/rc0.d/K20puppetd /etc/rc1.d/K20puppetd /etc/rc2.d/S20puppetd /etc/rc3.d/S20puppetd /etc/rc4.d/S20puppetd /etc/rc5.d/S20puppetd /etc/rc6.d/K20puppetd $ update-rc.d -f puppetd remove update-rc.d: /etc/init.d/puppetmasterd exists during rc.d purge (continuing) Removing any system startup links for /etc/init.d/puppetmasterd ... /etc/rc0.d/K20puppetmasterd /etc/rc1.d/K20puppetmasterd /etc/rc2.d/S20puppetmasterd /etc/rc3.d/S20puppetmasterd /etc/rc4.d/S20puppetmasterd /etc/rc5.d/S20puppetmasterd /etc/rc6.d/K20puppetmasterd
Create the directories to hold the service files
$ mkdir /etc/sv $ cd /etc/sv $ mkdir puppetmasterd puppetd
Create the run files - note: if you have dash installed, you should substitue /bin/sh for /bin/dash
$ cat << _END_ > /etc/sv/puppetmasterd/run #!/bin/sh /usr/sbin/puppetmasterd -v _END_ $ cat << _END_ > /etc/sv/puppetd/run #!/bin/sh /usr/sbin/puppetd -v _END_
Create the log run files This is pending - need to check my log run files
Activate the service and check they are running
$ cd /service $ ln -s /etc/puppetmasterd $ ln -s /etc/puppetd $ sleep 5 $ sv st puppet*
Need the output here
Congratulations, your puppet daemons are now properly monitored and running under runit!
