Skip to content

Commit

Permalink
psdev-296: Standup jupyterhub on k8s.
Browse files Browse the repository at this point in the history
Use ibox-iscsi provisioner. Provisioner is assumed already deployed. See
https://git.infinidat.com/dohlemacher/infinidat-k8s-installer/blob/PSDEV-235/AddHelmChart/helm/infinidat-provisioner/iboxProvisionerHelmDocs.ipynb

DCO 1.1 Signed-off-by: David Ohlemacher <[email protected]>
  • Loading branch information
sqqqrly committed Jul 3, 2019
1 parent 445a953 commit c867e72
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 14 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,23 @@ This repository is dual licensed under the Apache2 (to match the upstream
Kubernetes [charts](https://github.com/helm/charts) repository) and
3-clause BSD (to match the rest of Project Jupyter repositories) licenses. See
the `LICENSE` file for more information!

## Deployment of the chart using an ibox
An ibox-iscsi storage class needs to be deployed to the k8s cluster. See https://git.infinidat.com/dohlemacher/infinidat-k8s-installer/blob/PSDEV-235/AddHelmChart/helm/infinidat-provisioner/iboxProvisionerHelmDocs.ipynb

### Deploy the chart
- `cd jupyterhub/`
- `helm install --namespace jup --name jupyterhub --values values.yaml --values config.yaml .`
- `kubectl -n jup get all`
- Monitor the jup namespace and verify jupyterhub is deployed properly.

### Access from your laptop
- `kubectl port-forward -n jup <proxy-NNN name> 9000:8000
- Visit http://http://127.0.0.1:9000
- Use any name and passwd (for now).
- Create a notebook.

### Jupyterhub teardown
- `helm delete --purge jupyterhub`
- There may be user pods running. For each:
- `kubectl -n jup delete pod <user pod name>`
22 changes: 22 additions & 0 deletions jupyterhub/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
proxy:
secretToken: d8dce5448115f9a196fb811b83693992ff055f1f451d85a417418cb7415b1f23

singleuser:
storage:
# type: none
dynamic:
storageClass: ibox-iscsi

hub:
db:
type: sqlite-pvc
pvc:
storageClassName: ibox-iscsi

iscsi:
enable: true
fsType: ext4
readonly: false
networkspaces: iscsi1
poolName: "ps-k8s-cicd"
30 changes: 16 additions & 14 deletions jupyterhub/values.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ hub:
baseUrl: /
cookieSecret:
publicURL:
initContainers: []
uid: 1000
fsGid: 1000
uid: 0
fsGid: 0
nodeSelector: {}
concurrentSpawnLimit: 64
consecutiveFailureLimit: 5
Expand Down Expand Up @@ -45,12 +44,13 @@ hub:
extraVolumeMounts: []
image:
name: jupyterhub/k8s-hub
tag: generated-by-chartpress
tag: '0.8.2'
resources:
requests:
cpu: 200m
memory: 512Mi
services: {}
imagePullPolicy: IfNotPresent
imagePullSecret:
enabled: false
registry:
Expand Down Expand Up @@ -86,7 +86,8 @@ proxy:
chp:
image:
name: jupyterhub/configurable-http-proxy
tag: 4.1.0
tag: 3.0.0
pullPolicy: IfNotPresent
resources:
requests:
cpu: 200m
Expand All @@ -95,13 +96,14 @@ proxy:
image:
name: quay.io/kubernetes-ingress-controller/nginx-ingress-controller
tag: 0.15.0
pullPolicy: IfNotPresent
proxyBodySize: 64m
hstsIncludeSubdomains: 'false'
resources: {}
lego:
image:
name: jetstack/kube-lego
tag: 0.1.7
pullPolicy: IfNotPresent
resources: {}
labels: {}
nodeSelector: {}
Expand Down Expand Up @@ -164,7 +166,7 @@ singleuser:
networkTools:
image:
name: jupyterhub/k8s-network-tools
tag: generated-by-chartpress
tag: '0.8.2'
cloudMetadata:
enabled: false
ip: 169.254.169.254
Expand All @@ -182,7 +184,7 @@ singleuser:
extraLabels:
hub.jupyter.org/network-access-hub: 'true'
extraEnv: {}
lifecycleHooks: {}
lifecycleHooks:
initContainers: []
extraContainers: []
uid: 1000
Expand All @@ -199,13 +201,13 @@ singleuser:
capacity: 10Gi
homeMountPath: /home/jovyan
dynamic:
storageClass:
storageClass: ibox-iscsi
pvcNameTemplate: claim-{username}{servername}
volumeNameTemplate: volume-{username}{servername}
storageAccessModes: [ReadWriteOnce]
image:
name: jupyterhub/k8s-singleuser-sample
tag: generated-by-chartpress
tag: '0.8.2'
pullPolicy: IfNotPresent
imagePullSecret:
enabled: false
Expand All @@ -229,8 +231,8 @@ singleuser:

scheduling:
userScheduler:
enabled: true
replicas: 2
enabled: false
replicas: 1
logLevel: 4
image:
name: gcr.io/google_containers/kube-scheduler-amd64
Expand Down Expand Up @@ -264,9 +266,9 @@ prePuller:
enabled: true
image:
name: jupyterhub/k8s-image-awaiter
tag: generated-by-chartpress
tag: '0.8.2'
continuous:
enabled: true
enabled: false
extraImages: {}
pause:
image:
Expand Down

0 comments on commit c867e72

Please sign in to comment.