Deployment Manager - 1.0
Variables - Deployment Manager
As you promote your application through test, UAT, staging and production, there are going to be differences in:
- Database connection strings
- Application settings
- Web service URL's
- Many other parameters
To make it easy to support different environments without hard-coding these configuration values, the Deployment Manager web interface allows you to create variables.
These variables are used during your application deployment. For example, variables you define will be automatically substituted into XML configuration files, and made available to your PowerShell scripts. This allows you to create applications and deployment scripts that are agnostic of the target environment.
Escaping
Note that the value of a variable should be the unescaped version. Quotes and other characters that would normally need to be escaped in XML should not be escaped in the Deployment Manager UI. This is because they will be escaped when injected, and doing so could result in double escaping.
Scoping
A variable can be 'scoped' to zero or one of each of the following:
- An environment (most common)
- A specific machine
- A specific package
For example, suppose these variables exist:
Name |
Value |
Environment |
Machine |
Package |
LogLevel |
Info |
|
|
|
LogLevel |
Warn |
Production |
|
|
DBConnectionString |
Server=SQL-UAT1;Database=... |
UAT |
|
|
DBConnectionString |
Server=SQL-PROD;Database=... |
Production |
|
|
During deployment, Deployment Manager will try to select the most specifically scoped variable that applies. For example, when deploying to Production, the LogLevel property would be Warn. But to any other environment, it would fall back to the less-specific variable and have a value of Info instead.
Predefined variables
Deployment Manager automatically makes a number of common useful variables available during each deployment. All predefined variables have a RedGate prefix. The available predefined variables are:
Name |
Example value |
Description |
RedGateEnvironmentName |
Production |
The name of the environment that was selected when this deployment was scheduled. |
RedGateMachineName |
ProdServer01 |
The name assigned to the machine in the Deployment Manager Environments page in the web interface. May or may not be the hostname of the actual machine. |
RedGateReleaseNumber |
1.9 |
The release number entered when this release was created in the Deployment Manager web interface. |
RedGatePackageName |
AcmeCorp.Web |
The name of the NuGet package being deployed. |
RedGatePackageVersion |
1.9.3 |
The version number of the NuGet package. |
RedGatePackageNameAndVersion |
AcmeCorp.Web.1.9.3 |
The name and version number of the NuGet package. |
RedGateProjectName |
ACME Website |
The name of the current project, as defined in the Deployment Manager web interface. |
RedGateTaskId |
157 |
An integer used to identity the current task in Deployment Manager. You can use this if you need to record something unique about each deployment. |
The following additional variables don't have a default value, but can be set by you to override Deployment Manager behavior:
Name |
Example value |
Description |
RedGatePackageDirectoryPath |
C:\MyApp |
A custom path that you can tell an Agent to extract your package to. If not set, it will have the value that an Agent extracted the NuGet package to. |
RedGatePurgePackageDirectoryBeforeCopy |
False |
If using |
RedGateWebSiteName |
MySite or MySite/MyVDir |
Override the IIS site, or use a forward slash to specify a virtual directory, if you want to customise the site/virtual directory used by the IIS convention. |
RedGateNotAWebSite |
True |
Set to True to tell an Agent to skip the IIS convention (i.e., don't configure any IIS sites). |
Database variables
When you are deploying databases, you can specify the following variables:
Name |
Example value |
Description |
databaseServer |
localhost |
The database server you want to deploy to. |
databaseName |
WidgetShopStaging |
The database you want to deploy to. |
databaseIntegratedAuthentication |
True |
If you want to use SQL Server authentication to connect to the SQL Server, specify the value True. If you use SQL Server authentication, you do not need to specify a username and password. |
databaseUsername |
user |
The username for the database you want to deploy to. |
databasePassword |
password |
The password for the database you want to deploy to. |
mode |
upgrade or createnew |
The type of upgrade you want Deployment Manager to perform. You can specify either upgrade if you want to upgrade the database, or createnew if you want to drop and recreate the database. |
allowDynamicDatabaseUpgrade |
True |
If you want Deployment Manager to perform a dynamic database upgrade, specify True. |
allowPreDeployDatabaseValidation |
True |
If you want Deployment Manager to validate the upgrade before deployment, specify True. See: Deployment validation. |
allowPostDeployDatabaseValidation |
True |
If you want Deployment Manager to validate the upgrade after deployment, specify True. See: Deployment validation. |
abortOnHighSeverityWarnings |
True |
If you want Deployment Manager to cancel a deployment if there are any serious deployment warnings, specify True. |
For more information, see: Deploying database packages.
Was this article helpful?
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Installing and upgrading