Installing Chef-Server

This explains how to use Chef-Solo to install Chef-Server

Introduction

Lets assume that you have been using Chef Solo to manage some NeCTAR virtuals, and you have concluded that manual push/pull of updates via Git has become too labour intensive. You have decide to "take the plunge" with Open Source Chef Server.

Recommended Chef-Server Installation Procedure

The procedure recommended by Opscode is described here. This gives you a standard Open Source Chef Server installation, and explains how to set up a "chef-repo" from scratch. You are then left with the problems of populating your "chef-repo", and arranging backups etcetera.

However, my recommendation is a bit different. To simplify things, I recommend that you start from a Chef-Solo installation (with a pre-built repo tree), and use chef-solo to perform initial configuration of the machine / virtual, and then install and configure chef-server using the "qcloud::chef-server" recipe.

The detailed procedure is as follows:

Check that you have a suitable platform for Open Source Chef Server. (Read this page, and see Gotcha #2 below.)

If you haven't done so already, install chef-solo, git and a chef-solo repository tree as described here. (Perform steps #1 through #4).

Create a "node.json" that just has the "qcloud::setup" recipe in the runlist. (The "solo/sample-node.json" file is a good template.)

Use "chef-solo" to run the runlist. This will ensure that the virtual's hostname is properly configured, which is a precondition for successful chef-server installation. (See Gotcha #1 below.)

Edit the "node.json" file to add "qcloud:: chef-server" to the runlist.

Use "chef-solo" to run the runlist. This will install and configure chef-server.

Run "sudo chef-server-ctl status" to check that the chef-server and related daemons are running.

Run "sudo chef-server-ctl test" to check that everything is working.

Next steps

Now that you have created your chef-server, your next steps should be:

Turn this node (and other previously chef-solo managed nodes) into a chef-server managed node. This is optional, but you will probably want to do it.

Arrange for the chef-server backups (configured by the "qcloud::chef-server" recipe) to be copied somewhere else.

Decide whether you want your chef-server managed machines to run a "chef-client" service.

Gotchas

Gotcha #1

The NeCTAR images for Ubuntu (Qantal, Raring and maybe others) give you a virtual whose "hostname" does not resolve properly in DNS. This causes the standard Opscode "chef-server" recipe to die prior to the "convergence" step.

The simple workaround is to install chef-server in two stages as described above.

Gotcha #2

Chef-server is only supported on a limited range of Linux platforms, as listed here. If you attempt to install it on another platform (using the procedure above), you will get a mysterious message like:

RuntimeError------------Could not locate chef-server package matching version 'latest' for node.

What has happened is that the recipe has been unable to find a suitable Omnibus Installer matching your platform. The simple workaround is to use a supported platform. (You can probably also build and install from source, but it is likely to be a long and painful process.)

Gotcha #3

The Chef-server host requires (at least) the HTTPS (443) port to be open.