Managing large number of environments to the same machine
samjudson
Posts: 16
Hi
I wondered if anyone could help.
We have a large solution which contains multiple components (2 web sites and various services).
The same solution is used to deploy 5 different 'projects'. This is handled via different config files and various XML transformations as part of the build process. We also have multiple environments that we deploy to (Alpha, QA, Beta etc). Each project is basically a geo-location version of a web site with different features etc.
We have a configuration setting for each project/environment pair, e.g. ProjectA-Alpha, ProjectA-QA, ProjectA-Beta, ProjectB-Alpha etc.
In deployment manager we have had to set up a single environment for each project/environment pair so that the configuration transformations happen correctly. This means that Project A deploys to ProjectA-Alpha, ProjectA-QA etc, even though they are the same target machine (e.g. IIS-1, SVC-1 and SVC-2 for example).
What would be really helpful is if there was a way to overwrite the configuration transformation setting as a variable, or to be able to update the RedGateEnvironmentName as part of the release.
We are currently adding Project 5 to the mix, meaning we have 5 projects and hence 15 environments (Alpha, QA and Beta for each), even though we only have 3 actual target machines.
Anyone any ideas on how we might manage this, or if this could be added as a new feature to deployment manager?
I wondered if anyone could help.
We have a large solution which contains multiple components (2 web sites and various services).
The same solution is used to deploy 5 different 'projects'. This is handled via different config files and various XML transformations as part of the build process. We also have multiple environments that we deploy to (Alpha, QA, Beta etc). Each project is basically a geo-location version of a web site with different features etc.
We have a configuration setting for each project/environment pair, e.g. ProjectA-Alpha, ProjectA-QA, ProjectA-Beta, ProjectB-Alpha etc.
In deployment manager we have had to set up a single environment for each project/environment pair so that the configuration transformations happen correctly. This means that Project A deploys to ProjectA-Alpha, ProjectA-QA etc, even though they are the same target machine (e.g. IIS-1, SVC-1 and SVC-2 for example).
What would be really helpful is if there was a way to overwrite the configuration transformation setting as a variable, or to be able to update the RedGateEnvironmentName as part of the release.
We are currently adding Project 5 to the mix, meaning we have 5 projects and hence 15 environments (Alpha, QA and Beta for each), even though we only have 3 actual target machines.
Anyone any ideas on how we might manage this, or if this could be added as a new feature to deployment manager?
Comments
I think your best option here would be to use a Deploy.ps1 PowerShell script to modify the necessary config files. PowerShell scripts can make use of the values in deployment variables, and can be used to modify XML files.
Redgate Software
Plus deployment manager does such a good job of transforming the config files (plus other xml files) automatically it would feel a bit of a waste to replace all of that functionality with something I had to write myself.
- PreDeploy.ps1 - you could swap in different transform files based on the value of a variable here. This would effectively give you what you want - the ability to change the transform file based on a variable value.
- XML Transformations for large-scale per-environment changes
- Then Variable substitutions in appSettings and connectionStrings - these can obviously be based on more than just the environment name.
- Finally, Deploy.ps1 can perform XML operations directly on .config files using the PowerShell XML APIs
Hopefully combining these should get you what you want. If you need more than this functionality, please add a feature request in UserVoice.Kind Regards,
Mike
Redgate Software