Depro.pl – Deployment & Configuration Engine

What is Depro.pl?

Depro.pl is a collection of perl and bash scripts that I wrote a few years ago. The basic aim of depro.pl is to deploy web applications directly from the version control system. It also applies appropriate configuration for the web application automagically.

Why Depro.pl?

Depro.pl saves me going through the trouble and hassle of manually uploading files via FTP. Even worse, if you change only a subset of a large web application it is a bit tedious to kepe track and upload just the change-set.

Additionally, there are different sets of configurations for a web application e.g. a set of configuration for your development machine and then a set for the production. Furthermore, if you have multiple development environments (like me e.g. Windows and Linux) or if you are running on multiple machines (laptop, desktop, etc.) or if you have a staging server for your application – the number of configuration sets explode and very soon become hard to manage. Depro.pl handles this gracefully without me worrying about this.

How?

Depro.pl doesn’t do anything fancy. It uses trivial commands like svn co, cp and hostname to do most of its work. It follows a pull-based approach which means that you have to run depro.pl script on the host you wish to deploy the web application. It then pulls it, builds it and publishes it.

A feature that I have been meaning to implement is to do remote deployments where instead of pulling and publishing on the same box it will actually publish it to a remote server via FTP / rSync (yes, most of the projects I have managed in the past had a Windows box to deploy to so FTP gives that nice fallback option). But this feature is not present yet as I don’t require it badly at the moment.

Here’s a simple work-flow of how depro.pl deploys:

For example to deploy FuzedBulb.com website (which is a wordpress-based site, atleast at the time of writing this page), I would follow these steps:

1. Check my code in the SVN repository (already there)
2. SSH into the box I wish to deploy (hosting or dev)
3. Run the following command:
    $ ~/depro.pl --project=FuzedBulb --default
and viola!

Interesting fact

Depro.pl creates a signature file so all of my projects that are deployed using depro.pl have that. If you hit <URL>/depro.txt you will be able to see the signature file. Works on this domain as well.

How cool is that! {:-)


Posts related to this Project:

[show-posts tagged=”depro”]