We are building a solution that consists of a number of micro services, each of which is built and deployed independently. We are using TeamCity as the build platform and then Octopus Deploy with a number of environments.
For a simple lifecycle of Dev -> Staging -> Production, I would like Dev to be contineous deployment and Staging and Production to be a promotion of the release from Octopus Deploy. I can see how to complete this task project by project, however as the solution grows this will become an onerous task. Is there anyway within Octopus Deploy (including using the API) that I can identify all projects that have different version numbers between environments and promote all in one go ??
Thanks for getting in touch. It sounds like you’re modelling your solution with Octopus correctly. In my experience with Service Oriented Architectures and now Microservices, I would expect that each service can ship on their own cadence without requiring the other services to ship in lock-step. This is the kind of workflow Octopus supports out of the box.
As your solution scales it would be typical for a team to coalesce around each service, and expecting each team/service to walk in lock-step becomes painful.
To answer your specific question I would recommend using the API or Octo.exe and some scripting. The Octopus API is really good to use, and the Octopus.Client library makes coding the Octopus API really straightforward, and this gist shows how to create a Release with specific packages. The Dashboard is a really handy way to get an overview of what Projects/Environments are running which versions.
Something to be aware of is that the deployments will take some time, and there will likely still be a period where some services are upgraded and others are not, and they should still interoperate happily.
Hope this helps!
Thanks for the pointers, the links provided really helped.
I have now created a utility using the octopus api that lists the available projects and versions between environments, a single click now allows all projects that are behind on version number to be upgraded.
Fotunately the micro services are very small, so the actually deployment time is very quick. This means I don’t really have to worry about destabilising the application while deploying multiple parts. The only environment where this would be an issue is production and that can be done with a time scheduled deployment.
How did I ever manage software deployments without Octopus
I’m glad to hear you had success!
I’m looking for the same functionality, to promote multiple projects to the next environment.
I was wondering if you are willing to share your code?