The Azure Cloud Service Swapping functionality in Octopus does not seem to work. I have a service and when I deploy I want to:
- Deploy to Staging
- Wait until all instances are running
- Swap Production and Staging
- Stop or Delete the Staging deployment.
Firstly, it appears that the Staging and Production deployments must have the same deployment label in order to be swapped, which will never happen, because I deploy a new version to Staging.
Secondly, it doesn’t wait until all instances are running, which defeats the purpose because Staging is there to provide a no-downtime deploy.
Thirdly, when I choose to deploy to staging the functionality to inherit the instance count from the existing deployment does not seem to work because it looks at the staging slot (where nothing is deployed) and determines that it has nothing to inherit from. It should pull the Instance Count from the Production deployment, then deploy to Staging with that instance count, then swap.
I found this discussion (http://help.octopusdeploy.com/discussions/problems/14405-azure-swap-doesnt-seem-to-work) from a couple years ago that suggests that I need to create a Staging and Production environment on my service, but that does not really make sense. Staging and Production are not separate environments. They are the same environment, but they exist to allow us to deploy with no downtime. My current configuration is to have a Test and Prod environment, each with their own set of Cloud Services. I deploy to Test (Deploy To Staging/SwapDelete/Delete Staging) then promote to Prod (Deploy To Staging/SwapDelete/Delete Staging to a different cloud service). Would I really have to have different projects for each environment if I wanted the swapping to work automatically?
Maybe I just need some help understanding how I am supposed to configure my projects. I don’t think I am doing anything that complicated.