it’s a dev environment so I drop and recreate the VM
Can I install tentacle in such a way that Octopus thinks it’s the same VM that was there before? I’d like to avoid having to register a new instance of Tentacle with Octopus as this is an operation we do a lot in our development environments. It would help us avoid losing roles and other configuration already assigned to the Tentacle instance in Octopus.
Thanks for reaching out! When you register a Tentacle against an Octous Server, it uses the certificates created for that particular VM to do so. A new VM simply can’t impersonate another VM (for security reasons).
The easiest thing would be to avoid relying on variables/steps scoped to that particular VM/Tentacle, and instead scope everything to a combination of Roles and Environments. The new VM can very easily have the same Environment/Roles combination as the previous one, which would make it really easy to become the new replacement.
Right- I get that. For that reason we store the certificate and thumbprint
for each node as we create it.
Let me describe our scenario a little further.
We have a set of metadata that describes an environment. It includes all of
the nodes in that environment along with any additional metadata required
by external tools.For Octopus, this includes the certificate and the
thumbprint for the node. A development team can at any time rebuild their
environment. This means that all nodes in the environment get dropped and
recreated from scratch from their base VM images. Step 2 is to install
Tentacle. As far as we are concerned this is the same VM. We’d like to just
treat it like the machine is back online. If we can just put the cert and
thumbprint in a specific spot on the machine to tell Tentacle who it is,
that would be ideal.
Sorry, it totally forgot to mention that if you pass --force to the register-with command, you can register another VM as an already existing Tentacle. So in your case you could keep registering different VMs as the same Tentacle, and each time It’ll override that tentacle config to point to your new VM.