Introduction
Welcome to another edition of Linux.Ars. We've been pretty busy here in the Orbiting HQ, preparing for the launch of Ubuntu Hoary this week. Our crack staff has still managed to assemble a top-notch volume of tidbits from around the Linux world.
In this issue we are taking a look at how to extend version control to automatically deploy your projects. We'll also be throwing away those extra peripherals and learn how to controlling multiple computers with a single keyboard and mouse. We're also taking a look at new ways of exploring our musical horizons. Fasten your seatbelt, young grasshopper. We're going for a ride.
Developer's corner: automating deployment with Subversion (SVN)
One of the challenges I've run across as a developer is automating deployment. As a freelance programmer I want the flexibility to work from where ever the tide takes me, be it the local WiFi-equipped Panera Bread or my basement office. A version control system is a good solution to that problem. I had used CVS before and was comfortable with it but I found something while reading Version Control with Subversionthat made up my mind: hooks.
Assumptions
Here's the scenario: I'm building a website. I have two web servers: one for development and one for production. I want my changes to immediately replicate to the development server so that once I'm satisfied that everything works I can push the changes to production, all with a minimal effort.
For the sake of this discussion, the development web is stored under /var/www, and the Subversion root is /var/lib/svn.
Hooks
Hooks are scripts that are run at various stages of the commit process. This allows you to add programmatically control, cross-reference, tweak, reject, or otherwise manipulate content that is being committed to your respository. This flexibility allows you to send change notifications via e-mail, restrict commit access by module and user or, as I'm using it, to automate the deployment of changes to a development site.