Application Deployment at Rapleaf

One challenge we constantly face at Rapleaf is how to remain agile as we grow. In the early days, we would say “I’m going to deploy” to a handful of other engineers in the room. When we needed to move beyond that, we designed a deployment system with 3 key objectives:

    Remain agile. Engineers should be able to deploy as frequently as they need to.
    Communicate. Other engineers should know when a deploy is about to happen and when it is finished.
    Must be robust. Have access controls, prevent multiple deploys and check for common problems.

We were able to create a simple deployment system using Screen, CruiseControl, Capistrano and Openfire (Jabber). Screen was an obvious choice when we considered all of our requirements. Before screen, we all deployed from our local machines. There were a couple of problems with this: many people could deploy at once and their environments could be different. Using a shared screen on a single machine solved both of these problems. Screen also has access controls, multiple windows and scrollback history. We have a window for each application and our screenrc file looks something like this:

shell -${SHELL}

# Set status line
caption always "%{B}%t deploy %{R}REMEMBER TO 'svn up' %{B}%? @%u%?%? %{d}[%h]%?%=%D %M %d %C %A"

# command usually invoked by C-a " would also be available as C-a space
bind ' ' windowlist -b

# Create a screen window per application
screen -ln -t "app1" -h 5000 1
screen -ln -t "app2" -h 5000 2

# Allow multiple users to connect
multiuser on

# Engineers that can deploy
acladd engineer1,engineer2

CruiseControl is a great continuous integration tool. We always specify a revision when we deploy, so we can easily check cruise to make sure that the revision has passed the test suite.

Capistrano is the basis for all of our application deploys, including java apps. We identified several functions we wanted to perform in every deploy and put those into a common library. Those common functions include: notifying a jabber conference room on start/finish, running a sanity check on revision being deployed and dealing with our load balancer. Capistrano has many other nice features that we use, but I won’t go into that here.

We’ve been running this system for a while and really like it. We were able to meet all of our objectives with a simple design and some great open-source tools.

This entry was posted in Operations and tagged , , , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>