Friday, February 13, 2015

"From complete chaos to Octopus Deploy" Part 5: The deployment process

Introduction to this blog series

How do you automate the non-existing deployment routines of an organization with over 100 different customers, each having their own environments? How do you convince the leaders, developers and customers to give you the resources needed in order to automate everything?  Is it really possible to introduce a routine that works for everyone?
Part 1: The trigger of change 
Part 2: Where to begin? 
Part 3: The basic concepts of Octopus Deploy
Part 4: Required application changes

The deployment process

If you've been following this blog series from the beginning, you'll remember that my goal for introducing Octopus Deploy was to create a "standard" deployment process for all our projects. That process would look like this: 
As I've explained in earlier posts, the point of this blog series is not to show you step by step how to introduce the same process, the point of this blog series is to make you understand which decisions you need to make if you want to automate your deployment routines and how you can get there. 

So far I've explained how I mapped our customer projects to the basic features of Octopus Deploy, creating a simple structure that would not require too much change in the applications involved. I've shown you the application changes we did have to make, and in this blog post I'd like to discuss the deployment process itself. In other words, I want to take a closer look at the last step in the diagram above: "Deploy project". I won't explain the three steps prior to "Deploy project" as the Octopus documentation explaines these excellently without my help. 
Let's get to it then! What would happen in the "Deploy project" step? As all our customers have a web application, my first answer what the the "Deploy project" step would consist of the following: 
1) Deploy the web application to the chosen environment, creating or updating a site in IIS at the same time
2) Warm up the web application by running a powershell script that makes a request towards the web application checking the HTTP status code returned
But then I started thinking about the customers that not only have a simple web application, but also for example a windows service, and this step would have to be included: 
3) Deploy and install windows service
And what about load balanced scenarios? They would have to repeat these three steps for each machine in the environment. So already, it's clear that coming up with a default set of steps that would work for every single customer is impossible. And I doubt the developers would be very happy if they were forced to follow a set process for every single project when the possibilities in Octopus Deploy are so many! 
So I introduced a "best practice" instead: 
- Anything that is logical to automate, should be automated.
- All web applications that are deployed should be warmed up before the deployment can be viewed upon as successful.
Apart from this, the developers are free to decide what will happen in the "Deploy project" step. If you remember "Customer C" from "Part 3" of this blog series, they have an ASP.NET MVC Application and a WebForms application, running in two different environments where one is load balanced. Their deployment process now looks like this: 

Another customer might have a totally different deployment process, where the release notes are emailed to the customer in the first step or where the server monitoring is turned off before the application is deployed. 
The important lesson learned here is that you cannot force one process on 100 different customers. The customers will have preferences as to how the deployment process should look, and so will the hosting vendor and the developers. So customizing a deployment process for each customer, using a set of "best practices" as a basis had turned out a great way to go in our case. Speaking of hosing vendors, we'll be talking more about them in tomorrows post: The hosting vendors 

No comments:

Post a Comment