The worker backend TBD.
The worker
backend does not require any special configuration, though overriding host
and port
values can be specified. The backend will use the diode
settings specified in the common
subsection to forward discovery results.
orb:
backends:
common:
diode:
target: grpc://192.168.0.100:8080/diode
api_key: ${DIODE_API_KEY}
agent_name: agent01
worker:
host: 192.168.5.11 # default 0.0.0.0
port: 8857 # default 8071
Worker policies are broken down into two subsections: config
and scope
.
Config defines data for the whole scope and is optional overall.
Parameter | Type | Required | Description |
---|---|---|---|
package | str | yes | custom python package that implements Backend Class |
schedule | cron format | no | If defined, it will execute scope following cron schedule time. If not defined, it will execute scope only once |
The scope can be defined
A sample policy including all parameters supported by the device discovery backend.
orb:
...
policies:
worker:
custom_policy:
config:
package: nbl_custom
schedule: "* * * * *"
custom_config: custom
scope:
custom: any
To specify required custom workers packages, use the environment variable INSTALL_WORKERS_PATH
. Ensure that the required files are placed in the mounted volume (/opt/orb
).
Mounted folder example:
/local/orb/
├── agent.yaml
├── workers.txt
├── my-worker/
└── nbl-custom-worker-1.0.2.tar.gz
Example workers.txt
:
my-custom-wkr==0.1.2 # try install from pypi
nbl-custom-worker-1.0.2.tar.gz # try install from a tar.gz
./my-worker # try to install from a folder that contains project.toml