Automating Octopus Server Installation/Configuration

We use numerous client tenants for individual project deployments, each requiring their own Octopus Server. This has led to the installation and configuration of Octopus in each provisioned environment multiple times - something that I wish to automate.

I have reviewed the ‘Automating Octopus Installation’ article, which is great for getting the server installed itself. The next piece I’m looking to accomplish to is script out the server configuration:

  • Enabling Active Directory
  • Disabling default administrator
  • Creating Custom Teams
  • Creating Custom Roles
  • Modifying permissions for the above
  • Adding external users

There is a lot of GUI clicking to configure a regular baseline of settings. I’ve seen the API options, but these are mostly GETs and don’t serve to address the above. A few searches around these boards haven’t come back with promising results either.

Is there an option I’m missing to script out the configuration of the tentacle itself or does this remain a manual process? Any plans for integrating this CLI functionality in the future? Certainly an automation deployment tool is also subject to said automated deployment. :smiley:

Thank you for the consideration.

Hello @Sedge!

I’ve got a couple of links to share, as well as a question or two.

First things first - I’d recommend taking a look at this documentation around automating tentacle installation. It offers examples for modifying common configurations.

I’d also recommend taking a look at the API scripts repo, which contains common examples for REST API actions, including several of the items in your list. It may not be exhaustive, but can usually offer a good jumping off point.

Finally, I wanted to ask for a little clarification around something you said -

This has led to the installation and configuration of Octopus in each provisioned environment multiple times - something that I wish to automate.

Are you saying that you’re configuring multiple Octopus servers? Or configuring multiple tentacles? Wanting to understand your use case so we can find the best solution for what you’re wanting to achieve.

My apologies, as my terminology may be off.

I would be referring to the configuration of multiple Octopus servers. So when I receive a new tenant, I need to install/configure a new Octopus server to manage the tentacles within. My goal is to limit the GUI interaction during the course of baselining these installations through Teams/Roles/User setup.

Thanks for clarifying - unless you have specific reasons/use cases for doing so, I wouldn’t recommend using an instance per tenant, as it quickly becomes unwieldy to manage (as you’ve no doubt seen).

Have you taken a look at the tenancy features within Octopus? They help make managing multiple tenants significantly easier, which allows you to use one Octopus Server configuration, and handle all of your tenant complexities inside that single instance. There was also a recent webinar on improving multi tenancy in Octopus, which may help provide some more specific examples of how the use cases play out.

If you need an instance per tenant (for regulatory or other reasons), I can try and help pinpoint some specific API scripts that will help with configuration, but the hope is that the existing multi tenancy support in Octopus will be enough to meet the needs of most use cases. Happy to discuss more if you run into questions!