TFS & GO & Chef, oh my: Part 4 - Config dilemma resolved?

Stumbled across this little gem: 'configSource'

It looks like this:
web.config: 
<connectionStrings configSource="config\connectionStrings.config"/>

config\connectionStrings.config: 

<connectionStrings>
<add name="DBname" connectionString="Database=DBname;Server=DEVSERVER\DB;user=pp.AccountName;password=DEVpassword;" providerName="System.Data.SqlClient"/>
</connectionStrings>

What we'll do is create three files: (DEV|UAT|PROD).connectionStrings.config

At deployment time the script will determine which file is correct (probably env.var), rename it (strip out env), and delete the other files.  Not pretty, but should be a lot easier to live with than copies of the entire file.  The devs should be amenable to a one-time change of the config file structure.  For the time being, this will be a manual process (it already is), but it should lend itself to automation in future.

Stuff left to figure out:
  • Versioning - we'll do a version.info file for each project and just inject a number on deployment - how to do this?...?
  • Build repository - do we just use Git?  A file share? (the latter for the POC I suspect)
And that's it for the build process!!  I am hopeful the deploy will be even easier...

Comments

Popular posts from this blog

DFSR - eventid 4312 - replication just won't work

Fixing duplicate SPNs (service principal name)

Logstash to Nagios - alerting based on Windows Event ID