[chef] Installing chef-client on Ubuntu 10.04


Chronological Thread 
  • From: Luke Biddell < >
  • To:
  • Subject: [chef] Installing chef-client on Ubuntu 10.04
  • Date: Tue, 13 Mar 2012 13:34:55 +0000

Folks,

I'm currently following the ruby gems installation for ubuntu. We're using this rather than the apt method as some of the gems we require appear to need a newer version of rubygems than the ubuntu package.

http://wiki.opscode.com/display/chef/Installing+Chef+Client+on+Ubuntu+or+Debian#InstallingChefClientonUbuntuorDebian-Rubygem

So my install procedure is pretty much this:


sudo -E apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert curl
cd /tmp
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar zxf rubygems-1.8.10.tgz
cd rubygems-1.8.10
sudo -E ruby setup.rb --no-format-executable
sudo -E gem install chef --no-ri --no-rdoc
sudo -E gem install aws-sdk pony --no-ri --no-rdoc


I then register my node with my chef server and that's fine.

As soon as I add my recipe into the node's runlist and sudo chef-client this happens


FATAL: LoadError: no such file to lead -- aws-sdk


However, if I do this:


export GEM_PATH=/usr/lib/ruby/gems/1.8


I can then sudo chef-client and the aws-sdk gem is loaded.

So there's several questions:

1) Have I missed something which is breaking the GEM_PATH?
2) Where should I set GEM_PATH so it's seen by chef-client during a manual run and as a daemon?

Ideally we would just bootstrap, and we are going to do that, but I'd still like to know where the issue lies.

TIA

Luke



Archive powered by MHonArc 2.6.16.

§