I am trying to get my head around how best to define variables for Tenants, specifically trying to deploy IIS Application where I need to provide an ApplicationPool Name, Custom User Account and Password.
Each Tenant will have an ApplicationPool of their own, and this will run as a Custom User, again a User per Tenant, but also a different User per ‘tier’.
If in UAT Environment my WebServer wants to use
- an application pool called web-tenent1-ap
- as a user web-tentant1-u
- password web-tenant1-p
and likewise the AppServer might use
- app-tenent1-ap
- app-tentant1-u
- app-tenant1-p
So I create a variable set, use Variable Templates and perhaps have the following:
- Tenant.WebServer.ApplicationPool
- Tenant.WebServer.UserName
- Tenant.WebServer.UserPassword
- Tenant.AppServer.ApplicationPool
- Tenant.AppServer.UserName
- Tenant.AppServer.UserPassword
Seems painful as I can’t provide Tenant level ‘Scope’ to say 'it is this for Role WebServer and this for Role AppServer - like I can scope things in a project. But even if I could use Scope - I would want it to know that I ‘must’ provide a value for each scope (like it knows I must provide a value for the variable)…so not sure how it would know that it needs a password for WebServer and AppServer.
The reason I am having this issue is mainly because the IIS Web Application Step Template will not let me just say “use an application pool called this” - it want to create it…and to create it I needs to know stuff I’d rather not know.
Additionally - the problem seems bigger if the value differ by Environment - in a Project I can Scope a variable by Environment, but once Tenants are involves I can’t do that. I would need to have a Variable per Environment if I wanted to provide the value on a Tenant specific basis.