Chef Server on Ubuntu 12.04

Ran into some issues over the weekend getting Chef Server installed using apt on 12.04. Starting with the directions here. I started having issues trying to bring up the webui and chef-server after the apt install of those packages. More specifically:

$ sudo service chef-server-webui start
* Starting chef-server-webui   ~ In 22617  [fail]

This led down a rabbit hole of Ruby related troubleshooting. More specifically, attempt to start the chef service by hand:

$ sudo chef-server
Loading init file from /usr/share/chef-server-api/config/init.rb
[Sun, 11 Nov 2012 08:36:28 -0800] INFO: Loading roles
Loading /usr/share/chef-server-api/config/environments/development.rb
[Sun, 11 Nov 2012 08:36:28 -0800] INFO:
[Sun, 11 Nov 2012 08:36:28 -0800] INFO: ********************************************************************************
[Sun, 11 Nov 2012 08:36:28 -0800] INFO: *   Starting Chef Server in Development Mode.
[Sun, 11 Nov 2012 08:36:28 -0800] INFO: *   Start the server with `-e production` for normal use
[Sun, 11 Nov 2012 08:36:28 -0800] INFO: ********************************************************************************
[Sun, 11 Nov 2012 08:36:28 -0800] INFO:
/usr/lib/ruby/1.8/mixlib/authentication/http_authentication_request.rb:25: warning: already initialized constant MANDATORY_HEADERS
/usr/lib/ruby/1.8/mixlib/authentication/signatureverification.rb:28: warning: already initialized constant SignatureResponse
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’: no such file to load — dep_gecode (LoadError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require’

Each of the first two or three starts had a different failed file load. Specifically, the failure above, as well as one for libyajl-ruby. The fix was 3 steps:

sudo apt-get install libyajl-ruby libgecode-dev
sudo gem install dep_selector
sudo gem install yajl-ruby

After which, both chef server and the webui came up:
image

resources here & here & here & also here.

2 thoughts on “Chef Server on Ubuntu 12.04

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.