Skip to content

Options for running chef rundeck in production

William Jimenez edited this page Aug 4, 2014 · 2 revisions

Supervisor is a great way to manage processes in production. Here's how to set it up to work with chef-rundeck:

Step 1 Install supervisor pip install supervisor or easy_install supervisor

Step 2 Create config file. There are a number of ways to do this, one of them is to use the sample config as a starting place and modify it to fit your needs:

echo_supervisord_conf > /etc/supervisord.conf

Then add (either to the bottom of the file or to replacing the example program that is commented out):

[program:chef-rundeck]
command=/usr/bin/chef-rundeck -c /opt/chef-rundeck/knife.rb -u rundeck -o 0.0.0.0 --partial-search true --timeout 80
redirect_stderr=true
stdout_logfile=/var/log/chef-rundeck.log

Step 3 Setup supervisord init script. This one works well on RedHat/CentOS/Scientific Linux: https://github.com/Supervisor/initscripts/blob/master/redhat-init-mingalevme. Be sure to modify the "pidfile" attribute in supervisord.conf that you created just before to reflect the path used in this init script:

pidfile=/var/run/supervisord.pid

For Debian based systems check out: https://github.com/Supervisor/initscripts

Write that script to /etc/init.d/ and make sure the permissions are executable by owner and owner is root.

Step 4 Start supervisor:

/etc/init.d/supervisord start

or if you want to just start manually without an init script (it will automatically run in the background):

supervisord -c /etc/supervisord.conf

Step 5 chef-rundeck should automatically be started. You can check on the status by running supervisorctl

~$ sudo supervisorctl
chef-rundeck                     RUNNING    pid 8261, uptime 9 days, 18:35:23

and to see the stdout of the process:

supervisor> tail chef-rundeck
[2014-08-02T00:14:29+00:00] INFO: nodes complete (project: 'default', total: 300, failed: 0)
[2014-08-02T00:14:29+00:00] INFO: Loading all nodes for /
Clone this wiki locally