SubNAnting - Deploying software with different configurations
On my current project, we have 5 different environments - bleeding, stable, test, stage and production. The application is ASP.NET-based but also has a complicated Extraction Transformation and Loading (ETL) process which synchronizes the application's data with a legacy system. All of this requires *alot* of configuration!
How do you manage this configuration across 5 environments with continuous integration and automated deployment?
SubNAnting! This is my contribution as a new word but alas the technology is not mine. The NAnt tool which does a wonderful job of building and deploying software also has a <nant> task which allows you to execute a NAnt script from another NAnt script while inheriting all the launching scripts variables (if you set the inheritall attribute to true).
This allows you to specify your configuration variables in a "bootloader" NAnt script that then calls the main NAnt script which does the deployment. That way your main NAnt script is the same across all environments and only the "bootloader" script changes.
For Example:
boot.build
<?xml version="1.0"?>
<project name="SubNAntingExampleBootStrap">
<property name="local.server" value="devstation1" />
<nant buildfile="deploy.build" inheritall="true" />
</project>
deploy.build
<?xml version="1.0"?>
<project name="SubNAntingExampleMainScript" target="main">
<target name="main">
<echo message="do something with ${local.server}" />
</target>
</project>
Subnant v. To launch another NAnt script from an existing NAnt script. |
Anyone else using this technique?