-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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. | ||