Open topic with navigation

TIBCO® Control Plane 1.0.0

# Setting the Consul Connection Parameters

Note: The information in this section is applicable for an app executable only.

You set the values for app properties that you want to override by creating a Key/Value pair for each property in Consul. You can create a standalone property or a hierarchy that groups multiple related properties.

Before you beginThis document assumes that you have access to Consul and are familiar with its use.
To create a standalone property (without hierarchy), you simply enter the property name as the name of the Key when creating the Key in Consul. When you create a property within a hierarchy, enter the hierarchy in the following format in the Create Key field in Consul: `<key_prefix>/<key_name>` where `<key_prefix>` is a meaningful string or hierarchy that serves as a path to the key in Consul and `<key_name>` is the name of the app property whose value you want to override.
For example, in `dev/Timer/Message` and `test/Timer/Message`, `dev/Timer` and `test/Timer` are the `<key_prefix>` which could stand for the dev and test environments and `Message` is the key name. During runtime, you provide the `<key_prefix>` value that tells your app the location in Consul from where to access the property values.

Warning: The Key name in Consul must be identical to its counterpart on the Environmental Controls tab on the Data Plane. If the key name does not match exactly, a warning message is displayed, and the app uses the default value that you configured for the property in Flogo.

Warning: A single app property, for example, `Message`, is looked up by your app as either `Message` or `<key_prefix>/Message` in Consul. An app property within a hierarchy such as `x.y.z` is looked up as `x/y/z` or `<key_prefix>/x/y/z` in Consul. Note that the dot in the hierarchy is represented by a forward slash (/) in Consul.

After you have configured the app properties in Consul, you need to set the environment variable, `FLOGO_APP_PROPS_CONSUL`, with the Consul connection parameters for your app to connect to the Consul. When you set the environment variable, it triggers the app to run, which connects to the Consul using the Consul connection parameters you provided and pulls the app property values from the `key_prefix` location you set by matching the app property name with the `key_name`. Hence, the Key names must be identical to the app property names defined in the Environmental Controls tab on the Data Plane.

You can set the `FLOGO_APP_PROPS_CONSUL` environment variable by directly entering the values as a JSON string. Add this JSON string to the `FLOGO_APP_PROPS_CONSUL` engine variable on the Data Plane.

## Entering the Consul Parameter Values as a JSON String

To enter the Consul parameters as a JSON string, enter the parameters as key/value pairs using the comma delimiter. The following examples illustrate how to set the values as JSON strings.

    FLOGO_APP_PROPS_CONSUL={"server_address":"[http://127.0.0.1:8500|http://127.0.0.1:8500/]"}

Refer to the Consul Connection Parameters section for a description of the parameters. Refer to Encrypting Password Values for details on how to encrypt a value.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Control Plane

Copyright © 2023-2024. Cloud Software Group, Inc. All Rights Reserved.