Thanks for getting in touch. This is actually ‘by design’, though I admit the design isn’t very obvious.
When you create a release, it takes a snapshot of your Steps and Variables - that way if you ever re-deploy an old release, you’ll have the same Step and Variables settings. So adding another machine requires a new release to be created.
This isn’t ideal, so I have a solution that I’ve been thinking about and will prototype this weekend. Instead of mapping Steps to Machines, you’ll assign a Machine a set of user-definable “roles” (e.g., ‘web-server’, ‘db’). Then when you define a step, instead of selecting machines, you’ll select roles.
This way you can add/remove machines, while the Release can continue to be a snapshot of the Steps and Variables as-at the time the release was created.
Hi Paul,
thank you for your quick response.
I’ve understand your point of view, but I think that the actual behavior is extremely risky: what happens if I MUST replace a machine because it’s broken / old / etc?
Your proposed solution seems to solve the issue, but please consider another (to be fair, much less common) scenario: what happens if I decide to add an environment to an existent project?
Actually there is no way to deploy an old release to the new environment…
I’m going ahead with this design (machines have ‘roles’, steps and variables are mapped to roles and not individual machines). I’ll attempt it after the next release.
I’m hesitant go much further and allow the variables of a release to be updated, because it makes it harder to track the promotion process properly. It seems wrong to present release 1.0 as being ‘promoted’ from Staging to Production when the variables were radically updated between staging and production.
Rather, the ‘right way’ (to me) is that you would create a new release (‘1.0-patch1’), select the same packages versions, and deploy that to production (or better, to staging again and then promote to production). Then it becomes clear that there’s a difference between the 1.0 deployed to staging and the one deployed to production. But I am open to being persuaded on this
We are having the exact same issue as Manuel is. Have you implemented this change request? Because this limitation will be a show stopper for us as well.
Thanks for getting in touch. I’m actually going to be working on this over the next couple of days.
For now the temporary workaround is just to create a new release in Octopus (using semver tags, like 1.0.0.0-patch1) using the same set of package versions.
There more serious variant of this issue is that I am unable to deploy an existing release to a new environment. Instead I am forced to create a new release simply because this environment did not exist at the time the release was made. Adding a new environment and pushing an existing release out to that environment should be a handled scenario without the above mentioned work-around.