Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Best Practices for 'changing' config files?
System
DevNetters -
We've got a couple of file types that need a different version for each environment that they are deployed to, and we're looking for some advice on how to best handle them in a TeamSite / OpenDeploy environment.
For example:
There's a file named config.xml. This config.xml file needs to be deployed with each update of a particular site's contents. The config.xml file needs to be tailored specifically for each environment that an update is applied to. So if we move through a DEV > QA > STAGING > PROD update life cycle, that's 4 different version of config.xml.
Some options to handle this are:
- Keep a version of config.xml for each potential environment and attach all the needed versions of the file to a workflow and have the workflow / deployment process somehow deploy the correct version per environment.
- Keep a single version of config.xml and somewhere else keep the environment-specific info needed for config.xml. Once again, have the workflow / deployment process modify the config.xml file per environment.
- Other?? need your input here.
It should be noted that we don't always know the deployment target(s) for the assets at the time a workflow is instantiated.
And it would be optimal if we can come up with a more 'framework' generic solution here rather than coding to each occurrence that arises.
Experiences? Advice? Dig deep. All responses are much appreciated!
Wally Box
Nike, Inc.
Find more posts tagged with
Comments
mart2001
I know of a client that does the option 1. They have a version for each environment, and stored it in various directories called dev, qa, stage, and prod. Once the workflow picks up the config file, it will also pick up the directory and know which environment to send the config file.
Sean_Hanck
I've had success where the configuration for all enviornments is one file and the process to retrieve the configuration values is environment aware.
[html]
value
....
value
....
[/html]
this works well for custom configurations, framework wise it can be extended pretty nicely, with default values and value enheritance, but it won't apply to application specific config like iw.cfg. For those I ussually just rely on what ever the build process and code repositor is, hopefully its not a manual process.
Adam Stoller
I've used a variety of different techniques at a variety of different sites - usually dependent upon the needs of the customer and the specifics of the file(s) in question:
Migrateduser
Great replies all! Many, many thanks. We've got a client right now that will benefit from this info.