because we all share ...

undefined clue 'adversity' for nil:nil (NameError)

Getting Chef 0.8 Bootstrapped and Up in Screen

Simple post, just to detail if you want .8 and don’t want to use bootstrap or runit or init and you just want it working.

  • Get the base system up
1
2
3
4
5
sed -i 's/universe/multiverse universe/' /etc/apt/sources.list
apt-get update
env DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
echo 'sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true' | sudo debconf-set-selections
apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential zlib1g-dev libxml2-dev wget ssl-cert git-core couchdb sun-java6-jdk sun-java6-jre
  • Setup gem to not annoy me
1
echo "gem: --no-rdoc --no-ri" >> ~/.gemrc
  • Now install rubygems,
1
2
3
4
5
6
cd /tmp
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar zxf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby setup.rb --no-ri --no-rdoc
sudo ln -sfv /usr/bin/gem1.8 /usr/bin/gem
  • Install RabbitMQ
1
2
wget http://www.rabbitmq.com/releases/rabbitmq-server/v1.7.0/rabbitmq-server_1.7.0-1_all.deb
dpkg -i rabbitmq-server_1.7.0-1_all.deb
  • Make sure you have rake/etc installed
1
gem install rake cucumber rspec libxml-ruby jeweler thin unicorn merb-core merb-slices
  • now setup RabbitMQ so that chef can talk to it
1
2
3
rabbitmqctl add_vhost /chef
rabbitmqctl add_user chef testing
rabbitmqctl set_permissions -p /chef chef ".*" ".*" ".*"
  • Grab Chef .8 from master and start work
1
mkdir git;git clone git://github.com/opscode/chef.git
  • Install chef from master
1
rake install
  • You may catch a few missing dependencies, gem install them if I missed it (but I think this is right)

  • Now you need to install the chef-solr bins (the gemspec isn’t fixed to do this yet)

1
cd git/chef/chef-solr/bin;cp * /usr/bin
  • Grab mixlib-authentication from git
1
git clone git://github.com/opscode/mixlib-authentication.git
  • Install mixlib-authentication
1
cd mixlib-authentication && rake install
  • Grab mixlib-log from git
1
git clone git://github.com/opscode/mixlib-log
  • Install that also
1
cd mixlib-log && rake install
  • Now fire up screen and start it up

  • In not the perfect order, but.

  • Start chef-solr

1
chef-solr
  1. Start chef-solr-indexer
1
chef-solr-indexer
  1. Grab some configs that should work,
1
2
3
mkdir -p /etc/chef
cd /etc/chef;wget http://likens.us/server.rb  
cd /etc/chef;wget http://likens.us/client.rb
  1. Start chef-server
1
chef-server
  1. Now configure knife to work with the webui key and you should be solid.
1
knife configure
  1. Run chef-client over localhost and it should register and work hopefully

  2. Enjoy

  3. Thanks to Bryan Helmkamp for updates to this post.

Comments