Configuring App Variables with the TIBCO Cloud™ - Command Line Interface
You can late-bind property values for a TIBCO BusinessWorks™ App, Node.js, or TIBCO Flogo® app using the /tibcli app push
and tibcli app configure
commands. The current values of app properties can be displayed or overridden. System (engine) variables for TIBCO BusinessWorks™ App or Flogo apps can also be modified with the ,/tibcli app configure
command.
The tibcli app configure
command prompts you to restart the app with new override values. This enables you to modify properties without pushing and building a new EAR file, speeding up changes for moving from test to production, or changing credentials or other variables.
New application variables for TIBCO BusinessWorks Apps must be added in TIBCO Business Studio™ for BusinessWorks™. For Node.js apps, the tibcli-node
tool must be used to modify the manifest, as described in Using Environment Variables in Node.js Apps. Once the app is repushed, the variables display in the Environment controls tab after refreshing the page.
Viewing App Properties
- Log in with the CLI as shown in Logging In with the TIBCO Cloud™ - Command Line Interface.
-
List the app properties for an app using the
tibcli app configure -l
command. For example, to view the configuration for the appmyApp1
:tibcli app configure -l myApp1
-
List the engine variables for an app using the
tibcli app configure --engineVarList
command. For example, to view the engine variables for the appmyApp1
:tibcli app configure --engineVarList myApp1
Configuring an App
-
Change the configuration for the app with the
tibcli app configure
command, specifying overridden app properties in property=value pairs. For example, to override app propertiesprop1
andprop2
with the values"newval"
and"newval2"
formyApp1
:tibcli app configure myApp1 prop1="newval" prop2="newval2"
After issuing the above command, you are prompted to verify if the app should be reconfigured. If you confirm, the overrides are applied and the app is restarted. The verification can be skipped with the-f
option. -
You can also specify app properties with the
--appVar
option:tibcli app configure --appvar prop1="newval" --appvar prop2="newval2" myApp1
-
Engine variables can be specified with the
--engineVar
option:tibcli app configure --engineVar FLOGO_LOG_LEVEL=WARN myApp1
Notes
- The bash shell interprets $, ` (back tick), , !, and # on the command line even when enclosed in double quotes. You need to use single quotes to prevent this, or use a properties file.
-
Overrides added with theCLI are additive. After the
tibcli app configure
command completes, property updates are merged into the existing set, either changing an existing override, adding a new override or reverting an override to its default value by providing an override consisting of the default value. -
You can specify any combination of one or more app properties and engine variables with the
--appVar
and--engineVar
options, but you can't specify app properties with option flags and as arguments or in a property file. - For more information on engine variables, see Configuring App Variables.
Using a Properties File
The CLI can be used with a set of app property overrides defined in a file, instead of specifying them in the command line. Note that you cannot change engine variables with a properties file.
For example create a file.properties
file such as the following:
prop1="newval" prop2="newval2"
Then use the following command:
tibcli app configure -p file.properties myApp1
Configuring With App Push
You can also configure or reconfigure an app using the tibcli app push
command. See the app push
command help in the for more details TIBCO Cloud™ - Command Line Interface Reference.
Passwords
For password properties, values are not shown when viewing app properties. Values are displayed as ******
.
The password values are encrypted on the server using strong encryption. They can only be used by your app and can not be inspected. You can set password properties by using the BusinessWorks obfuscated format. See below for how to obfuscate passwords.
Obfuscating Passwords
To obfuscate a BusinessWorks password:
-
Go to
<BWCLOUD_HOME>/bwcloud/1.0/bin
. -
Run
bwobfuscator
- Type the password and press Enter. An obfuscated password string is given, which can be used in a property value.
Role Requirements
- Admins can change configure app properties on any app in their organization.
- Users can change configure app properties only on apps they own.
- Read-only users cannot configure app properties on any app.
Related Topics
Pushing an App with the TIBCO Cloud™ - Command Line Interface