Red Gate forums :: View topic - Managing large number of environments to the same machine
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Managing large number of environments to the same machine

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
samjudson



Joined: 14 Jan 2014
Posts: 8

PostPosted: Mon Aug 18, 2014 12:01 pm    Post subject: Managing large number of environments to the same machine Reply with quote

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?
Back to top
View user's profile Send private message
Mike Upton



Joined: 11 May 2011
Posts: 157
Location: Red Gate

PostPosted: Fri Aug 22, 2014 6:52 pm    Post subject: Reply with quote

Hi,

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.
_________________
Mike Upton

Software Engineer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
samjudson



Joined: 14 Jan 2014
Posts: 8

PostPosted: Fri Aug 22, 2014 10:29 pm    Post subject: Reply with quote

Yes, that's certainly an option, but then I'd need to deploy an app to do the transformations as well.

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.
Back to top
View user's profile Send private message
Mike Upton



Joined: 11 May 2011
Posts: 157
Location: Red Gate

PostPosted: Mon Sep 08, 2014 5:36 pm    Post subject: Reply with quote

You can combine the options together, so you might be able to get to what you want by using a combination of operations. The operations are run in the following order:

  1. 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.
  2. XML Transformations for large-scale per-environment changes
  3. Then Variable substitutions in appSettings and connectionStrings - these can obviously be based on more than just the environment name.
  4. 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
_________________
Mike Upton

Software Engineer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
samjudson



Joined: 14 Jan 2014
Posts: 8

PostPosted: Tue Sep 09, 2014 10:02 am    Post subject: Reply with quote

Ah, so PreDeploy happens before the XML Transformations - that is useful to know, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group