Installing Chef Server 0.10 in CentOS 5 (RHEL 5)

Opscode Chef 0.10.0 client/server packages are now available at rbel.frameos.org Installing a CentOS 5 based Chef Server 1. Install the RBEL repo
rpm -Uvh http://rbel.frameos.org/rbel5
2. Install Chef Server and dependencies
yum install rubygem-chef-server
3. To make things easier, disable the firewall (Don’t do it in a production or public facing server)
service iptables stop
4. Run the setup script
setup-chef-server.sh
Now login to http://your-chef-server:4040 user: admin password: chef321go Packages still need some polishing so any feedback is greatly appreciated. Enjoy! See also: Bootstraping RHEL/CentOS 5 Chef 0.10 nodes using RBEL repo UPDATE: Chef packages updated to 0.10 RC2. Fixed setup issues. Updated post. UPDATE: Chef packages updated to 0.10 GA. UPDATE: Chef packages moved to rbel5 stable. rbel6 packages for RHEL6 coming soon.

23 Responses to 'Installing Chef Server 0.10 in CentOS 5 (RHEL 5)'

  1. I ran this on the scalr CentOS 5.6 AMI, and had to remove ruby/ruby-libs before installing.

    sudo yum remove ruby
    sudo yum remove ruby-libs
    sudo yum install rubygem-chef-server

    Seemed to work.

    • rubiojr says:

      Thanks for the feedback Joel!

      I wonder if they pre-install the ruby package from an unofficial repo. Official ruby packages from CentOS should be upgraded without problems.

      • Graham Forest says:

        The package I had to install was ruby-libs-1.8.6-111-1.i386. It was correctly updating x86_64, but conflicting with the i386 package.

        file /usr/lib/ruby/1.8/abbrev.rb from install of ruby-libs-1.8.7.352-5.el5.x86_64 conflicts with file from package ruby-libs-1.8.6.111-1.i386

  2. Charles Duffy says:

    Why the .sh on setup-chef-server.sh?

    Putting an extension on that executable means that if it’s ever rewritten in a different language all scripts that call it will need to be changed. Eww!

  3. Brian says:

    Hit a bit of a problem with the ruby lib packages when doing yum -y update http://pastie.org/2363945

    Here’s how I fixed it: http://pastie.org/2364155

  4. billybob says:

    I used for Centos6.
    It worked fine.
    Extra Steps needed for chef to work
    1. adduser -m chef
    2. chmod 644 /etc/chef/webui.pem file

    That is it !!! need to export and import chef from Centos 5.6 server to this Centos 6 server.
    Cheers,

  5. miked says:

    What is the name of the chef-client package?

    I only see chef-server packages.

    thanks

  6. Yehia says:

    After:
    Starting chef-server: [ OK ]
    Starting chef-server-webui: [ OK ]
    Starting chef-solr: [ OK ]
    Starting chef-expander: [ OK ]
    I’m getting “Connection refused” -when trying to connect to the server. Any clues?

  7. rubiojr says:

    Not sure @Yehia, firewall? “service iptables off” will turn it off.

    • Yehia says:

      did service iptables stop but no joy.
      # curl http://localhost:4040 -v
      * About to connect() to localhost port 4040
      * Trying 127.0.0.1… Connection refused
      * couldn’t connect to host
      * Closing connection #0
      curl: (7) couldn’t connect to host

      • rubiojr says:

        Have a look at the Chef logs in /var/log/chef and try to find if the service is running:

        ps aux|egrep “chef-server.*worker” should list something like this:

        https://gist.github.com/1476140

        And “netstat -tlpn|grep chef” should list the processes listening in 4000 (api) and 4040 (server):

        https://gist.github.com/1476149

        • Yehia says:

          Apparently, the server is running but not it’s WebUI (no logs in /var/log/chef/server-webui.log). I started it manually and it works now. Thanks.

          # ll /var/log/chef/server-webui.log
          -rw-r–r– 1 root root 0 Dec 13 16:58 /var/log/chef/server-webui.log

          # service chef-server-webui start
          Starting chef-server-webui: [ OK ]

          # ps aux|egrep “chef-server.*worker”
          chef 19234 0.0 1.7 47876 35760 ? S Dec13 0:05 merb : chef-server (api) : worker (port 4000)
          chef 29868 29.1 1.6 39016 33828 ? S 14:52 0:02 merb : chef-server-webui : worker (port 4040)

          # curl http://localhost:4040
          You are being <a href="/users/login?…… [snip]

  8. Richard says:

    I followed the instructions. But when running the setup script i get this out
    Checking RabbitMQ…

    Starting CouchDB…

    Starting couchdb: already running [WARNING]
    Enabling Chef Services…

    Starting Chef Services…

    Starting chef-server: [FAILED]
    Starting chef-server-webui: [FAILED]
    Starting chef-solr: [FAILED]
    Starting chef-expander: /usr/lib/ruby/1.8/openssl/cipher.rb:22: Cipher is not a module (TypeError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/1.8/openssl.rb:20
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/1.8/securerandom.rb:36
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/gems/1.8/gems/uuidtools-2.1.1/lib/uuidtools.rb:35
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/../lib/chef/expander/node.rb:21
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/../lib/chef/expander/vnode_supervisor.rb:27
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/../lib/chef/expander/cluster_supervisor.rb:25
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’
    from /usr/lib/ruby/gems/1.8/gems/chef-expander-0.10.8/bin/chef-expander:27
    from /usr/bin/chef-expander:19:in `load’
    from /usr/bin/chef-expander:19
    [FAILED]

  9. Fred says:

    I tried both RHEL install guides from the Chef website and couldn’t get either to work after 2 days. Came here and had it up and running in about 15 minutes.

Trackbacks/Pingbacks
  1. [...] Installing Chef Server 0.10 in CentOS 5 (RHEL 5) [...]

  2. [...] Installing Chef Server 0.10 in RHEL5 and derived distributions [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*