Skip to content

Commit

Permalink
Update set-up-jh-gcp.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes authored May 8, 2024
1 parent 743ad9e commit 21d1458
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions posts/set-up-jh-gcp.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ description: |

See examples of full `config.yaml` files in the `config` directory in the [nmfs-opensci/nmfs-jhub](https://github.com/nmfs-opensci/nmfs-jhub) GitHub repo.

## Just show me the code!

Scroll to the bottom see the short version just to get the JHub set-up.

## Set-up Google Cloud

1. Create a Google Cloud account. Activate Compute API. It'll be one of the options.
Expand Down Expand Up @@ -188,3 +192,45 @@ See the post on [setting up authentication](set-up-authentication.html) for inst
* Verify an external IP is provided for the k8s Service proxy-public. `kubectl --namespace=jhubk8 get service proxy-public`
* If the external ip remains <pending>, diagnose with: `kubectl --namespace=jhubk8 describe service proxy-public`

## Just the code to set up

```
# Open a Cloud Shell and run these lines of code
gcloud container clusters create \
--machine-type n1-standard-2 \
--num-nodes 2 \
--zone us-west1-a \
--cluster-version latest \
jhub
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole=cluster-admin \
[email protected]
gcloud beta container node-pools create user-pool \
--machine-type n1-standard-2 \
--num-nodes 0 \
--enable-autoscaling \
--min-nodes 0 \
--max-nodes 3 \
--node-labels hub.jupyter.org/node-purpose=user \
--node-taints hub.jupyter.org_dedicated=user:NoSchedule \
--zone us-west1-a \
--preemptible \
--cluster jhub
curl https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3
helm repo add jupyterhub https://hub.jupyter.org/helm-chart/
helm repo update
helm upgrade --cleanup-on-fail \
--install jhub1 jupyterhub/jupyterhub \
--namespace jhubk8 \
--create-namespace \
--version=3.3.4 \
--values config.yaml
# DONE!!! Now edit config.yaml by looking at some of the examples in the config directory in this repo.

0 comments on commit 21d1458

Please sign in to comment.