June 7, 2007 at 2:44PM Yet another reason to use proper configuration management
Here’s an object lesson why configuration management is a good thing and why you should be using it even if you don’t think you need it.
When I started working with Blacknight, I made sure that all the company’s code was put into a revision control system (we use Subversion at work, and I use SVK for my own stuff at home) and that we had proper deployment scripts so that if something did go wrong with a deployment, it could be rolled back and fixed.
Maybe that big safety net makes a person a little too secure.
Every Wednesday, I spend some time cutting code for a client of ours. Said client doesn’t think source control is necessary so, in spite of my protestations, I end up working on a development site.
That’s all well and fine, if somewhat unnerving. Sure, don’t have the comfort of the big undo button if something goes wrong, but I’ve worked without it in the past, so I figured I could get on fine for now.
Last night, I brought a copy of the development code and the live code home to reconcile the two and make absolutely sure that nobody had made any changes to the live site without my knowledge (in spite of asking if anybody had) and merge any changes that had been made to the live site into the development one. Of course, I found some and so I merged them in.
And so this morning I went to upload the reconciled version up to the development site. Now, had this gone as planned, I wouldn’t be writing this. I ended up overwriting the live site. Panic ensues, but I manage to get everything working fine pretty quickly.
So, how would proper use of configuration management have avoided this? Firstly, I’d never have had to manually merge the changes that had been wrongheadedly been made in the live version back into the development version. Secondly, I would have been able to roll back to the previous live version when I realised what had happened. And thirdly, I’d have half a chance at collaborating successfully with others because I wouldn’t be afraid of overwriting their changes.
Seriously, if you’re not doing configuration management, or at the very least using a decent source control system, you’re juggling live grenades, and it’s not nice when one of them goes off.