The envSettings.props file enables you to externalize configuration values
and set them on a per-environment basis. This section shows the configuration syntax used,
and shows some example values in this file.
Environment Variable Syntax
If the Enterprise Gateway server configuration contains a property with a format of
${env.X} , where X is any
string (for example, MyCustomSetting ), the envSettings.props
file must contain an equivalent name-value pair with the following format:
| | |
|
env.MyCustomSetting=MyCustomValue
| |
| | |
|
When the Enterprise Gateway server starts up, every occurrence of the ${env.MyCustomSetting}
property is expanded to the value of MyCustomValue . For example, by default, the
HTTP port in the server configuration is set to ${env.PORT.TRAFFIC} . Specifying
a name-value pair of env.PORT.TRAFFIC=8080 in the envSettings.props
file results in the server opening up port 8080 at start up.
Example Settings
The following simple example shows some environment variables set in the
envSettings.props file:
| | |
|
# the default port which the Gateway listens on for HTTP traffic
env.PORT.TRAFFIC=8080
# the default port which the Gateway listens on for management/configuration HTTP traffic
env.PORT.MANAGEMENT=8090
| |
| | |
|
The following example screenshot shows the corresponding ${env.PORT.TRAFFIC}
property displayed in the Configure HTTP Interface dialog. At runtime,
this property is expanded to the value of the env.PORT.TRAFFIC environment
variable specified in the envSettings.props file:
Environment Variable in Policy Studio
|
Important Note:
All entries in the envSettings.props file must use the env. prefix,
and all properties specified in the Policy Studio must use the ${env.*) syntax.
If you update the envSettings.props file, you must restart or deploy the
Enterprise Gateway for updates to be applied to the currently running Enterprise Gateway configuration.
|