Deploying to transient targets

This is a follow on from this post: http://help.octopusdeploy.com/discussions/problems/43726-adding-tentacles-during-deployment

I’m spinning up brand new machines in environments from nothing, during this process the VM’s auto install and register the Machines/Tentacles and Roles are added to the Machines (with the intention of deploying packages to them in subsequent steps of the same deployment). That’s all fine. The problem is you cannot specify “Roles” that haven’t been created yet (they’re created dynamically during deployment).

For example, I cannot add a Role to the “On behalf of target roles” section of the “Health Check” step because their are no Machines/Tentacles or Roles in the Environment yet…

As a work around, I need to create the Role on an existing Machine (in this case the OD Server Machine) before I can add it to the “Health Check” step (or subsequent deployment steps), then remove the Role from that existing Machine before deploying (and spinning up the new Machines).

It’s not a huge problem (especially since I have a more than adequate work around), but I know I’m going to have to use that work around for all my “transient target” deployments, maybe others will too?

Does that all make sense…?

-Tim

Hi Timbo,

Unfortunately, as you’ve found, roles are only stored against machines, rather than being first class citizens themselves. About the best workaround for now is the one you’ve found, though I’d probably suggest trying a non-existant machine rather than the Server itself (ie, maybe add an SSH target or something called “FakeMachineForRoles” that you know will never be there) to prevent deploys happening against the wrong target.

We have quite a few role related suggestions on our UserVoice site, but this suggestion is probably the most relevant. As we use UserVoice for prioritisation, I’d suggest adding your votes (and potentially a comment) to that, so we can take it into consideration.

Hope that helps!

Matt