My question is, how do I version control the production environment in a good way?
This is our current environment:
- (Internal server) Development - Version controlled source code
- (Customer server) Acceptance test environment
- (Customer server) Staging environment
- (Customer server) Production environment
When we release new functionality for acceptance testing, we make a publish in Visual Studio, zip up the changes and apply them on the Test Server. There we make a backup folder (so that we can revert the changes) and we make a release folder so that we can move these changes to Staging when they're approved.
This is a lot of manual labour creating backup folders, release folders, recreating the directory structure and try to track what functionality that goes into what release. It is teadious and there is always problem with some developer not following the release procedure.
In theory I could make a repository for the test environment. (forget source code, this is about the published application) On every release the developer do a commit and supply a comment about the functionality he's releasing.
When functionality should be moved from Test to Staging we export changes made from the last date Staging environment was updated and copy them into the Staging application. There we do a commit that later can be extracted for release to Production environment.
The drawbacks of this is that using subversion will clutter the application with those .svn directories. This may be mended by disallowing access to those directories in the IIS or web.config. Another solution would be using Git on the directory above the root directory of the application. But Git is harder to work with for an unexperienced developer in a windows environment.
Does anyone have experience of this problem? How do you version control your production environment? What if you need to revert a release, do you have a backup folder that you created before the release?
I've discussed this with our developers, and they can't see any problem with using subversion for versioning and backup of the test/staging/production environment. Quite the opposite would they be happy not to create release/backup folders every time they need to release new functionality.
At the same time there is some insecurity about this. None have heard of this before, having the application in a version control system and we are unsure what the drawbacks would be.
If you have experience of a scenario like this, I would be happy to hear about it.
Mikael Lundin