Skip to content

Commit

Permalink
Merge branch 'gcp-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Feb 4, 2022
2 parents 8ceb51a + 48c028b commit 7938dc6
Show file tree
Hide file tree
Showing 10 changed files with 258 additions and 356 deletions.
25 changes: 19 additions & 6 deletions Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
gcloud config set account $ACCOUNT
export GOOGLE_CLOUD_PROJECT=$PROJECT
export DEVSHELL_PROJECT_ID=$PROJECT
gcloud config set project $PROJECT
EOF
```

Then run the following from your local machine (Make sure to shutdown from the web-gui as ctrl-c is not managed properly):
```bash
./scripts/gcp-cloudshell-jupyter-lab.sh
```
## AWS

Expect that `aws` is installed locally. A ssh-key named 'learner' is required to access the account.
Expand Down
2 changes: 1 addition & 1 deletion content/GCP/02_intro_to_compute.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"Did you \"Follow\" the VM instance by looking at the **activity** page as discussed above?\n",
"\n",
"Since we care about paying for resources we are not using we review our project by visiting the *compute engine* service and reviewing that we no longer have any *VM instances* running. \n",
" * Go to **Navigation Menu** -> **Compute Engine** (under Compute) -> **Instances** and look for your virtual machine.\n",
" * Go to **Navigation Menu** -> **Compute Engine** (under Compute) -> **Instances** and look for your virtual machine. It should be gone!\n",
"\n",
"In a later episode we will show how to easily list all the resources in a project."
]
Expand Down
Loading

0 comments on commit 7938dc6

Please sign in to comment.