We're looking to automate our deployment of Web Applications, particularly when going from local development to a remote server.
Our current stack is LAMP remotely, MAMP locally, but I'm interested in general what people are using for this task regardless of their environment?
I'm not just talking about moving files around, I also meant considering other tasks such as:
When and where possible, I prefer an automated deployment such as with Ant, even FTP deployment can be fairly easily handled. Automating the deployment, much like an automated build, takes the guess work and error out of the process and by definition provides at least the bare minimum documentation necessary (i.e. the build script) for a new programmer to understand the process.
One of the things used in a previous company was - believe it or not - RPM files. When we built our software, all the various parts of it would be packaged into RPM files, which were then deployed to the server.
RPM is a horrific hack, but as our clients were all running Red Hat Linux (by our requirement), it made perfect sense. If I had a choice, I'd go with a system like Debian or Ubuntu, and set up a repository that the systems could all pull from. Still, it worked well for hundreds of clients, with thousands of servers total. Pretty neat.
We use "svn export" when it needs to go live. Keeps our code under revision control, and lets us actively develop it on test boxes or our local computer.
I haven't tried it yet but I'm looking at using Fabric in future:
Fabric is a simple pythonic remote deployment tool.
It is designed to upload files to, and run shell commands on, a number of servers in parallel or serially. These commands are grouped in tasks (regular python functions) and specified in a 'fabfile'.
It is a bit like a dumbed down Capistrano, except it's in Python, dosn't expect you to be deploying Rails applications, and the 'put' command works.
Unlike Capistrano, Fabric want's to stay small, light, easy to change and not bound to any specific framework.
Capistrano works very well for this kind of thing. It came out of the Ruby on Rails ecosystem, and was initially very strongly tied to deploying Rails apps. Since a lot of people had noticed that it was handy for remote server control, it's become a bit more general-purpose.
With no extra setup, Capistrano:
And all this with rollback functionality.
Another good option would be to use your operating system's packaging system (RPM, deb/apt, etc). This tends to require a good level of familiarity with your operating system and its policies, but fits in great with other tools if you know what you're doing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With