Friday, November 4, 2011

Continuous Deployment

In this blog post I will illustrate how effrafax.org is able to continuously integrate improvements to the website.

Continuous Deployment is the process of delivering qualitative updates to a product as soon as the updates are available. It stands in stark contrast with other update schedules. A well known example is Google Chrome. The Chrome browser automatically updates to new version whenever it detects that a new version is available. It is possible to apply Continuous Deployment to a website.

The process of continuous deployment is used to update the contents of effrafax.org. In this blog post I will outline the specifics how this feature is accomplished. It relies on the following technologies.

  1. git
  2. cron

The pivot of continuous deployment of effrafax.org is git. Git is a distributed version control system. It is used to track the changes to the website. Github is chosen to host the master repository. The convention is used that a push to master means a deliverable change to the website.

Cron is time-based job scheduler. It executes a certain script at regular intervals. It is used to regularly poll the master repository for new changes on the master. Below is a sequence diagram that illustrates the process.

The developer makes some local changes to the website, but is not ready to push them to master repository. The cron deamon periodically executes the update command. Because nothing has changed it will have to wait another round. This time the developer makes some local changes and decided it is time to deploy. The changes get pushed to the master repository. The cron deamon executed the update command which pulls the changes in. Eventually the changes are incorporated in the server.

This blog illustrated the mechanism of continuous deployment of the effrafax.org website.