Make the Blue/Green Model the Gold Standard of Deployment with Zero Downtime
In my mind zero-downtime deployment is the gold standard of deployment. Octopus should support this model to the fullest. Given proper tooling (in Octopus) this is very easy to accomplish for customers.
I think most ASP.NET apps should be deployed in the following way:
- Put the app behind a load balancer such as ARR (built-in and free)
- For each new deployment create a fresh IIS site
- Configure the site
- Request a configurable set of important URLs to start the site and warmup caches
- Validate, that those URLs return 200 and contain a given check string (a smoke test)
- If all is OK, switch the HTTP route to the new site
- After a few minutes the old app is drained. No more requests are in-flight
- After 20min IIS automatically shuts down the now idle old worker process but it stays functional
It should be possible to easily switch back to old versions. A history of N (= 10?) old fully functioning versions should be kept.
We accomplish: Zero-downtime deployments. Not even app startup time. Safe deployments because the stage site was smoke tested. Ability to rollback instantly. Those are very valuable.
Manually configuring a Blue/Green system is not enough. It should be integrated into Octopus and require minimal developer expertise. I want you to build and support this. I don't want to be able to make mistakes (for example by letting the B/G configuration diverge or by deploying to the wrong slot).
It should not be necessary to write significant amounts of own scripting code to accomplish things. Scrips are often broken and error cases are not well-tested. Building as much of this as possible into Octopus removes sources of errors and gives confidence. Confidence in deployments is very valuable to customers.
If Octopus can support this model with minimal developer effort and with a high degree of confidence then this is clearly the new gold standard of deploying in .NET. There would be no reason not to do this. Using Octopus becomes a no-brainer.
In fact it is hard to find an automated solution for Blue/Green style deployment right now. It has not been productized yet. That's what's prompting this feature request.

-
Lachlan Barclay commented
I would love this feature. I do it using custom powershell scripts and it's a real pain. Would be great if Octopus did it automatically. PS here's my article on it: https://lachlanbarclay.net/2017/12/deployments-with-zero-downtime-asp-net
-
Michael Frank commented
Blue / Green is not a gold standard. It's really not even very good at all. Using rolling deploys and selective traffic routing can achieve all the same goals with much less confusion and management headache. We tried the blue green thing and won't go down that road again.
-
Patrick Santry commented
Now if only you could tell me how to handle the database schema and content changes in Sitecore. Two databases, lock one as R/O?
-
Kevin Reed commented
Yes! Why are there not more articles/tutorials on "zero-downtime" deployment with ARR + PowerShell? I agree this should be "standard". This seems like a good starting point -- https://github.com/yosoyadri/IIS-ARR-Zero-Downtime