Skip to content

Commit 26f98e3

Browse files
committed
update worker groups
1 parent 775b013 commit 26f98e3

File tree

5 files changed

+40
-32
lines changed

5 files changed

+40
-32
lines changed

docs/core_concepts/25_dedicated_workers/index.mdx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,24 @@ For now it only work with bun scripts that have been pre-deployed.
99

1010
The scripts can be used within flows.
1111

12-
To setup, pass:
12+
To use:
1313

14-
```
15-
DEDICATED_WORKER=<workspace>:<path>
16-
```
14+
1. Assign one worker group to execute that script
1715

18-
to the dedicated worker that will be tasked with executing that script.
16+
![Worker group config](./worker_group_config.png)
1917

20-
or use the dedicatedWorkers section in the values.yaml of the helm chart.
18+
The worker group will restart (assuming the pods/restart are set to restart automatically) and will now wait for step 2. below to happen
2119

22-
You will also need to toggle the "Dedicated Workers" option for that script in the metadata:
20+
2. toggle the "Dedicated Workers" option for that script in the metadata:
2321

2422
![Dedicated Workers](./dedicated_workers.png)
2523

2624
You might also want to look for [Worker Group Tag](../9_worker_groups/index.mdx), which allows to assign custom worker groups to scripts and flows in Windmill for efficient execution on different machines with varying specifications:
2725

2826
<div class="grid grid-cols-2 gap-6 mb-4">
29-
<DocCard
30-
title="Workers and Worker Groups"
31-
description="Worker Groups allow users to run scripts and flows on different machines with varying specifications."
32-
href="/docs/core_concepts/worker_groups"
33-
/>
34-
</div>
27+
<DocCard
28+
title="Workers and Worker Groups"
29+
description="Worker Groups allow users to run scripts and flows on different machines with varying specifications."
30+
href="/docs/core_concepts/worker_groups"
31+
/>
32+
</div>
Loading

docs/core_concepts/9_worker_groups/index.mdx

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,41 @@ Workers can belong to multiple worker groups simultaneously. The default worker
3636

3737
If you assign custom worker groups to all your workers, make sure that they cover all worker groups above, otherwise those jobs will never be executed.
3838

39-
You can customize the worker group of a worker by setting the WORKER_TAGS environment variable.
39+
To make custom tags available from the UI, go to your workspace settings and click on the "Assignable Tags" button:
40+
41+
![Worker Group Assignable Tags](./worker_group_ui_2.png)
42+
43+
It is possible to restrict some tags to specific workspace using the following syntax:
4044

4145
```
42-
WORKER_TAGS=deno,light,gpu
46+
gpu(workspace+workspace2)
4347
```
4448

45-
By default, the `WORKER_TAGS` of workers include `deno, python3, bash, go, flow, hub, dependency`.
49+
Only 'workspace' and 'workspace2' will be able to use the `gpu` tags.
4650

47-
The configuration above will make the workers accept only deno jobs and jobs with the `light` tag.
51+
## How to have a worker join a worker group
4852

49-
To make custom tags available from the UI and be authorized to be used, you need to pass the following env variable to the Windmill server:
53+
Simply pass the worker group as the env variable `WORKER_GROUP`:
5054

5155
```
52-
CUSTOM_TAGS=light,gpu
56+
WORKER_GROUP=worker_group_name
5357
```
5458

55-
You can restrict some tags to specific workspace using the following syntax:
59+
The worker will automatically join the worker group on start and be displayed on the Workers page.
60+
61+
## How to assign worker tags to a worker group
62+
63+
Use the edit/create config next to the worker group name in windmill UI:
64+
65+
![Worker Group edit config](./worker_group_ui.png)
66+
67+
**Note**: The worker group management UI is an enterprise only feature. It is still possible to use worker groups with the community edition by passing to each worker the env variable `WORKER_TAGS`:
5668

5769
```
58-
CUSTOM_TAGS=light,gpu(workspace+workspace2)
70+
WORKER_TAGS=tag1,tag2
5971
```
6072

61-
Only workspace and workspace2 will be able to use the `gpu` tags.
62-
63-
## How to assign a custom worker group
73+
## How to assign a custom worker group to a script or flow
6474

6575
For scripts saved on the script editor, select the corresponding worker group tag in the metadata section.
6676

@@ -80,10 +90,10 @@ You can assign a worker group to an entire flow in the flow's settings:
8090

8191
If a workspace tag contains the substring `$workspace`, it will be replaced by the workspace id corresponding to the job. This is especially useful to have the same script deployed to different workspace and have them run on different workers.
8292

83-
In the following setup:
93+
With the following assignable tag:
8494

8595
```
86-
CUSTOM_TAGS=normal-$workspace
96+
normal-$workspace
8797
```
8898

8999
the workspaces, `dev`, `staging`, `prod` and the worker groups: `normal-dev`, `normal-staging`, `normal-prod`. The same script wih the tag `normal-$workspace` will run on the corresponding worker group depending on the workspace it is deployed to. This enable to share the same control plane but use workers with different network restrictions for tighter security.
@@ -98,9 +108,9 @@ They are as fast as running the same logic in a forloop, but keep the benefit of
98108
Dedicated Workers / Native Performance is an [Enterprise & Team Edition](../../misc/7_plans_details/index.mdx) feature.
99109

100110
<div class="grid grid-cols-2 gap-6 mb-4">
101-
<DocCard
102-
title="Dedicated Workers / Native Performance"
103-
description="Dedicated Workers are workers that are dedicated to a particular script."
104-
href="/docs/core_concepts/dedicated_workers"
105-
/>
106-
</div>
111+
<DocCard
112+
title="Dedicated Workers / Native Performance"
113+
description="Dedicated Workers are workers that are dedicated to a particular script."
114+
href="/docs/core_concepts/dedicated_workers"
115+
/>
116+
</div>
Loading
Loading

0 commit comments

Comments
 (0)