Opscode
Home     Cookbooks     Blog     GitHub     Tickets 

Installation on RHEL and CentOS 5 with RPMs

These instructions use the ELFF yum repository. Matthew Kent currently maintains these packages as a service to the Chef community.

Supported distribution releases:

  • CentOS 5.4
  • CentOS 5.3

Earlier CentOS 5 releases and RHEL 5 should work but haven't been tested with the latest packages.

If you are wanting to submit changes to these packages or build your own checkout the opscode-packages git repository.

New version

These rpms have been reworked to more closely mirror the Debian/Ubuntu apt packages and as such are no longer compatible with the bootstrap system. Please use caution when upgrading as they may not match existing expectations in your deployment. If at all possible, we recommend removing the previous packages or installing to a fresh server.

Source installed rubygems incompatibility

These packages assume you're using the rubygems package from the EPEL repository. They will not work with a copy of rubygems installed from source or one that has been updated with gem update --system (thanks to Alex Soto for the heads up) due to different pathing in /usr/lib.

Current version

Chef 0.7.16 is the latest rpm packaged version. This may lag slightly behind the primary gem and apt releases as this is currently a volunteer effort.

Future changes

These packages are subject to change or obsoleting as newer packages are prepared and submitted to Fedora for review. The long term goal is making Chef available in Fedora and EPEL. You can follow the progress of this effort in CHEF-522 and OHAI-118.

Pre-requisites


We'll assume you have sudo set up for your user. Otherwise su to root to run the commands listed w/ 'sudo' below.

  1. Make sure the system has a fully qualified domain name (FQDN) set properly.

    should return a hostname like chef.example.com.

  2. Iptables needs to allow the proper ports (4000 by default), or be disabled.
  3. Install the EPEL Yum Repository.
  4. Install the ELFF Yum Repository.

Install a Server


Install the Chef Server RPM from ELFF.

This will:

  • Install all the dependencies for Chef Server, including Merb, CouchDB, Stompserver, etc.
  • Add configuration files in /etc/chef for the client, server, indexer and solo.
  • Create all the correct directory paths per the configuration files.

After rubygem-chef-server is installed you can start couchdb, stompserver, chef-indexer and chef-server. We'll also ensure the services start on boot by marking them as on.

This does the following:

  • Starts CouchDB
  • Starts stompserver, running on localhost:61613.
  • Start chef-server via /etc/init.d/chef-server, running two mongrels on ports 4000 (webui/api) and 4001 (openid). These both drop privileges to the chef user.
  • Start chef-indexer via /etc/init.d/chef-indexer, connecting to the stompserver. Drops privileges to the chef user.
  • Start chef-client via /etc/init.d/chef-client.

Install a Client


Install just a client. This is also applicable if you're planning to run chef-solo.

If you are planning to run chef-solo, you can skip the next step. The configuration file for chef-solo is /etc/chef/solo.rb.

Bootsafe and start chef-client:

Configuration


Normally with our other installations this is the point where you would run the chef-solo bootstrap. The rpm packages (and apt packages) do not require this step, but you may wish to take a look at the configuration files and see if they meet your needs, or modify for your environment. The files are commented, and located in /etc/chef (*.rb in that directory).

Next you'll probably want to set up a local repository to store configuration for your infrastructure.

Chef Bootstrap Cookbook

The bootstrap tarball/cookbook is not needed for package installations of Chef. The packaging handles all the tasks of the bootstrap. You may wish to manage the Chef configuration for your nodes, which can be accomplished with the Opscode Chef Cookbook

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 05, 2009

    Kirill Ishanov says:

    Hi guys, I've followed the instructions to install Chef on GoGrid server images...

    Hi guys,

    I've followed the instructions to install Chef on GoGrid server images (bot 64-bit CentOS 5.1 and 32-bit RHEL 5.1) but got this error on the last step:

    Any ideas how to fix it?

    Thanks

    1. Aug 14, 2009

      Matthew Kent says:

      Believe this is caused by the older version of yum in CentOS 5.1. Any chance you...

      Believe this is caused by the older version of yum in CentOS 5.1. Any chance you could get a newer image or upgrade the existing one?

      1. Aug 17, 2009

        Roman Bogorodskiy says:

        Do you have an idea what is the minimal supported yum version? I've updated yum ...

        Do you have an idea what is the minimal supported yum version? I've updated yum from CentOS repos and yum now is:

        [root@### ~]# yum --version
        3.2.19

        And I still have problems with it:

        [root@### ~]# chef-solo -c ~/solo.rb -j ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
        [Mon, 17 Aug 2009 03:26:52 -0700] INFO: Starting Chef Solo Run
        /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/node/attribute.rb:372:in `method_missing': Attribute domain is not defined! (ArgumentError)
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/node.rb:236:in `send'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/node.rb:236:in `method_missing'
        from /tmp/chef-solo/cookbooks/chef/attributes/server.rb:33:in `from_file'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:73:in `load_attributes'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:71:in `each'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook.rb:71:in `load_attributes'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/compile.rb:68:in `load_attributes'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:117:in `each'
        ... 8 levels...
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/application.rb:57:in `run'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/bin/chef-solo:26
        from /usr/bin/chef-solo:19:in `load'
        from /usr/bin/chef-solo:19
        [root@### ~]#

        [root@### ~]# chef-solo --version
        Chef: 0.7.8

        1. Aug 17, 2009

          Matthew Kent says:

          yum 3.2.19 should work fine. Guessing your error is related to an issue ohai is ...

          yum 3.2.19 should work fine. Guessing your error is related to an issue ohai is having. Check if domain is getting outputted:

          [root@chefdemo ~]# ohai | grep domain
          "domain": "demo.domain.com"

          You should try the mailing list or irc channel, don't think the wiki comments are great for install support.

  2. Aug 19, 2009

    Anthony Lopez says:

    going to try the list or irc channel

    going to try the list or irc channel

  3. Jan 20

    Alex Soto says:

    GOTCHA NOTE: Beware upgrading rubygems on your chef-server. For another piece o...

    GOTCHA NOTE:
    Beware upgrading rubygems on your chef-server. For another piece of software I did a

    on a Centos 64 server and the gem paths switched from /usr/lib/ruby/... to /usr/lib64/ruby/... so all the gems were no longer visible, requiring a re-install.


Copyright © 2009 Opscode, Inc. All Rights Reserved.