Skip to content

Commit

Permalink
Expose the worker dashboard consistently on a port (#688)
Browse files Browse the repository at this point in the history
* Expose the worker dashboard consistently on a port

* Fix port number
  • Loading branch information
jacobtomlinson committed Mar 27, 2023
1 parent df0b48b commit bbc05ab
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ spec:
- dask-worker
- --name
- $(DASK_WORKER_NAME)
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
scheduler:
spec:
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ spec:
- dask-worker
- --name
- $(DASK_WORKER_NAME)
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
env:
- name: WORKER_ENV
value: hello-world # We don't test the value, just the name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ spec:
- dask-worker
- --name
- $(DASK_WORKER_NAME)
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
env:
- name: WORKER_ENV
value: hello-world # We dont test the value, just the name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ spec:
imagePullPolicy: "IfNotPresent"
args:
- dask-worker
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
env:
- name: WORKER_ENV
value: hello-world # We dont test the value, just the name
15 changes: 14 additions & 1 deletion dask_kubernetes/operator/kubecluster/kubecluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,13 @@ def make_worker_spec(
if isinstance(worker_command, str):
worker_command = worker_command.split(" ")

args = worker_command + ["--name", "$(DASK_WORKER_NAME)"]
args = worker_command + [
"--name",
"$(DASK_WORKER_NAME)",
"--dashboard",
"--dashboard-address",
"8788",
]

return {
"replicas": n_workers,
Expand All @@ -928,6 +934,13 @@ def make_worker_spec(
"args": args,
"env": env,
"resources": resources,
"ports": [
{
"name": "http-dashboard",
"containerPort": 8788,
"protocol": "TCP",
},
],
}
]
},
Expand Down
21 changes: 21 additions & 0 deletions doc/source/operator_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ Let's create an example called ``cluster.yaml`` with the following configuration
- dask-worker
- --name
- $(DASK_WORKER_NAME)
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
scheduler:
spec:
containers:
Expand Down Expand Up @@ -264,6 +271,13 @@ Let's create an example called ``highmemworkers.yaml`` with the following config
- $(DASK_WORKER_NAME)
- --resources
- MEMORY=32e9
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
The main thing we need to ensure is that the ``cluster`` option matches the name of the cluster we created earlier. This will cause
the workers to join that cluster.
Expand Down Expand Up @@ -368,6 +382,13 @@ Let's create an example called ``job.yaml`` with the following configuration:
- dask-worker
- --name
- $(DASK_WORKER_NAME)
- --dashboard
- --dashboard-address
- "8788"
ports:
- name: http-dashboard
containerPort: 8788
protocol: TCP
env:
- name: WORKER_ENV
value: hello-world # We dont test the value, just the name
Expand Down

0 comments on commit bbc05ab

Please sign in to comment.