Register Tentacle without Thumbprint

Hi All

I am working on fully automated setup for new Tentacle registration.

I’d like to use the following script to register new Tentacles via API, instead of using Tentacle.exe.

Have someone maybe modified mentioned script by adding ‘/api/machines/discover’ functionality so there’s no need to provide the Tentacle Thumbprint manually?

Hi Marek,

Thanks for getting in touch!

There are two parts to the Tentacle setup, creating the instance on the tentacle machine, and registering the tentacle with the Octopus Server.

The script you are referencing only accomplishes the second part of this, it requires the tentacle instance to have already been created and the thumbprint generated.

There isn’t going to be a way to avoid using Tentacle.exe at some stage in this process, I’m curious as to why you would want to?

Best regards,

1 Like

Thanks very much for prompt reply @paul.calvert!

Let me give you some background to explain it :slight_smile:
I have to deal with very strict policies in the company where I work i.e. I am not able to run the PowerShell remote session, I am not able to logon directly to Production host etc.

I have to use additional tool to execute the PowerShell script remotely. The problem is that I cannot provide any additional parameters to the script i.e. all parameters like port number, home directory must be the hard-coded in the script. The creation of an instance is not an issue, as we want to have the same setting applied everywhere.

Only the registration of Tentacle cause some problems, as we have different roles, environments and so on. Adding new Tentacles via portal is a long process, if you have to add >30 VMs at once.

I’d like to use the mentioned script to register new Tentacles via API. I noticed that adding new Tentacles via portal does not require providing Tentacle Thumbprint. I am planning to modify the script by adding ‘/api/machines/discover’ functionality to simplify the process of adding new Tentacles.
though that maybe someone has done it already :slight_smile:

and sorry for my English, I am not native speaker as you probably noticed :blush:

Hi Marek,

Thanks for providing further details on this.

It does sound like ‘api/machines/discover’ will be the way forward for you. We haven’t had anyone add this to a script yet, unfortunately though.

If you are able to share your script after making these modifications I can have it added to the GitHub repository to assist others in the future.

Best regards,

1 Like

Thank you :slight_smile:

any idea why below code returns things like ‘Tentacle Name’, ‘Status’, ‘IsDisabled’ etc., except ‘Thumbprint’ which is empty? The API key that I generated has admin permissions.

$octopusApiKey = 'API-ABCXYZ'
$octopusURI = 'http://YOUR_OCTOPUS'

$endpoint = new-object Octopus.Client.OctopusServerEndpoint $octopusURI, $octopusApiKey
$repository = new-object Octopus.Client.OctopusRepository $endpoint


Please ignore the above message.

$repository.Machines.Discover(‘my_machine’,'port_nb).Endpoint.Thumbprint is working!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.