Monday, February 9, 2009

CI : Continous Installation

In my first post I said that my company also wanted to use CCNet to place our programs at the servers of our customers (110+). Now this is possible because we also supply the servers (the customers lease them). Today we did our first test, and it looks very promising. For the moment we have about 15 servers installed (each customer has 1), so the sooner we get this procedure sorted out, the better. These 15 were manually updated, and it took about 20 minutes to install / upgrade 1 program per server. This is including the download of the software.
Now with CCNet installed at these servers, it costs us no time anymore. Well only a few minutes actually. This is how we set things up :
  • Whenever a program passes QA, we zip it and upload to an external FTP server
  • each server at the customers site monitors this ftp server, and downloads the new software : CCNet Project 1
  • the installation itself (unzipping and the like) is CCNet project 2, which responds only to a force build
  • and there is also a CCNet Update project (project 3) which contains a ccnet config file, so updating the CCNet servers at the customers is also automated

The only time we now have to 'spent' on installing new software at our customers site, is the time needed to upload it to the FTP server. From that point on, all the servers update themselves. Now this is a massive speed gain. For the moment we have 5 programs (Click-Once apps + WCF services + SQL Databases). So suppose we have to update these manually at once for all customers, it would take us : 5 * 20 * 110 minutes : 11.000 minutes, this is 183 hours corresponding to 7.6 days work (24 hour day). So even trying to do this by hand is ludicrous.
The positive (and also downside) is that this setup forces us to test every step extremely. If there is something wrong with the upgrade script : 110 customers on the phone, not good ;-) We do test the setup at a local spare server, before we press the force build button, just to make sure we do not commit suicide.
Another benefit of having CCNet at our customers server, is that scheduling is now very easy, suppose they want to have a certain report printed/mailed at 07:00, we just update the ccnet config file, upload to the ftp server, and presto : done.
This setup will also be a nice opportunity to check the dashboard, CCTray and BVC2 with a very large amount of CCNet projects. If these apps can handle this load, CCNet is a very stable program. If all goes well, I'll try to place the FTP stuff in the trunc, this will benefit other people as well.

No comments:

Post a Comment