Skip to content

Instantly share code, notes, and snippets.

@jhorsman
Created October 10, 2017 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhorsman/44bdd18cfcbe1b7c03bec4e005692d11 to your computer and use it in GitHub Desktop.
Save jhorsman/44bdd18cfcbe1b7c03bec4e005692d11 to your computer and use it in GitHub Desktop.
Batch script to set up an Octopus Tentacle on an application server. This can be used while provisioning a web application server.
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" create-instance --instance "Tentacle" --config "C:\Octopus\Tentacle.config"
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" new-certificate --instance "Tentacle" --if-blank
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance "Tentacle" --reset-trust
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance "Tentacle" --home "C:\Octopus" --app "C:\Octopus\Applications" --port "10933" --noListen "True"
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" service --instance "Tentacle" --stop
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" polling-proxy --instance "Tentacle" --proxyEnable "False" --proxyUsername "" --proxyPassword "" --proxyHost "" --proxyPort ""
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" service --instance "Tentacle" --start
REM "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" register-with --instance "Tentacle" --server "http://octopus-server:81" --name "app-server-1" --comms-style "TentacleActive" --server-comms-port "10943" --force --apiKey "API-SECRET" --environment "Development Staging" --role "web-server" --policy "Default Machine Policy"
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" register-with --instance "Tentacle" --server "http://octopus-server:81" --name "%COMPUTERNAME%" --comms-style "TentacleActive" --server-comms-port "10943" --force --apiKey "API-SECRET" --environment %1 --role "web-server" --policy "Default Machine Policy"
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" service --instance "Tentacle" --install --start
@dil-lfoldes
Copy link

Order of operation become somehow important now. If your aim is to create a Polling Tentacle and you run a --trust before the -register-with then the installer will create a default Listening tentacle and won't remove it even you set it to Polling.
The result is a Tentacle that both listens and polls at the same time (according to the GUI client).
So the correct order is:

  1. configure reset-trust
  2. register-with
  3. configure "noListen" and "--trust"

The code you pasted above is what the installer shows you after you have manually clicked through the installer. However the above syntax contradicts the manual, which shows that to set a VALUE to a parameter, the equal sign should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment