You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backends/worker.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,4 +49,24 @@ orb:
49
49
schedule: "* * * * *"
50
50
custom_config: custom
51
51
scope:
52
-
custom: any
52
+
custom: any
53
+
```
54
+
55
+
### Custom Workers
56
+
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`).
57
+
58
+
Mounted folder example:
59
+
```sh
60
+
/local/orb/
61
+
├── agent.yaml
62
+
├── workers.txt
63
+
├── my-worker/
64
+
└── nbl-custom-worker-1.0.2.tar.gz
65
+
```
66
+
67
+
Example `workers.txt`:
68
+
```txt
69
+
my-custom-wkr==0.1.2 # try install from pypi
70
+
nbl-custom-worker-1.0.2.tar.gz # try install from a tar.gz
71
+
./my-worker # try to install from a folder that contains project.toml
Copy file name to clipboardExpand all lines: docs/config_samples.md
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,4 +96,55 @@ Run command:
96
96
docker run -v /local/orb:/opt/orb/ \
97
97
-e DIODE_API_KEY={YOUR_API_KEY} \
98
98
netboxlabs/orb-agent:latest run -c /opt/orb/agent.yaml
99
-
```
99
+
```
100
+
101
+
## Worker backend
102
+
```yaml
103
+
orb:
104
+
config_manager:
105
+
active: local
106
+
backends:
107
+
worker:
108
+
common:
109
+
diode:
110
+
target: grpc://192.168.31.114:8080/diode
111
+
api_key: ${DIODE_API_KEY}
112
+
agent_name: agent02
113
+
policies:
114
+
worker:
115
+
policy_1:
116
+
config:
117
+
package: my_worker #Required
118
+
schedule: "0 */2 * * *"
119
+
custom_config: config
120
+
scope:
121
+
custom_val: value
122
+
```
123
+
124
+
### Custom Workers
125
+
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`).
126
+
127
+
Mounted folder example:
128
+
```sh
129
+
/local/orb/
130
+
├── agent.yaml
131
+
├── workers.txt
132
+
├── my-worker/
133
+
└── nbl-custom-worker-1.0.2.tar.gz
134
+
```
135
+
136
+
Example `workers.txt`:
137
+
```txt
138
+
my-custom-wkr==0.1.2 # try install from pypi
139
+
nbl-custom-worker-1.0.2.tar.gz # try install from a tar.gz
140
+
./my-worker # try to install from a folder that contains project.toml
141
+
```
142
+
143
+
Run command:
144
+
```sh
145
+
docker run -v /local/orb:/opt/orb/ \
146
+
-e DIODE_API_KEY={YOUR_API_KEY} \
147
+
-e INSTALL_WORKERS_PATH=/opt/orb/workers.txt \
148
+
netboxlabs/orb-agent:latest run -c /opt/orb/agent.yaml
149
+
```
150
+
The relative path used by `pip install` should point to the directory containing the `.txt` file.
0 commit comments