From 48c028b24c8972f8e0afa54fa8e13ca71e721fb5 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Thu, 3 Feb 2022 16:35:52 -0600 Subject: [PATCH] GCP: Scripts to run jupyterlab in cloudshell --- Build.md | 25 +++++++++++++++++++------ scripts/gcp-cloudshell-jupyter-lab.sh | 4 ++++ scripts/gcp-cloudshell.sh | 4 ++++ 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100755 scripts/gcp-cloudshell-jupyter-lab.sh create mode 100755 scripts/gcp-cloudshell.sh diff --git a/Build.md b/Build.md index c4033d1..2a88a6d 100644 --- a/Build.md +++ b/Build.md @@ -32,14 +32,27 @@ This copies the contents of `content/_build/html/` to `docs/` so GitHub Pages wi ## GCP -Using Jupyter launched from a remote Visual Code Studio session inside GCP Cloud-Shell requires some local settings stored in `local.sh`, use the following as a template replacing the project and email with the proper vaules: -``` -gcloud config set account student31@class.internet2.edu -export GOOGLE_CLOUD_PROJECT=just-armor-301114 -export DEVSHELL_PROJECT_ID=$GOOGLE_CLOUD_PROJECT -gcloud config set project $GOOGLE_CLOUD_PROJECT +Checkout the project so it is not seen by the students. Run `./scripts/gcp-cloudshell.sh` to open the shell with the agent and ports 8080 and 8081 forwarded and run the following commands (onetime setup). Be sure to check the project and account values. + +```bash +git clone git@github.internet2.edu:/CLASS/CLASS-Essentials.git .essentials +cd .essentials/ +git checkout -b gcp-dev --track origin/gcp-dev + +ACCOUNT=learner@class.internet2.edu +PROJECT=essentials-learner +cat > .essentials/local.sh <