Installing using native Ubuntu or Debian ensures that Chef is installed in the same way as other software on your system. These instructions use the Opscode APT repository for installing Chef 10. Opscode maintains the packages in this APT repo, as well as the packages that get included in Debian and Ubuntu's repositories.
The following distributions are supported within the Opscode APT repository:
Install ProcessesInstalling chef-server using the Opscode provided packages for Debian and Ubuntu requires that you:
The following sections take you through each of these steps in detail. |
|
Add the Opscode APT RepositoryCreate /etc/apt/sources.list.d/opscode.list
If you would like to be able to download source packages, add an additional identical line, but change You can copy and paste these examples to create the necessary sources.list entry: Ubuntu for Chef 0.10.x Debian users will likely need to run 'apt-get install sudo wget lsb-release' as root before pasting the examples. Add the GPG Key and Update IndexBefore you install the packages, make sure you add the Opscode GPG key to apt.
Now, we update apt-get with the newly added Opscode repository: Installing the opscode-keyring package will keep the key up-to-date: Upgrade Existing PackagesTo ensure you are using the latest versions of libraries that chef depends on, you may wish to update your existing packages: Install the chef-server packageYou will be prompted by debconf for the Chef Server URL. Put in a value like "http://chef.example.com:4000". You will also be prompted for the rabbitmq consumer password and the webui admin password. The rabbitmq consumer password MUST NOT be left blank. This will:
If you do not want the webui installed, install the server-api and expander packages separately: This does the same as above without the chef-server-webui service. Verify That All Components are RunningNow that you have Chef Server installed, you should have the following processes running.
Configure the Command Line ClientOnce you've verified that all of Chef's components are working, it's time to configure the knife command line tool. On your Chef Server, run First, create the ~/.chef directory and copy the required certificates created by the server.
Next run the API Client creation must use an existing admin client's credentials to create the new account. On a brand new server, the The "chef-validator" client is a special account used to auto-register new nodes. Use the default clientname, and specify the validation.pem copied above. Finally, specify a location for the Chef Repository. This is used to configure knife to point to the directory where Cookbooks will be stored. Verify Your Knife Client ConfigurationYou can now run some basic knife commands to verify that you can communicate with the server. Create a Knife Client for Your Laptop/DesktopCreate Your Client AccountWhen working with chef, you will spend a lot of time editing recipes and other files, and you'll find it much more convenient to edit them on your laptop/desktop (your management workstation), where you have your editor configured just to your liking. To facilitate this mode of working, we recommend you create a knife client to use knife on your development machine. Make sure you've configured knife on your chef server as described above before proceeding with this step. This command creates the client and writes its private key to Copy Your Key and Configure KnifeNow you need to copy the key you just created to your development machine using scp (or some other file copy mechanism). In order to use knife on your laptop, you'll need to install the chef-client. If your laptop's OS comes with rubygems (Mac OS X, for example) you can run Knife looks for its configuration in Now, enter your client name, exactly as you did when running For these next settings, you can accept the defaults for now and update them later by editing your knife.rb file. The validation client name and key are used with knife's cloud computing commands: We'll also leave the path to the chef repository blank for now. After you've created a chef repository, you'll want to configure it by editing knife.rb Verify Your ConfigurationYou can run some You're now ready to use Knife Bootstrap to automatically set up systems to become new Chef Clients to the server.
|
|


8 Comments
Hide/Show CommentsOct 21, 2011
Ivan Storck
This key 83EF826A is not on keys.gnupg.net
UPDATED: Must have been a temporary local connection issue
Jun 11, 2012
Steven Danna
Including information from your support ticket here so other can see it:
The needed key does exist on the key server listed in the directions. This can be confirmed with the following:
Anyone experiencing problems obtaining these keys is encouraged to contact us at www.opscode.com/support. If possible please use
gpg's--verboseflag and include any error messages you encounter.Thanks!
Aug 24, 2012
Marcus Bointon
I found that installing from the Opscode Lucid repo did not install `rabbitmq-server` or `chef-solr` packages. Installing them manually worked ok.
Oct 28, 2012
Jarret Raim
A warning. Do not use passwords with special characters in them. The installation scripts of the chef packages don't properly escape and the installation will fail.
Oct 31, 2012
Sabrina Kavanaugh
With Ubuntu 12.10 (quantal) we had a problem installing chef-server with dependency conflicts between ruby-yajl and libyajl-ruby. The problem was with the ohai package being pulled from Canonical (using ruby-yajl) instead of opscode (using libyajl-ruby) because the Canonical repo was one rev up(atow, 6.14.0-2 vs 6.14.0-1 in opscode). To work around, you have to install ohai before installing chef and chef-server with the version in the opscode repo (apt-get install ohai=6.14.0-1 ) and also install libohai-ruby1.8(matching ohai version) because installing libohai-ruby doesn't install the needed files. I installed libohai-ruby1.8 after installing chef-server (and having it fail to start) so I don't know if there are other dependencies if you install it before chef, although I would hope that it will still work.
Mar 07, 2013
Chris Benson
Sabrina, I followed your instructions (much appreciated), but am having the exact same problem as Jim below. I'm using Ubuntu Server 12.10 64-bit. Any suggestions?
Jan 17, 2013
jim west
Am not able to install latest version of chef even after following Sabrina's instructions.
Attempting to run chef-client results in an ohai load error.
/usr/lib/ruby/vendor_ruby/chef/rest/rest_request.rb:33:in `require': no such file to load -- ohai (LoadError)
Any ideas?
OS: Ubuntu Oneiric 11.10 64bit
Mar 07, 2013
Chris Benson
Jim, I followed Sabrina's instructions, but am having the exact same problem as you. I'm using Ubuntu Server 12.10 64-bit. Did you ever get it sorted?