This document lists general guidelines to define OpenServerless Tasks variable via the ops cli.
OpenServerless Tasks variable are typically set issuing a command like ops config VARIABLE=<value>. These variable are stored under the ~/.ops/config.json file. Variables name are splitted over the _ character and the resulting parts are used to compose a json nested object having all the parts, that is given a variable with value OPERATOR_COMPONENT_MINIO=true the resulting json persisted into the configuration file will be something like
{ "operator":{ "component":{ "minio":true } } }
With the above described behavior we have defined some general rules to be adopted when developing/updating OpenServerless Tasks variables
OPS_ prefix. This prefix is reserved to the ops general config itself, and normally defined inside the opsroot.json. It is better to clearly distinguish task variable from the ops generated/reserved ones._ splitting rules, prefer variable names composed by a maximum of 4 parts to avoid too much nested json structure. This is to simplify readability of the config.json if manually inspected.config.json file. For instance OPS tasks defines an OPERATOR_CONFIG_APIHOST that should not be overridden. It is better to define a OUTPUT_APIHOST instead.This is a comprehensive list of variable prefix used in Ops tasks describing their purpose
| Variable Prefix | Purpose |
|---|---|
| OPERATOR_COMPONENT_ | Used to defined which OpenServerless Components needs to be deployed by the Operator |
| OPERATOR_CONFIG_ | Global Ops Operator configuration parameters |
| OPENWHISK_CONTROLLER_ | OpenWhisk Controller Configuration |
| OPENWHISK_INVOKER_ | OpenWhisk Invoker Configuration |
| OPENWHISK_ | OpenWhisk General configuration for limits, triggers etc etc |
| STORAGE_SIZE_ | Used to define various component allocated volumes size |
| SECRET_ | Used to define autogenerated secret |
| OUTPUT_ | Used to define calculated configuration parameters that are result of applying ops tasks against a running OpenServerless instance, if applies (APIHOST is one of them) |