chef .8 down and dirty 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
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
echo "gem: --no-rdoc --no-ri" >> ~/.gemrc
- Now install rubygems,
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
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
Install Nanite
gem install nanite
- Make sure you have rake/etc installed
gem install rake cucumber rspec libxml-ruby jeweler thin unicorn merb-core merb-slices
- now setup RabbitMQ so that chef can talk to it (no more nanite)
rabbitmqctl add_vhost /chef
rabbitmqctl add_user chef testing
rabbitmqctl set_permissions -p /chef chef ".*" ".*" ".*"
- Grab Chef .8 from master and start work
mkdir git;git clone git://github.com/opscode/chef.git
- Install chef from master
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)
cd git/chef/chef-solr/bin;cp * /usr/bin
- Grab mixlib-authentication from git
git clone git://github.com/opscode/mixlib-authentication.git
- Install mixlib-authentication
cd mixlib-authentication && rake install
- Grab mixlib-log from git
git clone git://github.com/opscode/mixlib-log
- Install that also
cd mixlib-log && rake install
- Now fire up screen and start it up
- In not the perfect order, but.
1. Start nanite…
nanite-mapper
2. Start chef-solr
chef-solr
3. Start chef-solr-indexer
chef-solr-indexer
4. Grab some configs that should work,
mkdir -p /etc/chef
cd /etc/chef;wget http://likens.us/server.rb
cd /etc/chef;wget http://likens.us/client.rb
4. Start chef-server
chef-server
5. Now configure knife to work with the webui key and you should be solid.
knife configure
6. Run chef-client over localhost and it should register and work hopefully
7. Enjoy
8. Thanks to Bryan Helmkamp for updates to this post.
Posted by scottmlikens on Monday, December 14, 2009