Skip to content

Commit

Permalink
Removing custom dask_gateway from qhub
Browse files Browse the repository at this point in the history
Closes #1012
  • Loading branch information
costrouc committed Mar 8, 2022
1 parent 3fc25e3 commit 9e3cf66
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 118 deletions.
1 change: 0 additions & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- jupyterlab
- jupyterhub
- dask-worker
- dask-gateway
steps:
- name: 'Checkout Infrastructure'
uses: actions/checkout@main
Expand Down
7 changes: 2 additions & 5 deletions docs/source/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,14 @@ terraform_state:
Default images are to the default image run if not specified in a
profile (described in the next section). The `jupyterhub` key controls
the jupyterhub image run. These control the docker image used to run
JupyterHub, the default JupyterLab image, the default Dask worker
image, and Dask Gateway docker image.
JupyterHub, the default JupyterLab image, and the default Dask worker
image.

```yaml
default_images:
jupyterhub: "quansight/qhub-jupyterhub:v||QHUB_VERSION||"
jupyterlab: "quansight/qhub-jupyterlab:v||QHUB_VERSION||"
dask_worker: "quansight/qhub-dask-worker:v||QHUB_VERSION||"
dask_gateway: "quansight/qhub-dask-gateway:v||QHUB_VERSION||"
conda_store: "quansight/conda-store-server:v0.3.3"
```

## Storage
Expand Down Expand Up @@ -831,7 +829,6 @@ default_images:
jupyterhub: "quansight/qhub-jupyterhub:v||QHUB_VERSION||"
jupyterlab: "quansight/qhub-jupyterlab:v||QHUB_VERSION||"
dask_worker: "quansight/qhub-dask-worker:v||QHUB_VERSION||"
conda_store: "quansight/conda-store-server:v0.3.3"
theme:
jupyterhub:
Expand Down
2 changes: 0 additions & 2 deletions docs/source/installation/existing.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ default_images:
jupyterhub: quansight/qhub-jupyterhub:v0.3.13
jupyterlab: quansight/qhub-jupyterlab:v0.3.13
dask_worker: quansight/qhub-dask-worker:v0.3.13
dask_gateway: quansight/qhub-dask-gateway:v0.3.13
conda_store: quansight/conda-store-server:v0.3.3
storage:
conda_store: 60Gi
shared_filesystem: 100Gi
Expand Down
1 change: 0 additions & 1 deletion qhub/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"jupyterhub": f"quansight/qhub-jupyterhub:{qhub_image_tag}",
"jupyterlab": f"quansight/qhub-jupyterlab:{qhub_image_tag}",
"dask_worker": f"quansight/qhub-dask-worker:{qhub_image_tag}",
"dask_gateway": f"quansight/qhub-dask-gateway:{qhub_image_tag}",
},
"storage": {"conda_store": "60Gi", "shared_filesystem": "100Gi"},
"theme": {
Expand Down
1 change: 0 additions & 1 deletion qhub/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class DefaultImages(Base):
jupyterhub: str
jupyterlab: str
dask_worker: str
dask_gateway: str


# =========== Authentication ==============
Expand Down
3 changes: 0 additions & 3 deletions qhub/stages/input_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,6 @@ def stage_07_kubernetes_services(stage_outputs, config):
.get("extraEnv", [])
),
# dask-gateway
"dask-gateway-image": _split_docker_image_name(
config["default_images"]["dask_gateway"]
),
"dask-worker-image": _split_docker_image_name(
config["default_images"]["dask_worker"]
),
Expand Down
50 changes: 0 additions & 50 deletions qhub/template/image/Dockerfile.dask-gateway

This file was deleted.

10 changes: 0 additions & 10 deletions qhub/template/image/docker-bake.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,13 @@
"group": {
"default": {
"targets": [
"dask-gateway",
"dask-worker",
"jupyterhub",
"jupyterlab"
]
}
},
"target": {
"dask-gateway": {
"context": "./",
"dockerfile": "Dockerfile.dask-gateway",
"tags": [
"docker.io/quansight/qhub-dask-gateway:${TAG}",
"ghcr.io/quansight/qhub-dask-gateway:${TAG}",
"quay.io/quansight/qhub-dask-gateway:${TAG}"
]
},
"dask-worker": {
"context": "./",
"dockerfile": "Dockerfile.dask-worker",
Expand Down
10 changes: 0 additions & 10 deletions qhub/template/stages/07-kubernetes-services/dask_gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ variable "dask-worker-image" {
})
}

variable "dask-gateway-image" {
description = "Dask worker image"
type = object({
name = string
tag = string
})
}

variable "dask-gateway-profiles" {
description = "Dask Gateway profiles to expose to user"
default = []
Expand All @@ -32,8 +24,6 @@ module "dask-gateway" {
external-url = var.endpoint

cluster-image = var.dask-worker-image
gateway-image = var.dask-gateway-image
controller-image = var.dask-gateway-image

general-node-group = var.node_groups.general
worker-node-group = var.node_groups.worker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,3 @@ def dask_gateway_config(path="/var/lib/dask-gateway/config.json"):

c.KubeController.proxy_web_entrypoint = "websecure"
c.KubeController.proxy_tcp_entrypoint = "tcp"


# override default make_ingressroute to add tls cert resolver
def make_ingressroute(self, cluster_name, namespace):
route = f"{self.proxy_prefix}/clusters/{namespace}.{cluster_name}/"
return {
"apiVersion": "traefik.containo.us/v1alpha1",
"kind": "IngressRoute",
"metadata": {
"labels": self.get_labels(cluster_name, "dask-scheduler"),
"annotations": self.common_annotations,
"name": f"dask-{cluster_name}",
},
"spec": {
"entryPoints": [self.proxy_web_entrypoint],
"routes": [
{
"kind": "Rule",
"match": f"PathPrefix(`{route}`)",
"services": [
{
"name": self.make_service_name(cluster_name),
"namespace": namespace,
"port": 8787,
}
],
"middlewares": self.proxy_web_middlewares,
}
],
"tls": {},
},
}


c.KubeController.make_ingressroute = make_ingressroute
4 changes: 4 additions & 0 deletions qhub/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ def _version_specific_upgrade(
if "conda_store" in config["default_images"]:
del config["default_images"]["conda_store"]

# Remove dask_gateway image from default_images
if "dask_gateway" in config["default_images"]:
del config["default_images"]["dask_gateway"]

# Create root password
default_password = "".join(
secrets.choice(string.ascii_letters + string.digits) for i in range(16)
Expand Down

0 comments on commit 9e3cf66

Please sign in to comment.