From d819ef9949fe99be92bbb6ffc84ab42751c4a6e4 Mon Sep 17 00:00:00 2001 From: dciangot Date: Thu, 12 Aug 2021 08:46:19 +0000 Subject: [PATCH 01/59] rec dodas client with token --- stable/jhub-aas/Chart.yaml | 2 +- stable/jhub-aas/docker/Dockerfile | 2 +- stable/jhub-aas/values.schema.json | 6 ++++++ stable/jhub-aas/values.yaml | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stable/jhub-aas/Chart.yaml b/stable/jhub-aas/Chart.yaml index 707343eb..71fc6610 100644 --- a/stable/jhub-aas/Chart.yaml +++ b/stable/jhub-aas/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: stable apiVersion: v1 name: JHUBaaS -version: 1.0.0 +version: 2.0.1 appVersion: 1.3.0 description: JHUBaaS Hub umbrella chart keywords: diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index c16af1d3..8d89cc2b 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.5 as REGISTRATION +FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.6-pre1 as REGISTRATION FROM jupyterhub/k8s-hub:0.11.1 diff --git a/stable/jhub-aas/values.schema.json b/stable/jhub-aas/values.schema.json index a99c1911..364bcc3c 100644 --- a/stable/jhub-aas/values.schema.json +++ b/stable/jhub-aas/values.schema.json @@ -53,6 +53,12 @@ "extraEnv": { "type": "object", "properties": { + "IAM_TOKEN": { + "type": "string", + "form": true, + "title": "Insert you IAM access token", + "description": "Enable the cluster to instantiate a IAM Client for you" + }, "ADMIN_OAUTH_GROUPS": { "type": "string" }, diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 050c6a21..b0ac6058 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -77,6 +77,7 @@ jupyterhub: WITH_GPU: "false" HTCONDOR_COLLECTOR_URL: .myip.cloud.infn.it:30618 HTCONDOR_SCHEDD_NAME: .myip.cloud.infn.it:31618 + IAM_TOKEN: null extraConfig: myConfig.py: | #!/usr/bin/env python From 40d085fb1be3ea36d0af0251acab64c4ae5c2570 Mon Sep 17 00:00:00 2001 From: dciangot Date: Thu, 12 Aug 2021 10:52:48 +0200 Subject: [PATCH 02/59] fix IAM_TOKEN null --- stable/jhub-aas/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index b0ac6058..a41452eb 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -77,7 +77,7 @@ jupyterhub: WITH_GPU: "false" HTCONDOR_COLLECTOR_URL: .myip.cloud.infn.it:30618 HTCONDOR_SCHEDD_NAME: .myip.cloud.infn.it:31618 - IAM_TOKEN: null + IAM_TOKEN: "" extraConfig: myConfig.py: | #!/usr/bin/env python From 91eec928b7ee245086b3062154b0845d353a89ed Mon Sep 17 00:00:00 2001 From: ciangottini Date: Wed, 15 Sep 2021 16:51:03 +0200 Subject: [PATCH 03/59] new docker image + daskssh --- {stable => dev}/spark/Chart.yaml | 0 {stable => dev}/spark/README.md | 0 .../templates/spark-master-deployment.yaml | 0 {stable => dev}/spark/values.yaml | 0 stable/cachingondemand/Chart.yaml | 4 +- stable/jhub-aas/docker/Dockerfile | 2 +- .../deployment-ssh-forwarder.yaml | 54 +++++++++++++++++++ .../ssh-forwarder/svc-ssh-forwarder.yaml | 30 +++++++++++ stable/jhub-aas/values.yaml | 46 ++++++++++++++-- 9 files changed, 129 insertions(+), 7 deletions(-) rename {stable => dev}/spark/Chart.yaml (100%) rename {stable => dev}/spark/README.md (100%) rename {stable => dev}/spark/templates/spark-master-deployment.yaml (100%) rename {stable => dev}/spark/values.yaml (100%) create mode 100644 stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml create mode 100644 stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml diff --git a/stable/spark/Chart.yaml b/dev/spark/Chart.yaml similarity index 100% rename from stable/spark/Chart.yaml rename to dev/spark/Chart.yaml diff --git a/stable/spark/README.md b/dev/spark/README.md similarity index 100% rename from stable/spark/README.md rename to dev/spark/README.md diff --git a/stable/spark/templates/spark-master-deployment.yaml b/dev/spark/templates/spark-master-deployment.yaml similarity index 100% rename from stable/spark/templates/spark-master-deployment.yaml rename to dev/spark/templates/spark-master-deployment.yaml diff --git a/stable/spark/values.yaml b/dev/spark/values.yaml similarity index 100% rename from stable/spark/values.yaml rename to dev/spark/values.yaml diff --git a/stable/cachingondemand/Chart.yaml b/stable/cachingondemand/Chart.yaml index 3cfa8d84..6d80f0b0 100755 --- a/stable/cachingondemand/Chart.yaml +++ b/stable/cachingondemand/Chart.yaml @@ -3,8 +3,8 @@ annotations: apiVersion: v1 appVersion: "4.11" description: A Helm chart for the deployment of a XCache cluster -name: cachingondemand -version: 1.0.6 +name: XCache-aaS +version: 1.0.7 icon: https://xrootd.slac.stanford.edu/images/xrootd-logo.png maintainers: - name: dciangot diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 8d89cc2b..1c305a5e 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.6-pre1 as REGISTRATION +FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.6-pre2 as REGISTRATION FROM jupyterhub/k8s-hub:0.11.1 diff --git a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml new file mode 100644 index 00000000..4a46dc1d --- /dev/null +++ b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: daskssh + labels: + app.kubernetes.io/name: daskssh +spec: + template: + metadata: + labels: + app.kubernetes.io/name: daskssh + spec: + priorityClassName: system-node-critical + containers: + - name: redis + resources: + requests: + memory: {{ .Values.redis.requests.memory }} + cpu: {{ .Values.redis.requests.cpu }} + limits: + memory: {{ .Values.redis.limits.memory }} + cpu: {{ .Values.redis.limits.cpu }} + imagePullPolicy: {{ .Values.redis.image.pullPolicy }} + image: "{{ .Values.redis.image.name }}:{{ .Values.redis.image.tag }}" + volumeMounts: [] + - name: daskssh + resources: + requests: + memory: {{ .Values.daskssh.requests.memory }} + cpu: {{ .Values.daskssh.requests.cpu }} + limits: + memory: {{ .Values.daskssh.limits.memory }} + cpu: {{ .Values.daskssh.limits.cpu }} + imagePullPolicy: {{ .Values.daskssh.image.pullPolicy }} + image: "{{ .Values.daskssh.image.name }}:{{ .Values.daskssh.image.tag | default .Chart.AppVersion }}" + - name: listener + resources: + requests: + memory: {{ .Values.listener.requests.memory }} + cpu: {{ .Values.listener.requests.cpu }} + limits: + memory: {{ .Values.listener.limits.memory }} + cpu: {{ .Values.listener.limits.cpu }} + imagePullPolicy: {{ .Values.listener.image.pullPolicy }} + image: "{{ .Values.listener.image.name }}:{{ .Values.listener.image.tag }}" + volumes: + selector: + matchLabels: + app.kubernetes.io/name: daskssh + + + replicas: 1 + strategy: + type: Recreate \ No newline at end of file diff --git a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml new file mode 100644 index 00000000..833e3e87 --- /dev/null +++ b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + name: daskssh +spec: + type: NodePort + ports: + - port: 8022 + nodePort: {{ .Values.daskssh.nodePort }} + protocol: TCP + name: daskssh + selector: + app.kubernetes.io/name: daskssh + +--- + +apiVersion: v1 +kind: Service +metadata: + name: listener +spec: + type: ClusterIP + clusterIP: + ports: + - port: 8122 + targetPort: 8122 + protocol: TCP + name: listener + selector: + app.kubernetes.io/name: daskssh \ No newline at end of file diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index a41452eb..44fd6eb1 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -3,6 +3,44 @@ hostname: jhub..myip.cloud.infn.it ingress: true # Show options for htcondor integration htcondor: false + +ssh-forwarder: + enabled: false + redis: + image: + pullPolicy: IfNotPresent + name: redis + tag: 6.2.5 + requests: + cpu: 900m + memory: 900M + limits: + cpu: 1 + memory: 1G + listener: + image: + pullPolicy: Always + name: dodasts/dask-ssh-listener + tag: v0.1.1 + requests: + cpu: 900m + memory: 900M + limits: + cpu: 1 + memory: 1G + daskssh: + image: + pullPolicy: Always + name: dodasts/dask-ssh-forwarder + tag: v0.1.1 + nodePort: 31022 + requests: + cpu: 900m + memory: 900M + limits: + cpu: 1 + memory: 1G + # ==== jupyterhub: ingress: @@ -51,7 +89,7 @@ jupyterhub: hub: image: name: ghcr.io/dodas-ts/jhub - tag: 'v4.0.1' + tag: 'v4.0.2' cookieSecret: 72077073d819ce7a118a7dd7e2ce3eb74328cd306faa0540b1045d56113fdd0e # networkPolicy: @@ -117,14 +155,14 @@ jupyterhub: with open(cache_file) as f: cache_results = json.load(f) else: - response = subprocess.check_output(['/srv/.init/dodas-IAMClientRec', server_host], env=myenv) + response = subprocess.check_output(['/srv/.init/dodas-IAMClientRec', server_host+"-jhub"], env=myenv) response_list = response.decode('utf-8').split("\n") client_id = response_list[len(response_list)-3] client_secret = response_list[len(response_list)-2] cache_results = { - "client_id": client_id, - "client_secret": client_secret + "client_id": server_host+"-jhub", + "client_secret": "testmepls" } with open(cache_file, "w") as w: json.dump(cache_results, w) From c03970c91904cfe79461d7cd2c905d783d163a44 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Wed, 15 Sep 2021 21:17:44 +0200 Subject: [PATCH 04/59] ssh forwarder namespace in env --- .../deployment-ssh-forwarder.yaml | 36 ++--- .../ssh-forwarder/svc-ssh-forwarder.yaml | 6 +- stable/jhub-aas/values.schema.json | 134 ++++++++++++++++++ stable/jhub-aas/values.yaml | 8 +- 4 files changed, 160 insertions(+), 24 deletions(-) diff --git a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml index 4a46dc1d..bfd1f274 100644 --- a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml +++ b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml @@ -15,34 +15,34 @@ spec: - name: redis resources: requests: - memory: {{ .Values.redis.requests.memory }} - cpu: {{ .Values.redis.requests.cpu }} + memory: {{ .Values.ssh-forwader.redis.requests.memory }} + cpu: {{ .Values.ssh-forwader.redis.requests.cpu }} limits: - memory: {{ .Values.redis.limits.memory }} - cpu: {{ .Values.redis.limits.cpu }} - imagePullPolicy: {{ .Values.redis.image.pullPolicy }} - image: "{{ .Values.redis.image.name }}:{{ .Values.redis.image.tag }}" + memory: {{ .Values.ssh-forwader.redis.limits.memory }} + cpu: {{ .Values.ssh-forwader.redis.limits.cpu }} + imagePullPolicy: {{ .Values.ssh-forwader.redis.image.pullPolicy }} + image: "{{ .Values.ssh-forwader.redis.image.name }}:{{ .Values.ssh-forwader.redis.image.tag }}" volumeMounts: [] - name: daskssh resources: requests: - memory: {{ .Values.daskssh.requests.memory }} - cpu: {{ .Values.daskssh.requests.cpu }} + memory: {{ .Values.ssh-forwader.sshFWD.requests.memory }} + cpu: {{ .Values.ssh-forwader.sshFWD.requests.cpu }} limits: - memory: {{ .Values.daskssh.limits.memory }} - cpu: {{ .Values.daskssh.limits.cpu }} - imagePullPolicy: {{ .Values.daskssh.image.pullPolicy }} - image: "{{ .Values.daskssh.image.name }}:{{ .Values.daskssh.image.tag | default .Chart.AppVersion }}" + memory: {{ .Values.ssh-forwader.sshFWD.limits.memory }} + cpu: {{ .Values.ssh-forwader.sshFWD.limits.cpu }} + imagePullPolicy: {{ .Values.ssh-forwader.sshFWD.image.pullPolicy }} + image: "{{ .Values.ssh-forwader.sshFWD.image.name }}:{{ .Values.ssh-forwader.sshFWD.image.tag | default .Chart.AppVersion }}" - name: listener resources: requests: - memory: {{ .Values.listener.requests.memory }} - cpu: {{ .Values.listener.requests.cpu }} + memory: {{ .Values.ssh-forwader.sshListener.requests.memory }} + cpu: {{ .Values.ssh-forwader.sshListener.requests.cpu }} limits: - memory: {{ .Values.listener.limits.memory }} - cpu: {{ .Values.listener.limits.cpu }} - imagePullPolicy: {{ .Values.listener.image.pullPolicy }} - image: "{{ .Values.listener.image.name }}:{{ .Values.listener.image.tag }}" + memory: {{ .Values.ssh-forwader.sshListener.limits.memory }} + cpu: {{ .Values.ssh-forwader.sshListener.limits.cpu }} + imagePullPolicy: {{ .Values.ssh-forwader.sshListener.image.pullPolicy }} + image: "{{ .Values.ssh-forwader.sshListener.image.name }}:{{ .Values.ssh-forwader.sshListener.image.tag | default .Chart.AppVersion }}" volumes: selector: matchLabels: diff --git a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml index 833e3e87..ec375763 100644 --- a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml +++ b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Service metadata: - name: daskssh + name: sshFWD spec: type: NodePort ports: - port: 8022 - nodePort: {{ .Values.daskssh.nodePort }} + nodePort: {{ .Values.ssh-forwarder.sshFWD.nodePort }} protocol: TCP name: daskssh selector: @@ -17,7 +17,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: listener + name: sshListener spec: type: ClusterIP clusterIP: diff --git a/stable/jhub-aas/values.schema.json b/stable/jhub-aas/values.schema.json index 364bcc3c..763fe42d 100644 --- a/stable/jhub-aas/values.schema.json +++ b/stable/jhub-aas/values.schema.json @@ -2,6 +2,140 @@ "$schema": "http://json-schema.org/schema#", "type": "object", "properties": { + "ssh-forwarder": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "redis": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "pullPolicy": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "integer" + }, + "memory": { + "type": "string" + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + } + } + }, + "sshFWD": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "pullPolicy": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "integer" + }, + "memory": { + "type": "string" + } + } + }, + "nodePort": { + "type": "integer" + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + } + } + }, + "sshListener": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "pullPolicy": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "integer" + }, + "memory": { + "type": "string" + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + } + } + } + } + }, "ingress": { "type": "boolean", "form": true, diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 44fd6eb1..3eafa9a6 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -17,7 +17,7 @@ ssh-forwarder: limits: cpu: 1 memory: 1G - listener: + sshListener: image: pullPolicy: Always name: dodasts/dask-ssh-listener @@ -28,7 +28,7 @@ ssh-forwarder: limits: cpu: 1 memory: 1G - daskssh: + sshFWD: image: pullPolicy: Always name: dodasts/dask-ssh-forwarder @@ -89,7 +89,7 @@ jupyterhub: hub: image: name: ghcr.io/dodas-ts/jhub - tag: 'v4.0.2' + tag: 'v4.0.27' cookieSecret: 72077073d819ce7a118a7dd7e2ce3eb74328cd306faa0540b1045d56113fdd0e # networkPolicy: @@ -116,6 +116,7 @@ jupyterhub: HTCONDOR_COLLECTOR_URL: .myip.cloud.infn.it:30618 HTCONDOR_SCHEDD_NAME: .myip.cloud.infn.it:31618 IAM_TOKEN: "" + SSH_NAMESPACE: default extraConfig: myConfig.py: | #!/usr/bin/env python @@ -189,6 +190,7 @@ jupyterhub: spawner.environment['REFRESH_TOKEN'] = auth_state['refresh_token'] spawner.environment['USERNAME'] = auth_state['oauth_user']['preferred_username'] spawner.environment['JUPYTERHUB_ACTIVITY_INTERVAL'] = "15" + spawner.environment['SSH_NAMESPACE'] = os.environ.get("SSH_NAMESPACE") amIAllowed = False From 516e9108a3d8a185c8c886a68eeb284a8ef05a8a Mon Sep 17 00:00:00 2001 From: ciangottini Date: Wed, 15 Sep 2021 21:19:53 +0200 Subject: [PATCH 05/59] chart verstion --- stable/jhub-aas/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/Chart.yaml b/stable/jhub-aas/Chart.yaml index 71fc6610..fca4e33b 100644 --- a/stable/jhub-aas/Chart.yaml +++ b/stable/jhub-aas/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: stable apiVersion: v1 name: JHUBaaS -version: 2.0.1 +version: 1.9.9 appVersion: 1.3.0 description: JHUBaaS Hub umbrella chart keywords: From dd515aa489824f1e34981035a44b7e9884ad280f Mon Sep 17 00:00:00 2001 From: ciangottini Date: Wed, 15 Sep 2021 21:27:29 +0200 Subject: [PATCH 06/59] fix wrong value names --- .../deployment-ssh-forwarder.yaml | 40 ++++++++++--------- .../ssh-forwarder/svc-ssh-forwarder.yaml | 6 ++- stable/jhub-aas/values.yaml | 2 +- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml index bfd1f274..220b1ca9 100644 --- a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml +++ b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml @@ -1,3 +1,4 @@ +{{- if .Values.sshForwarder.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -15,34 +16,34 @@ spec: - name: redis resources: requests: - memory: {{ .Values.ssh-forwader.redis.requests.memory }} - cpu: {{ .Values.ssh-forwader.redis.requests.cpu }} + memory: {{ .Values.sshForwarder.redis.requests.memory }} + cpu: {{ .Values.sshForwarder.redis.requests.cpu }} limits: - memory: {{ .Values.ssh-forwader.redis.limits.memory }} - cpu: {{ .Values.ssh-forwader.redis.limits.cpu }} - imagePullPolicy: {{ .Values.ssh-forwader.redis.image.pullPolicy }} - image: "{{ .Values.ssh-forwader.redis.image.name }}:{{ .Values.ssh-forwader.redis.image.tag }}" + memory: {{ .Values.sshForwarder.redis.limits.memory }} + cpu: {{ .Values.sshForwarder.redis.limits.cpu }} + imagePullPolicy: {{ .Values.sshForwarder.redis.image.pullPolicy }} + image: "{{ .Values.sshForwarder.redis.image.name }}:{{ .Values.sshForwarder.redis.image.tag }}" volumeMounts: [] - name: daskssh resources: requests: - memory: {{ .Values.ssh-forwader.sshFWD.requests.memory }} - cpu: {{ .Values.ssh-forwader.sshFWD.requests.cpu }} + memory: {{ .Values.sshForwarder.sshFWD.requests.memory }} + cpu: {{ .Values.sshForwarder.sshFWD.requests.cpu }} limits: - memory: {{ .Values.ssh-forwader.sshFWD.limits.memory }} - cpu: {{ .Values.ssh-forwader.sshFWD.limits.cpu }} - imagePullPolicy: {{ .Values.ssh-forwader.sshFWD.image.pullPolicy }} - image: "{{ .Values.ssh-forwader.sshFWD.image.name }}:{{ .Values.ssh-forwader.sshFWD.image.tag | default .Chart.AppVersion }}" + memory: {{ .Values.sshForwarder.sshFWD.limits.memory }} + cpu: {{ .Values.sshForwarder.sshFWD.limits.cpu }} + imagePullPolicy: {{ .Values.sshForwarder.sshFWD.image.pullPolicy }} + image: "{{ .Values.sshForwarder.sshFWD.image.name }}:{{ .Values.sshForwarder.sshFWD.image.tag | default .Chart.AppVersion }}" - name: listener resources: requests: - memory: {{ .Values.ssh-forwader.sshListener.requests.memory }} - cpu: {{ .Values.ssh-forwader.sshListener.requests.cpu }} + memory: {{ .Values.sshForwarder.sshListener.requests.memory }} + cpu: {{ .Values.sshForwarder.sshListener.requests.cpu }} limits: - memory: {{ .Values.ssh-forwader.sshListener.limits.memory }} - cpu: {{ .Values.ssh-forwader.sshListener.limits.cpu }} - imagePullPolicy: {{ .Values.ssh-forwader.sshListener.image.pullPolicy }} - image: "{{ .Values.ssh-forwader.sshListener.image.name }}:{{ .Values.ssh-forwader.sshListener.image.tag | default .Chart.AppVersion }}" + memory: {{ .Values.sshForwarder.sshListener.limits.memory }} + cpu: {{ .Values.sshForwarder.sshListener.limits.cpu }} + imagePullPolicy: {{ .Values.sshForwarder.sshListener.image.pullPolicy }} + image: "{{ .Values.sshForwarder.sshListener.image.name }}:{{ .Values.sshForwarder.sshListener.image.tag | default .Chart.AppVersion }}" volumes: selector: matchLabels: @@ -51,4 +52,5 @@ spec: replicas: 1 strategy: - type: Recreate \ No newline at end of file + type: Recreate +{{- end }} \ No newline at end of file diff --git a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml index ec375763..edb1f32b 100644 --- a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml +++ b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml @@ -1,3 +1,4 @@ +{{- if .Values.sshForwarder.enabled }} apiVersion: v1 kind: Service metadata: @@ -6,7 +7,7 @@ spec: type: NodePort ports: - port: 8022 - nodePort: {{ .Values.ssh-forwarder.sshFWD.nodePort }} + nodePort: {{ .Values.sshForwarder.sshFWD.nodePort }} protocol: TCP name: daskssh selector: @@ -27,4 +28,5 @@ spec: protocol: TCP name: listener selector: - app.kubernetes.io/name: daskssh \ No newline at end of file + app.kubernetes.io/name: daskssh +{{- end }} \ No newline at end of file diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 3eafa9a6..f20a79d4 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -4,7 +4,7 @@ ingress: true # Show options for htcondor integration htcondor: false -ssh-forwarder: +sshForwarder: enabled: false redis: image: From e28bb6494c1af47f84b32835f97e60989c6aa243 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Wed, 15 Sep 2021 21:45:45 +0200 Subject: [PATCH 07/59] fix ssh --- stable/jhub-aas/Chart.yaml | 2 +- .../ssh-forwarder/deployment-ssh-forwarder.yaml | 10 +++++----- .../templates/ssh-forwarder/svc-ssh-forwarder.yaml | 11 +++++------ stable/jhub-aas/values.yaml | 9 +++++++++ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/stable/jhub-aas/Chart.yaml b/stable/jhub-aas/Chart.yaml index fca4e33b..f377e792 100644 --- a/stable/jhub-aas/Chart.yaml +++ b/stable/jhub-aas/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: stable apiVersion: v1 name: JHUBaaS -version: 1.9.9 +version: 1.9.10 appVersion: 1.3.0 description: JHUBaaS Hub umbrella chart keywords: diff --git a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml index 220b1ca9..17a9857e 100644 --- a/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml +++ b/stable/jhub-aas/templates/ssh-forwarder/deployment-ssh-forwarder.yaml @@ -2,14 +2,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: daskssh + name: ssh-fwd labels: - app.kubernetes.io/name: daskssh + app.kubernetes.io/name: ssh-fwd spec: template: metadata: labels: - app.kubernetes.io/name: daskssh + app.kubernetes.io/name: ssh-fwd spec: priorityClassName: system-node-critical containers: @@ -24,7 +24,7 @@ spec: imagePullPolicy: {{ .Values.sshForwarder.redis.image.pullPolicy }} image: "{{ .Values.sshForwarder.redis.image.name }}:{{ .Values.sshForwarder.redis.image.tag }}" volumeMounts: [] - - name: daskssh + - name: ssh-fwd resources: requests: memory: {{ .Values.sshForwarder.sshFWD.requests.memory }} @@ -47,7 +47,7 @@ spec: volumes: selector: matchLabels: - app.kubernetes.io/name: daskssh + app.kubernetes.io/name: ssh-fwd replicas: 1 diff --git a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml index edb1f32b..0d22ddaf 100644 --- a/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml +++ b/stable/jhub-aas/templates/ssh-forwarder/svc-ssh-forwarder.yaml @@ -2,31 +2,30 @@ apiVersion: v1 kind: Service metadata: - name: sshFWD + name: ssh-fwd spec: type: NodePort ports: - port: 8022 nodePort: {{ .Values.sshForwarder.sshFWD.nodePort }} protocol: TCP - name: daskssh + name: ssh-fwd selector: - app.kubernetes.io/name: daskssh + app.kubernetes.io/name: ssh-fwd --- apiVersion: v1 kind: Service metadata: - name: sshListener + name: ssh-listener spec: type: ClusterIP - clusterIP: ports: - port: 8122 targetPort: 8122 protocol: TCP name: listener selector: - app.kubernetes.io/name: daskssh + app.kubernetes.io/name: ssh-fwd {{- end }} \ No newline at end of file diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index f20a79d4..324c6da5 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -86,6 +86,15 @@ jupyterhub: dynamic: storageClass: longhorn + # extraVolumeMounts: [ { mountPath: /etc/certs, name: hostcerts } ], + # extraVolumes: + # [ + # { + # name: hostcerts, + # secret: { defaultMode: 420, secretName: dask-tls } + # } + # ], + hub: image: name: ghcr.io/dodas-ts/jhub From f66ba53f5bcc303313317b2c9a2ad4b3c61f6faf Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 16 Sep 2021 10:42:55 +0200 Subject: [PATCH 08/59] jhub permissions --- stable/jhub-aas/docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 1c305a5e..42913fee 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -17,6 +17,8 @@ RUN echo "jovyan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ rm /bin/sh && \ ln -s /bin/bash /bin/sh +RUN chown -R $NB_UID /srv/jupyterhub /etc/jupyterhub + USER $NB_UID RUN mkdir -p .init From 0d4425fb888aae1e882810f254eab1372726aed3 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 16 Sep 2021 11:20:27 +0200 Subject: [PATCH 09/59] jhub root --- stable/jhub-aas/docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 42913fee..3f90b0c6 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -25,5 +25,6 @@ RUN mkdir -p .init COPY --from=REGISTRATION /usr/local/bin/dodas-IAMClientRec /srv/.init/dodas-IAMClientRec +USER root CMD ["/usr/bin/start.sh", "jupyterhub"] From 18d4ca508558fbef493d64e5958c6ea09b2eef77 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 16 Sep 2021 11:26:37 +0200 Subject: [PATCH 10/59] update jhub user --- stable/jhub-aas/docker/Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 3f90b0c6..1e0cd03d 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -17,14 +17,10 @@ RUN echo "jovyan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ rm /bin/sh && \ ln -s /bin/bash /bin/sh -RUN chown -R $NB_UID /srv/jupyterhub /etc/jupyterhub - -USER $NB_UID +RUN chown -R $NB_UID /srv/jupyterhub && chown -R $NB_UID /etc/jupyterhub RUN mkdir -p .init COPY --from=REGISTRATION /usr/local/bin/dodas-IAMClientRec /srv/.init/dodas-IAMClientRec -USER root - CMD ["/usr/bin/start.sh", "jupyterhub"] From 7d1c4f5cf58c21a50830df083cfd07fbfd61d9a6 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 16 Sep 2021 11:30:36 +0200 Subject: [PATCH 11/59] jhub root --- stable/jhub-aas/docker/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 1e0cd03d..056f950b 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -17,8 +17,6 @@ RUN echo "jovyan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ rm /bin/sh && \ ln -s /bin/bash /bin/sh -RUN chown -R $NB_UID /srv/jupyterhub && chown -R $NB_UID /etc/jupyterhub - RUN mkdir -p .init COPY --from=REGISTRATION /usr/local/bin/dodas-IAMClientRec /srv/.init/dodas-IAMClientRec From 766607f1c5464646f2b4e9a4a826549b6b5e1bf4 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 16 Sep 2021 11:42:12 +0200 Subject: [PATCH 12/59] fix user permissions --- stable/jhub-aas/docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 056f950b..9cd338c8 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -17,6 +17,8 @@ RUN echo "jovyan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ rm /bin/sh && \ ln -s /bin/bash /bin/sh +RUN chown -R jovyan /srv/jupyterhub && chown -R jovyan /etc/jupyterhub + RUN mkdir -p .init COPY --from=REGISTRATION /usr/local/bin/dodas-IAMClientRec /srv/.init/dodas-IAMClientRec From 85a6a79cdc6d9d99c0ec7a69ed6bc52b4a3cebbd Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 16 Sep 2021 11:51:11 +0200 Subject: [PATCH 13/59] revert permissions --- stable/jhub-aas/docker/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 9cd338c8..056f950b 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -17,8 +17,6 @@ RUN echo "jovyan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ rm /bin/sh && \ ln -s /bin/bash /bin/sh -RUN chown -R jovyan /srv/jupyterhub && chown -R jovyan /etc/jupyterhub - RUN mkdir -p .init COPY --from=REGISTRATION /usr/local/bin/dodas-IAMClientRec /srv/.init/dodas-IAMClientRec From 561eff5888e7b0ac2869e4aebf2a03536a863081 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Mon, 20 Sep 2021 12:04:04 +0200 Subject: [PATCH 14/59] update htcondor --- stable/htcondor-aas/Chart.yaml | 2 +- stable/htcondor-aas/templates/deployment_schedd.yaml | 4 ++++ stable/htcondor-aas/templates/deployment_wn.yaml | 5 +++-- stable/htcondor-aas/templates/external_apps/cvmfs-pod.yaml | 5 +++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/stable/htcondor-aas/Chart.yaml b/stable/htcondor-aas/Chart.yaml index b6610b8f..a3c23a77 100644 --- a/stable/htcondor-aas/Chart.yaml +++ b/stable/htcondor-aas/Chart.yaml @@ -4,7 +4,7 @@ apiVersion: v1 appVersion: 8.9.9 description: A Helm chart for the deployment of HTCondor cluster name: htcondor -version: 2.1.11 +version: 2.1.12 icon: https://research.cs.wisc.edu/htcondor/images/HTCondor_wiki_logo_small.png maintainers: - name: ttedesch diff --git a/stable/htcondor-aas/templates/deployment_schedd.yaml b/stable/htcondor-aas/templates/deployment_schedd.yaml index bf00b740..122bfdca 100644 --- a/stable/htcondor-aas/templates/deployment_schedd.yaml +++ b/stable/htcondor-aas/templates/deployment_schedd.yaml @@ -26,6 +26,10 @@ spec: - schedd topologyKey: kubernetes.io/hostname containers: + hostAliases: + - hostnames: + - {{ .Values.schedd.hostname }} + ip: {{ .Values.master.publicIP }} - name: schedd resources: requests: diff --git a/stable/htcondor-aas/templates/deployment_wn.yaml b/stable/htcondor-aas/templates/deployment_wn.yaml index ec049343..9f0cdbce 100644 --- a/stable/htcondor-aas/templates/deployment_wn.yaml +++ b/stable/htcondor-aas/templates/deployment_wn.yaml @@ -76,8 +76,9 @@ spec: livenessProbe: exec: command: - - ls - - /cvmfs/* + - bash + - -c + - "ls /cvmfs/*" initialDelaySeconds: 30 periodSeconds: 30 {{- end }} diff --git a/stable/htcondor-aas/templates/external_apps/cvmfs-pod.yaml b/stable/htcondor-aas/templates/external_apps/cvmfs-pod.yaml index 88a24ea6..0f846523 100644 --- a/stable/htcondor-aas/templates/external_apps/cvmfs-pod.yaml +++ b/stable/htcondor-aas/templates/external_apps/cvmfs-pod.yaml @@ -70,8 +70,9 @@ spec: livenessProbe: exec: command: - - ls - - /cvmfs/* + - bash + - -c + - "ls /cvmfs/*" initialDelaySeconds: 30 periodSeconds: 600 image: "{{ .Values.cvmfs.image }}:{{ .Values.cvmfs.tag }}" From 10610304fd293b475cb6d5cd3932c97545049af8 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Mon, 20 Sep 2021 12:16:49 +0200 Subject: [PATCH 15/59] patch hostaliases --- stable/htcondor-aas/Chart.yaml | 2 +- stable/htcondor-aas/templates/deployment_schedd.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/htcondor-aas/Chart.yaml b/stable/htcondor-aas/Chart.yaml index a3c23a77..50f55e27 100644 --- a/stable/htcondor-aas/Chart.yaml +++ b/stable/htcondor-aas/Chart.yaml @@ -4,7 +4,7 @@ apiVersion: v1 appVersion: 8.9.9 description: A Helm chart for the deployment of HTCondor cluster name: htcondor -version: 2.1.12 +version: 2.1.13 icon: https://research.cs.wisc.edu/htcondor/images/HTCondor_wiki_logo_small.png maintainers: - name: ttedesch diff --git a/stable/htcondor-aas/templates/deployment_schedd.yaml b/stable/htcondor-aas/templates/deployment_schedd.yaml index 122bfdca..c8e7e2b2 100644 --- a/stable/htcondor-aas/templates/deployment_schedd.yaml +++ b/stable/htcondor-aas/templates/deployment_schedd.yaml @@ -25,11 +25,11 @@ spec: values: - schedd topologyKey: kubernetes.io/hostname - containers: hostAliases: - hostnames: - {{ .Values.schedd.hostname }} ip: {{ .Values.master.publicIP }} + containers: - name: schedd resources: requests: From fcc0f2949011de60877b1ce82cf23a2dabcd81c9 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 11:24:25 +0200 Subject: [PATCH 16/59] update jlab image and --- stable/jhub-aas/Chart.yaml | 2 +- stable/jhub-aas/docker/Dockerfile | 2 +- stable/jhub-aas/docker/Dockerfile.base-htc | 2 +- stable/jhub-aas/docker/spawn.sh | 2 +- stable/jhub-aas/values.yaml | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/stable/jhub-aas/Chart.yaml b/stable/jhub-aas/Chart.yaml index f377e792..838642fc 100644 --- a/stable/jhub-aas/Chart.yaml +++ b/stable/jhub-aas/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: stable apiVersion: v1 name: JHUBaaS -version: 1.9.10 +version: 3.0.1 appVersion: 1.3.0 description: JHUBaaS Hub umbrella chart keywords: diff --git a/stable/jhub-aas/docker/Dockerfile b/stable/jhub-aas/docker/Dockerfile index 056f950b..6c26b85f 100644 --- a/stable/jhub-aas/docker/Dockerfile +++ b/stable/jhub-aas/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.6-pre2 as REGISTRATION +FROM ghcr.io/dodas-ts/dodas-iam-client-rec:v0.0.6-pre3 as REGISTRATION FROM jupyterhub/k8s-hub:0.11.1 diff --git a/stable/jhub-aas/docker/Dockerfile.base-htc b/stable/jhub-aas/docker/Dockerfile.base-htc index c341c524..757377e5 100644 --- a/stable/jhub-aas/docker/Dockerfile.base-htc +++ b/stable/jhub-aas/docker/Dockerfile.base-htc @@ -16,6 +16,6 @@ RUN wget https://research.cs.wisc.edu/htcondor/tarball/8.9/8.9.9/release/condor sudo mkdir -p /usr/libexec/ && sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/libexec/* /usr/libexec/ && \ sudo mkdir /etc/condor -COPY ./condor_config /etc/condor/condor_config +#COPY ./condor_config /etc/condor/condor_config WORKDIR /opt/workspace diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index 86249835..a278678f 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -8,7 +8,7 @@ oidc-gen dodas --issuer $IAM_SERVER \ --client-secret $IAM_CLIENT_SECRET \ --rt $REFRESH_TOKEN \ --confirm-yes \ - --scope "openid profile email" \ + --scope "openid profile email wlcg wlcg.groups" \ --redirect-uri http://localhost:8843 \ --pw-cmd "echo \"DUMMY PWD\"" diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 324c6da5..76e8e78b 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -98,7 +98,7 @@ jupyterhub: hub: image: name: ghcr.io/dodas-ts/jhub - tag: 'v4.0.27' + tag: 'v5.0.1-pre12' cookieSecret: 72077073d819ce7a118a7dd7e2ce3eb74328cd306faa0540b1045d56113fdd0e # networkPolicy: @@ -124,7 +124,7 @@ jupyterhub: WITH_GPU: "false" HTCONDOR_COLLECTOR_URL: .myip.cloud.infn.it:30618 HTCONDOR_SCHEDD_NAME: .myip.cloud.infn.it:31618 - IAM_TOKEN: "" + ACCESS_TOKEN: "" SSH_NAMESPACE: default extraConfig: myConfig.py: | @@ -303,9 +303,9 @@ jupyterhub: - - - + + +
From 3d728b33cd44f5e77078d3027559295060a00f35 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 11:57:48 +0200 Subject: [PATCH 17/59] update docker --- stable/jhub-aas/docker/Dockerfile.base | 41 +++++++++++++++++++++++--- stable/jhub-aas/values.yaml | 2 +- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.base b/stable/jhub-aas/docker/Dockerfile.base index 337a6844..c58005a5 100644 --- a/stable/jhub-aas/docker/Dockerfile.base +++ b/stable/jhub-aas/docker/Dockerfile.base @@ -17,10 +17,43 @@ RUN chmod +x /usr/local/bin/jupyterhub-singleuser && chmod +x /root/.init/spawn. RUN apt-get update \ && apt-get install -y gnupg2 software-properties-common -RUN apt-key adv --keyserver hkp://pgp.surfnet.nl --recv-keys ACDFB08FDC962044D87FF00B512839863D487A87 \ - && add-apt-repository "deb http://repo.data.kit.edu/ubuntu/bionic ./" - -RUN apt-get install -y oidc-agent +#RUN apt-key adv --keyserver hkp://pgp.surfnet.nl --recv-keys ACDFB08FDC962044D87FF00B512839863D487A87 \ +# && add-apt-repository "deb http://repo.data.kit.edu/ubuntu/bionic ./" + +RUN apt-get update && apt-get install -y \ + software-properties-common \ + help2man \ + check \ + devscripts \ + make \ + sudo \ + ca-certificates \ + libcurl4-openssl-dev \ + libsodium-dev \ + libseccomp-dev \ + libmicrohttpd-dev \ + libsecret-1-dev \ + python3 \ + python3-pip \ + wget \ + fuse \ + git \ + build-essential \ + debhelper \ + pkg-config \ + perl \ + sed \ + libqrencode-dev \ + fakeroot + + +RUN cd /opt/ && git clone https://github.com/indigo-dc/oidc-agent \ + && cd oidc-agent \ + && make \ + && make install_lib \ + && make install + +#RUN apt-get install -y oidc-agent COPY ./ca.crt /ca.crt diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 76e8e78b..05081201 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -363,7 +363,7 @@ jupyterhub: "_condor_AUTH_SSL_CLIENT_CAFILE": "/ca.crt", "_condor_SEC_DEFAULT_AUTHENTICATION_METHODS": "SCITOKENS", "_condor_SCITOKENS_FILE": "/tmp/token", - "_condot_TOOL_DEBUG": "D_FULLDEBUG,D_SECURITY" + "_condor_TOOL_DEBUG": "D_FULLDEBUG,D_SECURITY" } c.KubeSpawner.extra_container_config = { From 220ab98350e32d7750345160a68e01f6badb285f Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 15:10:29 +0200 Subject: [PATCH 18/59] update image --- stable/jhub-aas/docker/Dockerfile.base-htc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.base-htc b/stable/jhub-aas/docker/Dockerfile.base-htc index 757377e5..43bc7d56 100644 --- a/stable/jhub-aas/docker/Dockerfile.base-htc +++ b/stable/jhub-aas/docker/Dockerfile.base-htc @@ -5,17 +5,10 @@ USER root WORKDIR /tmp -RUN wget https://research.cs.wisc.edu/htcondor/tarball/8.9/8.9.9/release/condor-8.9.9-x86_64_Ubuntu20-stripped.tar.gz && \ - tar -xzvf condor-8.9.9-x86_64_Ubuntu20-stripped.tar.gz && \ - sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/bin/* /usr/bin/ && \ - sudo mkdir /usr/lib/condor && \ - sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/lib/condor/* /usr/lib/condor/ && \ - sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/lib/python3/* /usr/lib/python3/ && \ - sudo rm -r condor-8.9.9-x86_64_Ubuntu20-stripped/lib/condor condor-8.9.9-x86_64_Ubuntu20-stripped/lib/python3 && \ - sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/lib/* /usr/lib/ && \ - sudo mkdir -p /usr/libexec/ && sudo mv condor-8.9.9-x86_64_Ubuntu20-stripped/libexec/* /usr/libexec/ && \ - sudo mkdir /etc/condor +RUN apt-get install -y curl -#COPY ./condor_config /etc/condor/condor_config +RUN curl -fsSL https://get.htcondor.org | /bin/bash -s -- --no-dry-run + +COPY ./condor_config /etc/condor/condor_config WORKDIR /opt/workspace From 895d35ff567bca09bb12da6044ae54d893018d2a Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 15:40:16 +0200 Subject: [PATCH 19/59] htcondor install --- stable/jhub-aas/docker/Dockerfile.base-htc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.base-htc b/stable/jhub-aas/docker/Dockerfile.base-htc index 43bc7d56..fbb8b8a5 100644 --- a/stable/jhub-aas/docker/Dockerfile.base-htc +++ b/stable/jhub-aas/docker/Dockerfile.base-htc @@ -7,8 +7,11 @@ WORKDIR /tmp RUN apt-get install -y curl -RUN curl -fsSL https://get.htcondor.org | /bin/bash -s -- --no-dry-run +RUN curl -fsSL https://research.cs.wisc.edu/htcondor/repo/keys/HTCondor-Release.gpg.key | apt-key add - \ + && echo -e "deb [arch=amd64] https://research.cs.wisc.edu/htcondor/repo/ubuntu/8.9 focal main\ndeb-src https://research.cs.wisc.edu/htcondor/repo/ubuntu/8.9 focal main" > /etc/apt/sources.list.d/htcondor.list -COPY ./condor_config /etc/condor/condor_config +RUN apt update && apt-get install -y htcondor + +#COPY ./condor_config /etc/condor/condor_config WORKDIR /opt/workspace From 1faa42e3dd28d59624260df5c03b813150b6f09d Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 15:45:47 +0200 Subject: [PATCH 20/59] keep base condor_config --- stable/jhub-aas/docker/Dockerfile.base-htc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.base-htc b/stable/jhub-aas/docker/Dockerfile.base-htc index fbb8b8a5..69af8226 100644 --- a/stable/jhub-aas/docker/Dockerfile.base-htc +++ b/stable/jhub-aas/docker/Dockerfile.base-htc @@ -12,6 +12,6 @@ RUN curl -fsSL https://research.cs.wisc.edu/htcondor/repo/keys/HTCondor-Release. RUN apt update && apt-get install -y htcondor -#COPY ./condor_config /etc/condor/condor_config +COPY ./condor_config /etc/condor/condor_config WORKDIR /opt/workspace From 3791e3870f6a3f3d31b86b3679b752d0e034b8d6 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 16:09:54 +0200 Subject: [PATCH 21/59] htcondor demo --- stable/jhub-aas/docker/Dockerfile.base-htc | 2 +- stable/jhub-aas/docker/htc-demo/simple | 4 ++++ stable/jhub-aas/docker/htc-demo/sub | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 stable/jhub-aas/docker/htc-demo/simple create mode 100644 stable/jhub-aas/docker/htc-demo/sub diff --git a/stable/jhub-aas/docker/Dockerfile.base-htc b/stable/jhub-aas/docker/Dockerfile.base-htc index 69af8226..92d9811c 100644 --- a/stable/jhub-aas/docker/Dockerfile.base-htc +++ b/stable/jhub-aas/docker/Dockerfile.base-htc @@ -13,5 +13,5 @@ RUN curl -fsSL https://research.cs.wisc.edu/htcondor/repo/keys/HTCondor-Release. RUN apt update && apt-get install -y htcondor COPY ./condor_config /etc/condor/condor_config - +COPY ./htc-demo /opt/workspace/htc-example WORKDIR /opt/workspace diff --git a/stable/jhub-aas/docker/htc-demo/simple b/stable/jhub-aas/docker/htc-demo/simple new file mode 100644 index 00000000..f1a22e17 --- /dev/null +++ b/stable/jhub-aas/docker/htc-demo/simple @@ -0,0 +1,4 @@ +#!/bin/bash + +sleep 100 +echo $HOSTNAME \ No newline at end of file diff --git a/stable/jhub-aas/docker/htc-demo/sub b/stable/jhub-aas/docker/htc-demo/sub new file mode 100644 index 00000000..b11ba79f --- /dev/null +++ b/stable/jhub-aas/docker/htc-demo/sub @@ -0,0 +1,7 @@ +universe = vanilla +executable = simple +log = simple.log +output = simple.out +error = simple.error ++OWNER = "condor" +queue \ No newline at end of file From 11d66838cbdf5ea22fda6847eb7203ac21fc047f Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 16:12:44 +0200 Subject: [PATCH 22/59] update htcondor chart --- stable/jhub-aas/Chart.yaml | 2 +- stable/jhub-aas/values.schema.json | 2 +- stable/jhub-aas/values.yaml | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/stable/jhub-aas/Chart.yaml b/stable/jhub-aas/Chart.yaml index 838642fc..792c4bdb 100644 --- a/stable/jhub-aas/Chart.yaml +++ b/stable/jhub-aas/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: stable apiVersion: v1 name: JHUBaaS -version: 3.0.1 +version: 3.0.2 appVersion: 1.3.0 description: JHUBaaS Hub umbrella chart keywords: diff --git a/stable/jhub-aas/values.schema.json b/stable/jhub-aas/values.schema.json index 763fe42d..3b30aa60 100644 --- a/stable/jhub-aas/values.schema.json +++ b/stable/jhub-aas/values.schema.json @@ -187,7 +187,7 @@ "extraEnv": { "type": "object", "properties": { - "IAM_TOKEN": { + "ACCESS_TOKEN": { "type": "string", "form": true, "title": "Insert you IAM access token", diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 05081201..1a30cbd7 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -98,7 +98,7 @@ jupyterhub: hub: image: name: ghcr.io/dodas-ts/jhub - tag: 'v5.0.1-pre12' + tag: 'v5.0.1-pre15' cookieSecret: 72077073d819ce7a118a7dd7e2ce3eb74328cd306faa0540b1045d56113fdd0e # networkPolicy: @@ -303,9 +303,9 @@ jupyterhub: - - - + + +
@@ -360,6 +360,7 @@ jupyterhub: c.KubeSpawner.environment = { "_condor_COLLECTOR_HOST": os.environ["HTCONDOR_COLLECTOR_URL"], "_condor_SCHEDD_HOST": os.environ["HTCONDOR_SCHEDD_NAME"], + "_condor_SCHEDD_NAME": os.environ["HTCONDOR_SCHEDD_NAME"], "_condor_AUTH_SSL_CLIENT_CAFILE": "/ca.crt", "_condor_SEC_DEFAULT_AUTHENTICATION_METHODS": "SCITOKENS", "_condor_SCITOKENS_FILE": "/tmp/token", From 08e1d523e6c67a9fe16d2c4e020e03fd7095d5d2 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 16:28:47 +0200 Subject: [PATCH 23/59] fermi in test --- stable/fermi/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/fermi/Chart.yaml b/stable/fermi/Chart.yaml index 041fec52..2cabfb00 100644 --- a/stable/fermi/Chart.yaml +++ b/stable/fermi/Chart.yaml @@ -1,8 +1,8 @@ annotations: - category: stable + category: test apiVersion: v1 name: Fermi-experiment -version: 1.0.4 +version: 1.0.5 appVersion: 8.9.9 description: HTCondor pool for Fermi experiment keywords: From 56411dd502c18570fad23ed13bf9944b88365f46 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 21 Sep 2021 16:39:03 +0200 Subject: [PATCH 24/59] update defualt htcondor values schedd --- stable/jhub-aas/Chart.yaml | 2 +- stable/jhub-aas/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/jhub-aas/Chart.yaml b/stable/jhub-aas/Chart.yaml index 792c4bdb..84f3dc8d 100644 --- a/stable/jhub-aas/Chart.yaml +++ b/stable/jhub-aas/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: stable apiVersion: v1 name: JHUBaaS -version: 3.0.2 +version: 3.0.3 appVersion: 1.3.0 description: JHUBaaS Hub umbrella chart keywords: diff --git a/stable/jhub-aas/values.yaml b/stable/jhub-aas/values.yaml index 1a30cbd7..7982c30a 100644 --- a/stable/jhub-aas/values.yaml +++ b/stable/jhub-aas/values.yaml @@ -123,7 +123,7 @@ jupyterhub: ADMIN_OAUTH_GROUPS: /admins WITH_GPU: "false" HTCONDOR_COLLECTOR_URL: .myip.cloud.infn.it:30618 - HTCONDOR_SCHEDD_NAME: .myip.cloud.infn.it:31618 + HTCONDOR_SCHEDD_NAME: .myip.cloud.infn.it ACCESS_TOKEN: "" SSH_NAMESPACE: default extraConfig: From e843caa45e3a4b80072e0586351c0e88b94d901a Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 09:48:37 +0200 Subject: [PATCH 25/59] dask image --- .github/workflows/docker-jhub-nb.yml | 10 ++++++++++ stable/jhub-aas/docker/Dockerfile.dask | 8 ++++++++ stable/jhub-aas/docker/jupyterhub-singleuser.sh | 6 ++++++ stable/jhub-aas/docker/spawn.sh | 3 +++ 4 files changed, 27 insertions(+) create mode 100644 stable/jhub-aas/docker/Dockerfile.dask create mode 100644 stable/jhub-aas/docker/jupyterhub-singleuser.sh diff --git a/.github/workflows/docker-jhub-nb.yml b/.github/workflows/docker-jhub-nb.yml index 6c843508..e6824fac 100644 --- a/.github/workflows/docker-jhub-nb.yml +++ b/.github/workflows/docker-jhub-nb.yml @@ -46,6 +46,16 @@ jobs: file: ./stable/jhub-aas/docker/Dockerfile.base-htc platforms: linux/amd64 build-args: "NOTEBOOK_VERSION=${{ env.RELEASE_VERSION }}" + - name: Build container base+HTC+DASK image + uses: docker/build-push-action@v2 + with: + context: ./stable/jhub-aas/docker/ + outputs: "type=registry,push=true" + tags: | + ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/notebook:${{ env.RELEASE_VERSION }}-htc + file: ./stable/jhub-aas/docker/Dockerfile.dask + platforms: linux/amd64 + build-args: "NOTEBOOK_VERSION=${{ env.RELEASE_VERSION }}" - name: Build container base+htc+ROOT image uses: docker/build-push-action@v2 with: diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask new file mode 100644 index 00000000..9e6fcc3e --- /dev/null +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -0,0 +1,8 @@ +ARG NOTEBOOK_VERSION +FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc +USER root + +RUN pip install + +COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh +WORKDIR /opt/workspace diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh new file mode 100644 index 00000000..5319325c --- /dev/null +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh +conda activate cms-dodas + +python /usr/local/bin/jupyterhub-singleuser "$@" \ No newline at end of file diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index a278678f..307552ed 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -13,3 +13,6 @@ oidc-gen dodas --issuer $IAM_SERVER \ --pw-cmd "echo \"DUMMY PWD\"" while true; do oidc-token dodas --time 1200 > /tmp/token; sleep 600; done & + +source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh +conda activate cms-dodas \ No newline at end of file From 93e28b14b27f602eb43ca7c61340212becb03e4e Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 09:50:06 +0200 Subject: [PATCH 26/59] fix spawn --- stable/jhub-aas/docker/spawn.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index 307552ed..ef271b4f 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -14,5 +14,7 @@ oidc-gen dodas --issuer $IAM_SERVER \ while true; do oidc-token dodas --time 1200 > /tmp/token; sleep 600; done & -source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh -conda activate cms-dodas \ No newline at end of file +if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then + source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh + conda activate cms-dodas +fi \ No newline at end of file From 750e5aeba4447ef950aec02671203e8863a5f0ac Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 09:58:51 +0200 Subject: [PATCH 27/59] fix dask dockerfile --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 9e6fcc3e..1d39da3e 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -2,7 +2,7 @@ ARG NOTEBOOK_VERSION FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc USER root -RUN pip install +#RUN pip install COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh WORKDIR /opt/workspace From 8692b4d3227a2125f98f05463cad8ac59fd0c760 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 10:10:28 +0200 Subject: [PATCH 28/59] fix dask image name --- .github/workflows/docker-jhub-nb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-jhub-nb.yml b/.github/workflows/docker-jhub-nb.yml index e6824fac..8c10182b 100644 --- a/.github/workflows/docker-jhub-nb.yml +++ b/.github/workflows/docker-jhub-nb.yml @@ -52,7 +52,7 @@ jobs: context: ./stable/jhub-aas/docker/ outputs: "type=registry,push=true" tags: | - ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/notebook:${{ env.RELEASE_VERSION }}-htc + ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/notebook:${{ env.RELEASE_VERSION }}-dask file: ./stable/jhub-aas/docker/Dockerfile.dask platforms: linux/amd64 build-args: "NOTEBOOK_VERSION=${{ env.RELEASE_VERSION }}" From ddf0c0d94f8c710a695e24387e859a588cc70324 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 10:38:15 +0200 Subject: [PATCH 29/59] chmod +x dask exec --- stable/jhub-aas/docker/Dockerfile.dask | 1 + 1 file changed, 1 insertion(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 1d39da3e..49804b38 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -5,4 +5,5 @@ USER root #RUN pip install COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh +RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh WORKDIR /opt/workspace From a81a3f3d048369ab95c93b08028d525e4fbd72ae Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 10:58:11 +0200 Subject: [PATCH 30/59] separate dask cvmfs from jupyterlab --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 49804b38..9b2f0681 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -3,7 +3,7 @@ FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc USER root #RUN pip install - +RUN pip install --user jupyterlab jupyterhub notebook COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh WORKDIR /opt/workspace From 46afa29d8c52b67ab84688a83f4a56fe7a10d5f6 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 11:44:34 +0200 Subject: [PATCH 31/59] PYTHONPATH dask --- stable/jhub-aas/docker/jupyterhub-singleuser.sh | 2 ++ stable/jhub-aas/docker/spawn.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index 5319325c..ca34b9ec 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -3,4 +3,6 @@ source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh conda activate cms-dodas +export PYTHONPATH=/root/.local/lib/python3.9/site-packages/:$PYTHONPATH + python /usr/local/bin/jupyterhub-singleuser "$@" \ No newline at end of file diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index ef271b4f..4f226583 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -17,4 +17,6 @@ while true; do oidc-token dodas --time 1200 > /tmp/token; sleep 600; done & if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh conda activate cms-dodas + /root/.local/lib/python3.9/site-packages/ + export PYTHONPATH=/root/.local/lib/python3.9/site-packages/:$PYTHONPATH fi \ No newline at end of file From 5a3e801c4ce6e626c154645e694f2ddd69e723b3 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 12:10:41 +0200 Subject: [PATCH 32/59] correct path and dask --- stable/jhub-aas/docker/Dockerfile.dask | 13 +++++++++++-- stable/jhub-aas/docker/spawn.sh | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 9b2f0681..e07c6062 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -2,8 +2,17 @@ ARG NOTEBOOK_VERSION FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc USER root -#RUN pip install -RUN pip install --user jupyterlab jupyterhub notebook +# Install DASK jobqueue +RUN pip install dask-remote-jobqueue==v0.4.8 + +# Old approach +# RUN python3 -m pip install dask-labextension "dask[dataframe]" +# COPY labextension.yaml /usr/local/lib/python3.6/site-packages/dask_labextension/labextension.yaml +RUN python -m pip install jupyter-packaging \ + && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git \ + && cd dask-labextension \ + && python -m pip install . + COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh WORKDIR /opt/workspace diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index 4f226583..a92c36ff 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -18,5 +18,5 @@ if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh conda activate cms-dodas /root/.local/lib/python3.9/site-packages/ - export PYTHONPATH=/root/.local/lib/python3.9/site-packages/:$PYTHONPATH + export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH fi \ No newline at end of file From 2aa8cd4b49891b568e74a75bc4f2627280594bfb Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 12:11:13 +0200 Subject: [PATCH 33/59] correct path for jlab --- stable/jhub-aas/docker/jupyterhub-singleuser.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index ca34b9ec..25b20686 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -3,6 +3,6 @@ source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh conda activate cms-dodas -export PYTHONPATH=/root/.local/lib/python3.9/site-packages/:$PYTHONPATH +export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH python /usr/local/bin/jupyterhub-singleuser "$@" \ No newline at end of file From bbb7b1601c301900dcbab958ab7d4d09bfe60b1c Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 12:29:36 +0200 Subject: [PATCH 34/59] import correct root ld path --- stable/jhub-aas/docker/jupyterhub-singleuser.sh | 2 ++ stable/jhub-aas/docker/spawn.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index 25b20686..e1b0b80c 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -5,4 +5,6 @@ conda activate cms-dodas export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH +source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh + python /usr/local/bin/jupyterhub-singleuser "$@" \ No newline at end of file diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index a92c36ff..3206173c 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -19,4 +19,5 @@ if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then conda activate cms-dodas /root/.local/lib/python3.9/site-packages/ export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH + source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh fi \ No newline at end of file From 29ac383219a4e9adaa670ac5d42204a70d4b1b3f Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 14:13:40 +0200 Subject: [PATCH 35/59] start jupyterlab --- stable/jhub-aas/docker/jupyterhub-singleuser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser b/stable/jhub-aas/docker/jupyterhub-singleuser index 38d1d823..2eba15a9 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser +++ b/stable/jhub-aas/docker/jupyterhub-singleuser @@ -5,7 +5,7 @@ import re import sys import time -from jupyterhub.singleuser import main +from jupyterlab.labhubapp import main from subprocess import Popen, DEVNULL if __name__ == '__main__': From 229cf89816f80ea2d2f5dd65ef9ab754c2e732c3 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 22:06:34 +0200 Subject: [PATCH 36/59] dask packages --- stable/jhub-aas/docker/Dockerfile.dask | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index e07c6062..04c343a5 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -2,6 +2,33 @@ ARG NOTEBOOK_VERSION FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc USER root +WORKDIR /usr/local/share + +# Install jupyterhub stuff +RUN curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash - +RUN yum update -y && \ + yum install -y nodejs && \ + yum clean all && \ + rm -rf /var/cache/yum +RUN npm install -g configurable-http-proxy + +# Dask and jupyterhub +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install --upgrade setuptools +RUN python3 -m pip install dask \ + dask_jobqueue \ + click==7.1.2 \ + numpy \ + bokeh \ + ipython \ + jupyterhub \ + jupyterlab \ + notebook \ + jupyter-server-proxy \ + ipywidgets +RUN python3 -m pip install "dask[dataframe]" +RUN rm -r /root/.cache + # Install DASK jobqueue RUN pip install dask-remote-jobqueue==v0.4.8 From f5d799133ac29d32fb4db7a311343f7bfe97316e Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 22:09:23 +0200 Subject: [PATCH 37/59] fix install packages --- stable/jhub-aas/docker/Dockerfile.dask | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 04c343a5..ba67b149 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -2,16 +2,6 @@ ARG NOTEBOOK_VERSION FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc USER root -WORKDIR /usr/local/share - -# Install jupyterhub stuff -RUN curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash - -RUN yum update -y && \ - yum install -y nodejs && \ - yum clean all && \ - rm -rf /var/cache/yum -RUN npm install -g configurable-http-proxy - # Dask and jupyterhub RUN python3 -m pip install --upgrade pip RUN python3 -m pip install --upgrade setuptools From 36ee2144a8948a553c7360c006500887bfce0e82 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 22:10:14 +0200 Subject: [PATCH 38/59] root ipython folder --- stable/jhub-aas/docker/Dockerfile.dask | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index ba67b149..2aab898b 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -30,6 +30,8 @@ RUN python -m pip install jupyter-packaging \ && cd dask-labextension \ && python -m pip install . +RUN /root/.ipython + COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh WORKDIR /opt/workspace From 2de37779b6ba5374e1a3ab2d67b9b5c38a2e0859 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 22:22:13 +0200 Subject: [PATCH 39/59] fix dask dockerfile --- stable/jhub-aas/docker/Dockerfile.dask | 1 - 1 file changed, 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 2aab898b..66c9890d 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -17,7 +17,6 @@ RUN python3 -m pip install dask \ jupyter-server-proxy \ ipywidgets RUN python3 -m pip install "dask[dataframe]" -RUN rm -r /root/.cache # Install DASK jobqueue RUN pip install dask-remote-jobqueue==v0.4.8 From 0c5f6faaf5a3c94d38100df71a57237f4331b3d3 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 22:34:34 +0200 Subject: [PATCH 40/59] mkdir ipython --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 66c9890d..f9cee61c 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -29,7 +29,7 @@ RUN python -m pip install jupyter-packaging \ && cd dask-labextension \ && python -m pip install . -RUN /root/.ipython +RUN mkdir -p /root/.ipython COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh From 5e2abf206ebbd96c10266538df16a0d6b232217d Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 23:13:30 +0200 Subject: [PATCH 41/59] import only root --- stable/jhub-aas/docker/jupyterhub-singleuser.sh | 4 ++-- stable/jhub-aas/docker/spawn.sh | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index e1b0b80c..9c8aad01 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -1,7 +1,7 @@ #!/bin/bash -source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh -conda activate cms-dodas +#source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh +#conda activate cms-dodas export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index 3206173c..11ed192f 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -15,9 +15,8 @@ oidc-gen dodas --issuer $IAM_SERVER \ while true; do oidc-token dodas --time 1200 > /tmp/token; sleep 600; done & if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then - source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh - conda activate cms-dodas - /root/.local/lib/python3.9/site-packages/ - export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH + #source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh + #conda activate cms-dodas + #export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh fi \ No newline at end of file From 939ca1bb63692cd0e3049d94e35f62bf68cf76fe Mon Sep 17 00:00:00 2001 From: ciangottini Date: Thu, 23 Sep 2021 23:22:40 +0200 Subject: [PATCH 42/59] root overwrite jupyterPATH --- stable/jhub-aas/docker/jupyterhub-singleuser.sh | 6 ++++-- stable/jhub-aas/docker/spawn.sh | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index 9c8aad01..c2d1ca36 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -1,10 +1,12 @@ #!/bin/bash -#source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh -#conda activate cms-dodas +source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh +conda activate cms-dodas export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh +export JUPYTER_PATH=/opt/conda/etc/jupyter +export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter python /usr/local/bin/jupyterhub-singleuser "$@" \ No newline at end of file diff --git a/stable/jhub-aas/docker/spawn.sh b/stable/jhub-aas/docker/spawn.sh index 11ed192f..3db7aadc 100644 --- a/stable/jhub-aas/docker/spawn.sh +++ b/stable/jhub-aas/docker/spawn.sh @@ -15,8 +15,10 @@ oidc-gen dodas --issuer $IAM_SERVER \ while true; do oidc-token dodas --time 1200 > /tmp/token; sleep 600; done & if [[ -f "cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh" ]]; then - #source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh - #conda activate cms-dodas - #export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH + source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh + conda activate cms-dodas + export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh + export JUPYTER_PATH=/opt/conda/etc/jupyter + export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter fi \ No newline at end of file From f423b8866acdd3a182039ec4dfedd0de01a7c39d Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 09:21:49 +0200 Subject: [PATCH 43/59] working extension --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index f9cee61c..0a2d4b41 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -27,7 +27,7 @@ RUN pip install dask-remote-jobqueue==v0.4.8 RUN python -m pip install jupyter-packaging \ && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git \ && cd dask-labextension \ - && python -m pip install . + && jupyter labextension install . RUN mkdir -p /root/.ipython From 94a7a52e763656d975ba4e307038ba0a9d2b8bd7 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 09:35:13 +0200 Subject: [PATCH 44/59] npm dask run build --- stable/jhub-aas/docker/Dockerfile.dask | 1 + 1 file changed, 1 insertion(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 0a2d4b41..340aec05 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -27,6 +27,7 @@ RUN pip install dask-remote-jobqueue==v0.4.8 RUN python -m pip install jupyter-packaging \ && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git \ && cd dask-labextension \ + && npm run build \ && jupyter labextension install . RUN mkdir -p /root/.ipython From da3d2ce89e53123dd3c47b9afaddec3b7c56e223 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 10:43:44 +0200 Subject: [PATCH 45/59] separate ops dask --- stable/jhub-aas/docker/Dockerfile.dask | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 340aec05..1e2de002 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -25,10 +25,12 @@ RUN pip install dask-remote-jobqueue==v0.4.8 # RUN python3 -m pip install dask-labextension "dask[dataframe]" # COPY labextension.yaml /usr/local/lib/python3.6/site-packages/dask_labextension/labextension.yaml RUN python -m pip install jupyter-packaging \ - && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git \ - && cd dask-labextension \ - && npm run build \ - && jupyter labextension install . + && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git + +WORKDIR /opt/workspace/dask-labextension +RUN npm run build + +RUN jupyter labextension install . RUN mkdir -p /root/.ipython From e339b75b7d2319562bec57b846c2e7ddec949d77 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 11:08:51 +0200 Subject: [PATCH 46/59] dask npm immage --- stable/jhub-aas/docker/Dockerfile.dask | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 1e2de002..a3fcd194 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -27,6 +27,9 @@ RUN pip install dask-remote-jobqueue==v0.4.8 RUN python -m pip install jupyter-packaging \ && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git +RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - +RUN DEBIAN_FRONTEND=noninteractive apt install -y nodejs + WORKDIR /opt/workspace/dask-labextension RUN npm run build From e62744489d713b7cffe1b0be025e4d7429ad310a Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 11:38:04 +0200 Subject: [PATCH 47/59] last try dask --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index a3fcd194..dd426990 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -31,7 +31,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN DEBIAN_FRONTEND=noninteractive apt install -y nodejs WORKDIR /opt/workspace/dask-labextension -RUN npm run build +RUN npm install -g npm@7.24.1 && npm install typescript -g && npm run build RUN jupyter labextension install . From e078e91b685654094611368a744efa0c2eeb0af1 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 11:52:55 +0200 Subject: [PATCH 48/59] actual --- stable/jhub-aas/docker/Dockerfile.dask | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index dd426990..e369a130 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -31,7 +31,10 @@ RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN DEBIAN_FRONTEND=noninteractive apt install -y nodejs WORKDIR /opt/workspace/dask-labextension -RUN npm install -g npm@7.24.1 && npm install typescript -g && npm run build +RUN npm install -g npm@7.24.1 && npm install typescript -g +# && npm run build + +RUN jupyter labextension install . || npm run build RUN jupyter labextension install . From 2b57fc2cf8a21efe98d4544f4ada48c5708eef85 Mon Sep 17 00:00:00 2001 From: mircot Date: Fri, 24 Sep 2021 12:46:14 +0200 Subject: [PATCH 49/59] Fix dask labextension installation --- stable/jhub-aas/docker/Dockerfile.dask | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index e369a130..50baba53 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -24,18 +24,17 @@ RUN pip install dask-remote-jobqueue==v0.4.8 # Old approach # RUN python3 -m pip install dask-labextension "dask[dataframe]" # COPY labextension.yaml /usr/local/lib/python3.6/site-packages/dask_labextension/labextension.yaml -RUN python -m pip install jupyter-packaging \ - && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git - RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - RUN DEBIAN_FRONTEND=noninteractive apt install -y nodejs +RUN npm install npm@latest -g +RUN npm install -g typescript yarn -WORKDIR /opt/workspace/dask-labextension -RUN npm install -g npm@7.24.1 && npm install typescript -g -# && npm run build - -RUN jupyter labextension install . || npm run build +RUN python -m pip install jupyter-packaging \ + && git clone --branch custom_clusters https://github.com/DODAS-TS/dask-labextension.git +WORKDIR /opt/workspace/dask-labextension +RUN jlpm +RUN npm run build && npm install RUN jupyter labextension install . RUN mkdir -p /root/.ipython From 2d6d657ab6e0b5d040aef07d6345ad8277a7b562 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 15:29:54 +0200 Subject: [PATCH 50/59] 4.14 dask-remote-jobqueue --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 50baba53..4201ee29 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -19,7 +19,7 @@ RUN python3 -m pip install dask \ RUN python3 -m pip install "dask[dataframe]" # Install DASK jobqueue -RUN pip install dask-remote-jobqueue==v0.4.8 +RUN pip install dask-remote-jobqueue==v0.4.14.dev0 # Old approach # RUN python3 -m pip install dask-labextension "dask[dataframe]" From 82775fcb5142892fa1d276db8f437f8b1303af2c Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 15:34:23 +0200 Subject: [PATCH 51/59] 4.15 dask --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 4201ee29..7fd6afc6 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -19,7 +19,7 @@ RUN python3 -m pip install dask \ RUN python3 -m pip install "dask[dataframe]" # Install DASK jobqueue -RUN pip install dask-remote-jobqueue==v0.4.14.dev0 +RUN pip install dask-remote-jobqueue==v0.4.15.dev0 # Old approach # RUN python3 -m pip install dask-labextension "dask[dataframe]" From d5446db12afc31e40797583e3cff35316ed8fe63 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 22:45:25 +0200 Subject: [PATCH 52/59] daskjobqueue 0.4.18 --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 7fd6afc6..7fca6d27 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -19,7 +19,7 @@ RUN python3 -m pip install dask \ RUN python3 -m pip install "dask[dataframe]" # Install DASK jobqueue -RUN pip install dask-remote-jobqueue==v0.4.15.dev0 +RUN pip install dask-remote-jobqueue==0.4.18 # Old approach # RUN python3 -m pip install dask-labextension "dask[dataframe]" From a4053994d0282b08e4b5be715071a17a3e8f624e Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 22:59:04 +0200 Subject: [PATCH 53/59] dask 19 --- stable/jhub-aas/docker/Dockerfile.dask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 7fca6d27..1c3ee9e7 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -19,7 +19,7 @@ RUN python3 -m pip install dask \ RUN python3 -m pip install "dask[dataframe]" # Install DASK jobqueue -RUN pip install dask-remote-jobqueue==0.4.18 +RUN pip install dask-remote-jobqueue==0.4.19 # Old approach # RUN python3 -m pip install dask-labextension "dask[dataframe]" From 9b160f4d5bfb7274692d00b9e4c62ac31a68d676 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Fri, 24 Sep 2021 23:37:40 +0200 Subject: [PATCH 54/59] LD_LIBRARYPATH --- stable/jhub-aas/docker/jupyterhub-singleuser.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index c2d1ca36..64f6182a 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -6,6 +6,7 @@ conda activate cms-dodas export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/lib export JUPYTER_PATH=/opt/conda/etc/jupyter export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter From 0ff0a7190a9df645f91b6d3d9b283aee78681607 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Mon, 27 Sep 2021 12:34:45 +0200 Subject: [PATCH 55/59] install root --- stable/jhub-aas/docker/Dockerfile.dask | 21 +++++++++++++++++++ .../jhub-aas/docker/jupyterhub-singleuser.sh | 15 ++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 1c3ee9e7..8c48c5d9 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -2,6 +2,27 @@ ARG NOTEBOOK_VERSION FROM ghcr.io/dodas-ts/notebook:${NOTEBOOK_VERSION}-htc USER root +RUN apt-get install -y dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \ + libxft-dev libxext-dev python libssl-dev \ + gfortran libpcre3-dev \ + xlibmesa-glu-dev libglew1.5-dev libftgl-dev \ + libmysqlclient-dev libfftw3-dev libcfitsio-dev \ + graphviz-dev libavahi-compat-libdnssd-dev \ + libldap2-dev python-dev libxml2-dev libkrb5-dev \ + libgsl0-dev + +RUN mkdir root6build root6 +RUN git clone --branch distrdf-dask https://github.com/vepadulano/root.git root6source + +WORKDIR /usr/local/share/root6source + +WORKDIR /usr/local/share/root6build +RUN cmake \ + -DCMAKE_INSTALL_PREFIX=/usr/local/share/root6 \ + -DPython3_EXECUTABLE=/usr/bin/python3 /usr/local/share/root6source + +RUN cmake --build . --target install -- -j4 + # Dask and jupyterhub RUN python3 -m pip install --upgrade pip RUN python3 -m pip install --upgrade setuptools diff --git a/stable/jhub-aas/docker/jupyterhub-singleuser.sh b/stable/jhub-aas/docker/jupyterhub-singleuser.sh index 64f6182a..1f8f8a56 100644 --- a/stable/jhub-aas/docker/jupyterhub-singleuser.sh +++ b/stable/jhub-aas/docker/jupyterhub-singleuser.sh @@ -1,13 +1,14 @@ #!/bin/bash -source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh -conda activate cms-dodas +#source /cvmfs/cms.dodas.infn.it/miniconda3/etc/profile.d/conda.sh +#conda activate cms-dodas -export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH +#export PYTHONPATH=/opt/conda/lib/python3.9/site-packages/:$PYTHONPATH -source /cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/bin/thisroot.sh -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/lib -export JUPYTER_PATH=/opt/conda/etc/jupyter -export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter +source /usr/local/share/root6/bin/thisroot.sh + +#export LD_LIBRARY_PATH=/cvmfs/cms.dodas.infn.it/miniconda3/envs/cms-dodas/lib:$LD_LIBRARY_PATH +#export JUPYTER_PATH=/opt/conda/etc/jupyter +#export JUPYTER_CONFIG_DIR=/opt/conda/etc/jupyter python /usr/local/bin/jupyterhub-singleuser "$@" \ No newline at end of file From 7e7c6fe3f80456148cf636e4e53716ea7daabdaf Mon Sep 17 00:00:00 2001 From: ciangottini Date: Mon, 27 Sep 2021 14:08:06 +0200 Subject: [PATCH 56/59] fix share root dir creation dask --- stable/jhub-aas/docker/Dockerfile.dask | 1 + 1 file changed, 1 insertion(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 8c48c5d9..fe141a52 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -11,6 +11,7 @@ RUN apt-get install -y dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \ libldap2-dev python-dev libxml2-dev libkrb5-dev \ libgsl0-dev +WORKDIR /usr/local/share/ RUN mkdir root6build root6 RUN git clone --branch distrdf-dask https://github.com/vepadulano/root.git root6source From 3fbf4027450debe167038d98ea0168c2cf4bdc41 Mon Sep 17 00:00:00 2001 From: ciangottini Date: Mon, 27 Sep 2021 14:15:42 +0200 Subject: [PATCH 57/59] fix plugin conf --- stable/jhub-aas/docker/Dockerfile.dask | 2 ++ stable/jhub-aas/docker/labextension.yaml | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 stable/jhub-aas/docker/labextension.yaml diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index fe141a52..7e627fa7 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -61,6 +61,8 @@ RUN jupyter labextension install . RUN mkdir -p /root/.ipython +COPY labextension.yaml /opt/conda/lib/python3.9/site-packages/dask_labextension/labextension.yaml + COPY ./jupyterhub-singleuser.sh /usr/local/bin/jupyterhub-singleuser.sh RUN chmod +x /usr/local/bin/jupyterhub-singleuser.sh WORKDIR /opt/workspace diff --git a/stable/jhub-aas/docker/labextension.yaml b/stable/jhub-aas/docker/labextension.yaml new file mode 100644 index 00000000..5e952bc5 --- /dev/null +++ b/stable/jhub-aas/docker/labextension.yaml @@ -0,0 +1,14 @@ +labextension: + factory: + module: 'dask_remote_jobqueue' + class: 'RemoteHTCondor' + args: [] + kwargs: {} + default: + workers: null + adapt: + null + # minimum: 0 + # maximum: 10 + initial: + [] \ No newline at end of file From 68f4a9e2a0cfae95c2ef6ddf87e41fef8671283c Mon Sep 17 00:00:00 2001 From: ciangottini Date: Mon, 27 Sep 2021 23:08:41 +0200 Subject: [PATCH 58/59] fix workdir --- stable/jhub-aas/docker/Dockerfile.dask | 1 + 1 file changed, 1 insertion(+) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 7e627fa7..5fdf20ea 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -43,6 +43,7 @@ RUN python3 -m pip install "dask[dataframe]" # Install DASK jobqueue RUN pip install dask-remote-jobqueue==0.4.19 +WORKDIR /opt/workspace # Old approach # RUN python3 -m pip install dask-labextension "dask[dataframe]" # COPY labextension.yaml /usr/local/lib/python3.6/site-packages/dask_labextension/labextension.yaml From 99a6ff0bf7e1e4c95c5bfabf16592e0ce55441ee Mon Sep 17 00:00:00 2001 From: ciangottini Date: Tue, 28 Sep 2021 09:10:45 +0200 Subject: [PATCH 59/59] python exe --- stable/jhub-aas/docker/Dockerfile.dask | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stable/jhub-aas/docker/Dockerfile.dask b/stable/jhub-aas/docker/Dockerfile.dask index 5fdf20ea..8bfe0d3f 100644 --- a/stable/jhub-aas/docker/Dockerfile.dask +++ b/stable/jhub-aas/docker/Dockerfile.dask @@ -20,7 +20,8 @@ WORKDIR /usr/local/share/root6source WORKDIR /usr/local/share/root6build RUN cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local/share/root6 \ - -DPython3_EXECUTABLE=/usr/bin/python3 /usr/local/share/root6source + -DPython3_EXECUTABLE=/opt/conda/bin/python \ + /usr/local/share/root6source RUN cmake --build . --target install -- -j4