Setting agent parameter values
Learn about parameter context and how to set agent parameter values in Cloudera Edge Management (CEM).
Any collection of replacement key-value pairs is known as a parameter context. Parameters never
exist on their own. They only exist in a parameter context. Edge Flow Manager (EFM) allows
setting parameter contexts at the following levels:
Levels | Description |
---|---|
Flow | The flow level parameter context acts as a default for the entire flow. If there are no agent class or agent level parameter context mappings set, the flow parameter context is used. You can manage the values for this level in the UI in the Flow Designer by clicking Parameters in the lower left corner. Every time a flow is published, a copy of the current parameter context from the Flow Designer gets copied to the flow level parameter context for the published flow. Therefore, changing the values for parameters in the Flow Designer does not update previously published flows. |
Agent Class | An agent class level parameter context, if present, overwrites the flow level context. This is to support multiple versions of a flow definition to an agent class, but allowing agent class configuration values that override whatever is set in the Flow Designer UI as default values. Agent class level parameter contexts are set using the EFM REST API, and can be set once to impact all future flows published to that agent class. |
Agent | An agent level parameter context, if present, overwrites the agent class and flow level contexts. This is to support deploying a flow to multiple agents in an agent class but allowing per-agent configuration values. Agent level parameter contexts are set using the EFM REST API, and can be set once to affect all future flows deployed to that agent. |
Resolving parameter contexts
When an agent requests a flow from EFM, EFM substitutes parameter values just-in-time for
placeholders by resolving parameter values in this hierarchy of contexts. In order to
accomplish this, the flow URI that EFM sends to agents as part of a flow update operation
looks like the
following:
GET /efm/api/flows/{flowId}?aid={agentId}
When a flow is fetched, the agent, agent class, and flow level parameter contexts are retrieved and applied to the flow in the hierarchy listed above.
REST API endpoints for parameters
For information about creating parameter contexts and mapping them to flows, agent classes,
and agents, see the following:
- Parameters section in Cloudera Edge Flow Manager REST API.
- Parameter Mappings section in Cloudera Edge Flow Manager REST API.
For tutorials of specific use cases that leverage this feature, including examples interacting
with the REST API using curl
, see Using Agent Parameters.