Hi Sean,
Thanks for getting back. I think this is still exactly what Tenants has to offer. Perhaps I can provide you with some more examples relating to what you are trying to achieve.
You mention the desire to keep your environment simple. Smoke -> QA -> Test -> Prod
.
Lets assume you create those four environments and we can build up from that.
Say you have three applications built and ready to go, lets call them App1 - App2 - App3
.
Now, lets assume you have 4 different customers receiving these applications, and you need them to be hosted in separate directories with separate configurations. They will still need to be promoted through your four environments but remain individually customised for each customer(Tenant).
Using Tenants here, I would create a single Tenant for each instance of the application, or Customer, however you look at it. Tenants is more just the label we use to represent the instancing of a single project/application on the same target.
Say I have four customers, named Tenant-A - Tenant-B - Tenant-C - Tenant-D
.
So I create a single Tenant for each of my customers. After I create my Tenants, I connect them to each project that those Tenants will receive and define each Environment that application will be able to be deployed to. For the simplicity of my example, lets assume each Tenant will receive all three of our apps and be deployed to each Environment.
Now, I want to implement some configuration changes which will need to be different for each Tenant and different again depending on which Environment they will be deploying to.
Lets start with App1
.
Inside of the project App1
I will create a Variable -> Project Templates. This is called a Project Variable Template. This is essentially a Tenant Specific Variable.
So I need to be able to connect to a unique SQL Database for each Tenant and Each environment. I can set this up here by defining how the variable will look. Give it a name, some helpful information to identify what it is for and assign a variable type. I assume just a single line text box where I can put in a connection string for my Database.
Once that variable is created and saved, and assuming this application is connected to the Tenant, you can open the Tenant and browse the Variables tab from within the Tenant.
This section is where you are able to define a value for your connection string variable you created. You have the option to enter a different value for each Environment in the Project’s Lifecycle.
Now assuming you do this for each variable you need defined between your Tenants, you can have a single project where you only need to reference these variables once. Deploying App1
to all four Tenants into the Smoketest environment will reference the connection string value on a per-Tenant and per-Environment basis.
Creating four different deployment tasks which will deploy App1
separately and dynamically to each Tenant.
I’m sorry this explanation turned out to be so long. And I really hope it addresses your questions on how to achieve what you are after here. I strongly suggest you carefully read through our Tenants documentation as it has a wealth of information and examples on how you can use Tenants to achieve the setup in your example.
If I have missed something here or you have any questions at all, please do not hesitate to let me know.
Best regards,
Daniel