Reputation: 2044
I have an application consisting of an ASP.NET web application, a couple of Windows services, and a SQL Server 2005 database. This application is replicated at several sites, so that each site has a server containing all parts (web app, services, & DB). Currently the process for deploying updates is this:
Currently there are 3 sites and deployments are annoying but manageable, however within the year we will most likely have 10 or 11 sites and having to deploy updates this way would make me suicidal.
So, I am looking for suggestions on how to automate this process. I have started looking into learning MSBuild for merging configurations and copying files out to my servers, but I'm not sure how far it will take me. Thanks.
Upvotes: 7
Views: 762
Reputation: 11
For database development try http://www.deltasql.org/wiki.
There is a central server (in PHP/mySQL, can be easily installed with the XAMPP package) were you store your SQL delta scripts. On each of your schema you need to add a table tbsynchronize which contains the latest script executed on that database. deltasql server then generates a synchronization script which contains the missing scripts for that schema.
Upvotes: 1
Reputation: 1777
MSBUILD can pretty much do all you need. But it sounds like you would need some custom tasks to do it completely automated. But it is possible with a little effort.
MSBUILD is actually already apart of your project. It is the project file itself. It basically is XML behind everything. And in this XML there are PreBuild and PostBuild events that get fired and you can essential do copy, paste commands and the like.
Also you might be interested in Web Deployment projects that allow you to have multiple web.config files for each enviroment you are building to.
For more advanced scenarios you can create your own custom tasks that integrate with MSBUILD's events. You can even use conditions with these tasks. The reference below talks all about it.
For more info on MSBUILD, go to http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx
Upvotes: 2
Reputation: 161773
You could use deployment projects and web deployment projects in Visual Studio to create .MSI files to do the installations. You could even prompt for some of the information that might differ between the sites.
Also, take a look at the IIS Web Deployment tool. It's just recently gone RC1.
Upvotes: 0
Reputation: 309
Ok, so I don't have a full answer, but why do you uninstall the services. You can just stop them and replace the files. I do this all the time. But I would like to see the answer you get as I have this same issue.
Upvotes: 0
Reputation: 60003
Take any script language you are comfortable with (looks like even .bat would work for you) and get PsTools
You can then use psexec and psservice to control processes and services remotely. You'll still have to write the scripts yourself but you won't have to login remotely (eg. to unzip and copy the files) and what works for one server will work for 10.
Upvotes: 5
Reputation: 31921
Automate and script as much as you can, even the FTP part. Use ant/nant and batch files to do the repetitive stuff for you. If possible provide undo scripts for when things get bad. I update production code within 3 seconds in linux boxes (with a scripted process: backups, delta sql scripts, release code, restart servers) but on windows I'm not sure how neatly you could do that.
Upvotes: 0