Each system in a deployment has a set of properties that contains CONS3RT and user defined values for use in the configuration and execution of Systems. These allow for customization in software and test assets.
The CONS3RT properties are values generated on each run. These include run specific information (e.g. username, cloud technology, etc.) and per System specific information (e.g. hostname, IP address, operation system, etc.) The per System specific values are keyed off the role name assigned to the System when the Scenario was built.
User defined properties are set in the Deployment builder and can be added/edited at Deployment Launch time.
Both CONS3RT and user defined properties are combined and made available under the Properties tab on the Deployment Run screen and in files on each Systems. A sample deployment.properties is listed below.
The properties files live in (with XXXXX being the Deployment id):
However at runtime they can be accessed using the DEPLOYMENT_HOME environment variable (see below)
The deployment properties are available in three formats on all systems:
Windows Powershell: deployment-properties.ps1
Standard Java Properties: deployment.properties
CONS3RT specific environment variables are set and available to install scripts at runtime to use in
- Grab media files from the asset
- Launch additional code (e.g. Puppet manifests)
- Set conditional logic based on Role name
- Grab custom properties or deployment properties
* ASSET_DIR: Path to the parent directory of your software asset
* To access media files: $ASSET_DIR/media/filename.zip
* CONS3RT_ROLE_NAME: Set to the Role Name given to this System in the Scenario
* DEPLOYMENT_HOME: Path to the directory containing the deployment properties files
Below are examples of how to make variables defined in deployment properties available to an asset:
# ==== Begin deployment.properties ==== #Mon Feb 23 09:59:25 EST 2015 #Mon Feb 23 10:07:30 EST 2015 #Properties file for Deployment cons3rt.deployment.id=1277 cons3rt.deployment.name=My Deployment cons3rt.deploymentRun.id=5528 cons3rt.deploymentRun.name=DTL DEV TEST cons3rt.fap.deployment.machine.hostname.RoleName=dr5528d1277v0 cons3rt.fap.deployment.machine.isMaster.RoleName=true cons3rt.fap.deployment.machine.isProvisionable.RoleName=true cons3rt.fap.deployment.machine.isVirtual.RoleName=true cons3rt.fap.deployment.machine.osFamily.RoleName=UBUNTU cons3rt.fap.deployment.machine.template.RoleName=vApp_ubuntu_14.04_x64 cons3rt.fap.deployment.numMachines=1 cons3rt.user=my.username customProperty1=myvalue1 customProperty2=myvalue2 # ==== End deployment.properties ====