This repository was archived by the owner on Feb 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Basic installation
Mohammad Wasil edited this page Oct 14, 2018
·
1 revision
Jupyterhub deployment with Kubernetes (K8s) on Google Kubernetes Engine (GKE).
- Requirements
- A Google Cloud account (you may want to use 300$ free credit from google)
- Enabling GKE
- Visit the Kubernetes Engine page in the Google Cloud Platform Console.
- Create or select a project.
- Wait for the API and related services to be enabled. This can take several minutes.
- Make sure that billing is enabled for your project.
- more https://cloud.google.com/kubernetes-engine/docs/quickstart
- Have a little understading on what Kubernetes, Node, Pod, Helm, Docker
- Installing jupyterhub on GKE
- Open cloud shell on the top right
- Install kubectl: gcloud components install kubectl
- Set the zone
- ZONE=europe-west1-b
- gcloud config set compute/zone $ZONE
- Create the cluster
- CLUSTERNAME=e2-datahub
- gcloud beta container clusters create $CLUSTERNAME --machine-type n1-standard-1 --num-nodes 2 --disk-size 50 --cluster-version latest --node-labels hub.jupyter.org/node-purpose=core
- check the nodes are ready: kubectl get node
- Create cluster admin
- EMAIL=mhm.wasil@gmail.com
- kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$EMAIL
- Install helm
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
- kubectl --namespace kube-system create serviceaccount tiller
- kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
- helm init --service-account tiller
- check helm installed: helm version
- Secure helm
- kubectl patch deployment tiller-deploy --namespace=kube-system --type=json --patch='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["/tiller", "--listen=localhost:44134"]}]'
- Install jupyterhub with helm
- Create secretToken for jupyterhub and create config.yaml
- openssl rand -hex 32
- Create config.yaml and put the secretToken in there
- Add jupyterhub to helm
- helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
- helm repo update
- Install jupyterhub
- Create RELEASE and NAMESPACE
- RELEASE=mas-jhub
- NAMESPACE=mas-jhub
- Install jupyterhub
- helm upgrade --install $RELEASE jupyterhub/jupyterhub --namespace $NAMESPACE --version 0.7.0 --values config.yaml
- Create RELEASE and NAMESPACE
- Create secretToken for jupyterhub and create config.yaml
- Updating the config
- helm upgrade $RELEASE jupyterhub/jupyterhub --namespace $NAMESPACE --version 0.7.0 --values config.yaml