Install Octopus Server remotely in a hands-off way

Hey Octopus team,

My project’s very invested in setting our infrastructure up in a reproducible, hands-off, configuration-as-code way. I guess it’s a bit of an edge case to be automating the install of a deployment server, but I was wondering if there’s any resources out there for how to do that, of if the Octopus team have reference or ideas on best practice for how to go about it. As a mostly-Linux-based creature I’d love to see the Windows way to do things.

Specifically, I couldn’t find reference on:

  • Is there a command that’ll print to the database Master Key to standard out, or a way to nab it from a file?
  • Is there a list or reference guide to the parameters that Octopus.Server.exe takes
  • What exactly the --console flag does (the ‘automating tentacle deployment’ page says “make sure to add --console at the end of each command to force Tentacle.exe not to run as a service”… but adding it to Octopus server installation commands starts it as a service)

For reference, there’s a chunk of Powershell attached here that can stand up a working installation, but not yet retrieve that master key or set up SSL.

octopus_configuration_ini.ps1 (1 KB)

Hi,

Thanks for reaching out. Let me give you a hand with those questions:

  • Is there a list or reference guide to the parameters that Octopus.Server.exe takes

Running .\Octopus.server.exe help will retrieve all the commands available. To get the full help for each command run .\Octopus.server.exe help <command>

  • Is there a command that’ll print to the database Master Key to standard out, or a way to nab it from a file?

This doc shows how at the bottom http://docs.octopusdeploy.com/display/OD/Security+and+encryption

  • Setting up SSL from cmd line

If you follow all the steps to add an SSL certificate from the Octopus Manager(see documentation), right next to the Apply button at the end of the wizard you’ll see a Show script button that will give you the necessary commands to make all those changes. See attached screenshot for a better reference.

  • What exactly the --console flag does (the ‘automating tentacle deployment’ page says “make sure to add --console at the end of each command to force Tentacle.exe not to run as a service”… but adding it to Octopus server installation commands starts it as a service)

Which command are you running with the --console flag that you say is being executed as a service?

Hope that helps,

Dalmiro