Created
October 10, 2017 08:43
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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.