2021 update

Today I'm using Ansible for this and other devops tasks. Along the way I've experimented with Chef, Puppet, Saltstack and Docker images, but I've found that for me, as a solo developer working in smaller projects, a lightweight tool like Ansible is a great fit.

Original question (from 2011)

I'm starting out as an independent web developer and I recently scared away a client by giving a quote for a rather simple site that was quite a bit higher than they expected. It was basically brochureware that they could have done themselves in a hosted solution like Wordpress.com or Google sites. Except for one critical feature, that made me think that Django would be a nice fit, and that some proper web development could be motivated.

When looking at the tasks I've listed in my rough estimate it's pretty obvious to me that most of the hours in there are stuff that is not specific to this clients website. This got me thinking that I should have a script to automate the process of setting up and deploying new Django projects.

A couple of things would still have to be done manually like:

  • Set up a new VPS (or in most cases just go with virtualhosts on an existing VPS).

  • Edit DNS settings to point clientsdomain.com and test.clientsdomain.com to the new VPS.

  • Set up SSH-keys

  • Edit a config file.

The script would then do stuff like:

  • Install some required packages on the new VPS

  • Install default a iptables firewall on the new VPS

  • Add nginx/apache config for clientsdomain.com and test.clientsdomain.com

  • Set up new up databases for production and test on the VPS and for development on my local machine.

  • Create a new Django project and put it on Bitbucket.

  • Set up settings.py

Edit
Report