Ideas for managing variables in multi-tennent environment

We have 15 to 20 customer environments (a mix of prod, UAT and testing environments for several different customers, some on the same physical machines, some on different ones). We are using the environment-per-customer mult-tenant concept ( as described here http://docs.octopusdeploy.com/display/OD/Multi-tenant+deployments).

This mostly works well, but we experience pain around managing variables. Since we have around 15 to 20 variables in our project that differ according to environment, dumping all the variables in the variables page of project and scoping by environment is not manageable. Instead, we create a variable-set per environment and scope each variable in a particular variable set to the same environment. So for example, we’d have a variable set called CUST_A_PROD and CUST_B_PROD and CUST_B_UAT. All variables in CUST_A_PROD variable set are scoped to the customer A prod environemnt.

This feels “hacky” because
A) It’s easy to forget to scope correctly.
B) It’s difficult to manage adding/removing variables if I change something in a step in the project
C) You can’t clone a variable set
D) I’d LOVE to be able to check in variables into source control so we can better changes on them

I know there are users out there who deploy with many more environments that we do. How are people managing their variables?

One idea I had was to put all my variables in a json file or something, check the file into source control, load them in in the first step using some powershell to parse the file and use Set-OctopusVariable (https://octopusdeploy.com/blog/fun-with-output-variables) and refer to the variables set in first step in the rest of my steps. But I haven’t come across anyone doing anything like that. Thoughts?

Hi Kneumei,

Thanks for getting in touch! Currently everything around multi-tentancy is ‘hacky’, as we have solutions to solve it in the current Octopus functionality, but right now it is not a specific feature.
That is planned for 3.1. Here is where majority of the comments are for the feature: http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/5730598-support-tenants-as-a-third-dimension-to-deployment (You don’t have to vote, it’s already planned).
But once we are past our 3.0 launch we will have an RFC blog post about our proposed solution, so please watch out for that.

Hopefully you won’t have to even consider these options and it will feel much easier to manage and maintain once we have this feature.
Vanessa