There is a new hype: cloud computing. Your web site traffic grows? Add a new application server. Want to increase availability? Add a new web server. Among others Amazon offers a whole bunch of infrastructure to support these needs. But it is not enough to fire up a server. The web server should include apache, the app server should include tomcat. The deployment should be aware of the new app server. This is where Puppet, iClassify, and Capistrano come into play. Puppet does the configuration management, installs your desired web and app server.

Depending on the “server class” it automagically can install packages, configurations, etc. iClassify plugs into this nicely: each new server registers with iClassify, providing the vital information of itself (yes, its scriptable and there already is script for exposing all relevant EC2 data of an instance). Once tagged with a “server class” Puppet can do its work. iClassify nicely integrates with Capistrano, so deployment tasks can be rolled out through the result of searches in the iClassify database. “Deploy to all HOSTS in $CLOUD where hasTomcat=TRUE”.

Following is a writeup of the Puppet and iClassify installation on a Rightscale CentOS 5.0 Amazon EC2 ami:

It is mainly based on, so credits go there :-)

Install iClassify

cd /etc/yum.repos.d

Enable the proper repository, edit the dlutter.repo file, find the [dlutter-rhel5] section and set enabled=1

vi dlutter.repo 

yum install puppet-server
yum install ruby-rdoc

Create a minimal manifest file in /etc/puppet/manifests with the following content:

# The name of the system running the file server

$server = "pmaster"

 node default {


vi /etc/puppet/manifests/minimal
/etc/init.d/puppetmaster start
chkconfig puppetmaster on

Install iClassify

install rails and rake (already on ami)
review this (capistrano tasks for puppet/iclassify):

recipes for puppet (should try out the iclassify thing):

contact: If you have any specific questions there’s an irc channel on freenode (#puppet), and the major developers are all there and it’s pretty easy to get advice (if it’s in the work week between 9-5est I’ll always help if I can.)


other blog entries


install iClassify

gem list|grep rails
gem list|grep rake

install  builder, UUID Tools. Mongrel, Highline

gem install builder uuidtools mongrel highline ruby-net-ldap
yum install mysql mysql-devel

/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password 'mysql'
mysqladmin create iclassify_production -p
mysql iclassify_production -p
GRANT ALL ON iclassify_production.* TO 'iclassify'@'localhost' IDENTIFIED BY 'yourpass'
gem install mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql

gem install mongrel_runit-0.2.0.gem 

yum install git
yum install facter

RubyWorks.repo /etc/yum.repos.d/
change baseurl to (does read to 5.0 –> no web site)

vi /etc/yum.repos.d/RubyWorks.repo
yum install runit

install IClassify

choose your ICLASSIFY_HOME directory
git clone git:// iclassify
cd iclassify/

rake iclassify:install ICBASE=/srv/iclassify ICUSER=apache ICGROUP=apache DBUSER=iclassify DBPASS=yourpass
chown -R apache:apache /srv/iclassify/*

mkdir /etc/mongrel_runit
cp /srv/iclassify/examples/mongrel_runit_iclassify.yml /etc/mongrel_runit/iclassify.yml

change user and group to apache in

mongrel_runit -c /etc/mongrel_runit/iclassify.yml create
chmod a+x /etc/init.d/mongrel_runit
ln -s /etc/init.d/mongrel_runit /etc/init.d/iclassify
/etc/init.d/iclassify -v status

mkdir -p /etc/sv/iclassify-solr/log/main
cp /srv/iclassify/examples/solr-run /etc/sv/iclassify-solr/run
cp /srv/iclassify/examples/solr-log /etc/sv/iclassify-solr/log/run
chmod a+x /etc/sv/iclassify-solr/run /etc/sv/iclassify-solr/log/run
ln -s /etc/sv/iclassify-solr /var/service

sv binary is in sbin (in this centos install)
ln -s /usr/sbin/sv /etc/init.d/iclassify-solr

change JAVA_HOME to /usr/java/default
vi /etc/sv/iclassify-solr/run

solr logfiles are in

for apache:

add a /etc/httpd/conf.d/iClassify.conf

<VirtualHost *:*>
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/


./bin/icagent -d ./icangent -s http://localhost:5000 -n

to show the status

and if it fit your needs:

./bin/icagent -d ./icangent -s http://localhost:5000

now you are ready. log into the iclassify server and enjoy :-)

install the ssl for iClassify:


Interested in Cloud or Chef Trainings? Have a look at our Commandemy Trainings page. Need help migrating to the cloud? Check out Infralovers.

comments powered by Disqus
Blog Tags