Question
How much of the Web build process do you/should you automate?
And what is your system of choice?
Off the top of my head I would say that for a real one-step web 'build' the following steps would have take place:
- Take a source snapshot
- Change any config files for release
- Compress CSS and JavaScript
- Run tests
- Take a database snapshot (without test data)
- Move the source to the server
- Import a clean, current version of the database into the server
- Automatically confirm the 'build' was successful
Is there a system that does all of these steps?
Answer
Yes, in Ruby land we have Capistrano, which has "recipes" for executing shell scripts on your servers.
A typical recipe for deployment could to the following:
- check out the latest version of the source code on your production server
- have the web server direct all requests to a "upgrade in process" page
- take the application server offline
- point the current version to the latest version that you just checked out
- update the database
- restart the application server
- "ping" the application server to make sure the cache is primed
- point the web server at the app server
If anything goes wrong, it knows how to rollback to the previous version.
It's aimed at Ruby developers, but you could use it for any kind of Unix based deployment.
Also, whenever I check in source code to the server, the server automatically runs my tests, and sends me an email if any of them fail.
The Ruby and Ruby on Rails community are fanatical about automating things. E.g. there are also recipes for turning a clean Ubuntu install into a Ruby on Rails server with Apache, MySQL, source control, etc.
< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/369/" >How much of the Web build process do you/should you automate?< /a>
0 comments:
Post a Comment