Opscode
Home     Cookbooks     Blog     GitHub     Tickets 

How to Convert chef-server from runit to Passenger

If you have an existing Chef installation set up under Runit using the old procedures, you can follow a few simple steps to reconfigure your system to use Passenger.

These procedures assume your Chef "base" directory is /srv/chef. If it is not, see the Alternate chef-solo command below.

Stop chef-server runit

If you run other merb applications, you'll need to know the pid of the chef-server's merb.

get chef-server pid

Shut down runit service chef-server.

stop chef-server

Kill off the running merb processes.

kill merbs

Configure chef-solo + Apache/Passenger

Use chef-solo to configure the system for Passenger, from the Installation doc.

Create solo.rb.

~/solo.rb

Create chef.json.

~/chef.json

Run chef-solo to fetch and apply the configuration.

Other Notes.

The recipe will generate a self-signed SSL certificate. You should replace this with your own self-signed or purchased from a CA.

When you sign in with your openid, you may get a 500 error. This is because the directories are not owned by chef, the user that the Passenger will run as.

Alternate chef-solo command

If you don't use /srv/chef as your chef-server's primary service directory, you can still use the tarball we provide, with a couple extra steps to get things configured.

First, download the tarball from S3 and untar it in a temporary location.

download from s3

Edit cookbooks/chef/attributes/chef.rb and change the chef[:path] attribute.

cookbooks/chef/attributes/chef.rb

If you are not running chef-server out of the default Gem path on your system, edit the server attributes file

cookbooks/chef/attributes/server.rb

Create the chef.json and solo.rb files as above, and run chef-solo.

chef.json
solo.rb
chef-solo

Note the chef-solo command doesn't specify a tarball URL as above. It will look in the solo.rb config file for the cookbook path, and use that to configure the server.

If you run into trouble...

If you have any issues with these procedures, stop by IRC or the Mailing Lists for help. If you encounter what appears to be a bug, open a ticket.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Copyright © 2009 Opscode, Inc. All Rights Reserved.