Using Chef Server with RabbitMQ and STOMP.
Joe Williams - - February 03, 2009I decided to play around with RabbitMQ and chef (Opscode recently released new version) this afternoon. My main objective was to see if I could replace stompserver with something a bit more robust. In this case RabbitMQ and it’s STOMP plugin, the following is a basic outline of what I did. Please note that this was done on a Ubuntu 8.10 machine, if you are using another non-apt distro you will likely need to adjust the package installation commands and etc.
The first thing that needs to be done, if you do not already have a working chef/chef-server/ohai installation, is to get one up and running. If you already have a working install you should be able to skip down to the Erlang install portion and start from there.
Installing all this is pretty basic, check out the instructions. You should end up with a working installation with chef-server using stompserver (which we will be replacing) and couchdb. Here’s what I did:
sudo apt-get install ruby ruby1.8-dev rubygems libopenssl-ruby1.8 build-essential wget
wget http://rubyforge.org/frs/download.php/45904/rubygems-update-1.3.1.gem
sudo gem install rubygems-update-1.3.1.gem
sudo /var/lib/gems/1.8/bin/update_rubygems
sudo rm /usr/bin/gem
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem sources -a http://gems.opscode.com
sudo gem install chef ohai chef-server
apt-get install couchdb
I then added in my configuration for chef-server:
vi /etc/chef/server.rb
#
## Chef Server Config File
##
#
log_level :info
log_location STDOUT
ssl_verify_mode :verify_none
registration_url “http://localhost:4000″
openid_url “http://localhost:4000″
template_url “http://localhost:4000″
remotefile_url “http://localhost:4000″
search_url “http://localhost:4000″
cookbook_path [ “/var/localhost/site-cookbooks”, “/var/localhost/cookbooks” ]
merb_log_path “/var/log/localhost-server-merb.log”Chef::Log::Formatter.show_time = false
Since I am using a single machine for my chef server I started two chef-server instances, one with the defaults chef-server and another chef-server -p 4001. Two instances are needed for OpenID to work properly.
The next objective is to install Erlang.
sudo apt-get install erlang
Now for the RabbitMQ install, download the debian package from here and install it.
wget http://www.rabbitmq.com/releases/rabbitmq-server/v1.5.1/rabbitmq-server_1.5.1-1_all.deb
dpkg -i rabbitmq-server_1.5.1-1_all.deb
Next up is the RabbitMQ STOMP Plugin, get the latest from their repository. You also need the rabbitmq-server source tarball to build the STOMP plugin code off of.
apt-get install mercurial
cd /opt/
hg clone http://hg.rabbitmq.com/rabbitmq-stomp/
wget http://www.rabbitmq.com/releases/rabbitmq-server/v1.5.1/rabbitmq-server-1.5.1.tar.gz
tar zxvf rabbitmq-server-1.5.1.tar.gz
mv rabbitmq-server-1.5.1 rabbitmq-server
cd rabbitmq-server/
apt-get install python-simplejson
make
cd ../rabbitmq-stomp/
make
You will want to edit the config for rabbitmq to start up with the STOMP activated and then restart the service.
vi /etc/default/rabbitmq
SERVER_START_ARGS=’
-pa /opt/rabbitmq-stomp/ebin
-rabbit
stomp_listeners [{"0.0.0.0",61613}]
extra_startup_steps [{"STOMP-listeners",rabbit_stomp,kickstart,[]}]’
Finally, start everything up, minus stompserver.
/etc/init.d/couchdb start
/etc/init.d/rabbitmq-server restart
chef-server
chef-server -p 4001
After all that you should have a working chef-server using RabbitMQ/STOMP rather than stompserver. The rest is up to you.
Categories: Blogs Joe Williams
Comments
Hi to everyone I just want share few good links:
http://www.braunelectricshaver.net/forum/braun-forum/best-film-or-tv-adaption-of-a-stephen-ki-t45.html - best film or
http://www.mensdiamondweddingrings.net/forum/ring-forum/ - ring forum
<a >prefer to work</a>
<a >i am married</a>
<a >honest when</a>
<a >carfax report</a>
<a >braun forum 3</a>
<a >ross levinsohn</a>
<a >quality of a panasonic</a>
<a >ring forum 2</a>
<a >buying-nikon d90</a>
<a >ring forum</a>
Thanks so much for the guidance!
Posted by David L. Goldberg on 11 Aug 2009 at 03:52
Add comment
Erlang on Twitter
» ingojaeckel (ingo jaeckel): Even more awesome, free Erlang resources http://t.co/blGINLJd
» DiTeam (Тимурка): @multybuq @ukhin руби хороший вариант :) можно даже без rails..попробуй erlang еще :)
» michelir5 (Micheli Gelatinous): @pharkmillups Still seeing it. I might just have to manually install it. The version of Erlang required by Riak is not current version in HB
» Angry_Lawyer (Tony Aldridge): @rvirding @saghul If Erlang kills you, does a supervisor automatically create a replacement of you?
» rvirding (Robert Virding): Softly I hope. RT @saghul: Slowly making progress… erlang is killing me.
» jsvd (João Duarte): RT @FrancescoC: Woot! RT @valdo404: Practical Erlang Programming at #QConLondon I want to go there
» saghul (Saúl Ibarra Corretgé): Slowly making progress… erlang is killing me.
» dlsspy (Dustin Sallings): @IbnFirnas heh. The erlang parts are still solid. The currently active alerting box is arm5, failed over from a pc that died one day.
» quercialwji2 (Quercia Quinn): @MikeSmooth_ABCs http://t.co/pPiIpTCx
» levicole (Levi Kennedy): @pharkmillups the homebrew version of erlang is the most recent version, and riak requires R14B I think.
Statistics
Number of aggregated posts: 10456
Number of comments: 1445
Most recent article: February 06, 2012
Latest comments
» simple smile on Scale means Skills: Very informative article. Pretty sure people would love to go to that place for shopping. Specially to those who are…
» simplesmile on 27 January 2012: Erlang Solutions embarks on an Erlang Embedded KTP: Your article will make the world better. Thanks again and good luck to you in your life. See you next time.simplesmile
» tandblekning easewhite on 08 February 2012: Erlang Express 3-day Course in San Francisco on 8 February: ncomprehensible to me now, but in general, the usefulness and significance is overwhelmingtandblekning easewhite