How to divide a large space into smaller parts in most effective way

our Octopus instance has a single space. We want to split this monolithic structure into smaller parts. Our Project Groups represent teams, so each Project Group should be moved into separate Space. I wonder how do this in effective way. Also each of this Space need to hold same infrastructure, tenant and library configuration. We currently take into consideration:

  • Use Terraform provider and configure each space with minimal manual configuration
  • Use PowerShell and Octopus.Client.dll and copy projects (if possible)

Any of your advice will be valuable.

Best regards

Hey @Piotr, thanks for reaching out!

The best way to do this in Octopus today is utilizing the project import/export feature. This feature requires that you be running Octopus Server 2021.1 or later, but is immeasurably easier than prior patterns for moving projects!

The benefit of approaching it with project import export is that a lot of the items you’re using today (like library variables, tenants, etc.) are all migrated as a part of this process. The biggest challenge will be moving the infrastructure - however, we have a separate utility called SpaceCloner that supports moving these with some simple parameter setting.

Beyond the above mechanics of actually moving things around, you can absolutely use the Octopus Terraform provider to start enforcing base space standards if you have a lot of shared items to keep in sync between spaces. I’d recommend taking a look at the documentation for the Terraform provider to start understanding how those resources are structured and how the provider is configured. If you have additional concerns or run into more questions, please don’t hesitate to reach out - we’re happy to help!

Hello @cory.reid,
thanks for your quick response.

I have a question related with workers. How can I automate configuration workers in each space ? Terraform provider only contain worker pool resource. Why worker machine cannot be configured by terraform provider ?


Hey Piotr -

The Terraform provider does not currently allow for defining deployment targets. Workers, while they perform different functionality, are essentially installed Tentacle services configured as a worker instead of a receiving target.

The good news is that you can use the same script from SpaceCloner to copy worker registrations too -

The script CloneTentacleInstance.ps1 was designed to solve those use cases. It will go through all the target and worker registrations for the tentacle and clone them for you.

Running the script on the machines that have worker registrations should configure those workers across your spaces. If you run into any issues, let me know and we can work through them!