This repository was archived by the owner on Dec 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
774dd53
commit 7ab2610
Showing
5 changed files
with
104 additions
and
48 deletions.
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CLASS-Examples/ |
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "=== clean.sh" | ||
|
|
||
| ## Cleanup for 06_running_analysis | ||
| sudo apt remove git | ||
| rm -rf ./CLASS-Examples |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Options | ||
| BRANCH="${1:-gcp-dev}" # checkout branch $1 | ||
|
|
||
| # Static Config - update gcp-*.sh files | ||
| VM=essentials | ||
| ZONE=us-west2-c | ||
| PROJECT=CLASS-Essentials | ||
| REPO="git@github.internet2.edu:CLASS/${PROJECT}.git" | ||
|
|
||
| echo "=== gcp-dev.sh $PROJECT $BRANCH" | ||
|
|
||
| echo "+++ creating VM" | ||
| gcloud compute instances create --zone=$ZONE $VM --machine-type=e2-highcpu-4 --preemptible | ||
|
|
||
|
|
||
| echo "+++ wait for boot" | ||
| while ! gcloud compute ssh --zone=$ZONE $VM --command='hostname' ; do | ||
| sleep 1 | ||
| done | ||
|
|
||
| echo "+++ configuring VM" | ||
|
|
||
| gcloud compute ssh --zone=$ZONE $VM --ssh-flag='-A' <<EOF | ||
| sudo apt install --yes git python3-pip python3-venv | ||
| ssh-keyscan github.internet2.edu > .ssh/known_hosts | ||
| git config --global color.ui auto | ||
| git config --global push.default simple | ||
| git config --global pull.ff only | ||
| git clone --branch $BRANCH $REPO | ||
| cd $PROJECT | ||
| git config user.name "$(git config user.name)" | ||
| git config user.email "$(git config user.name)" | ||
| EOF | ||
|
|
||
| echo "+++ configure local ssh" | ||
| gcloud compute config-ssh | ||
|
|
||
| echo "+++ starting Jypter" | ||
| gcloud compute ssh --zone=$ZONE $VM --ssh-flag='-L 8080:localhost:8080 -L 8081:localhost:8081' --command="cd $PROJECT ; ./scripts/jupyter-lab.sh" |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/bin/bash | ||
|
|
||
| ## User settings in gcp-dev.sh | ||
| VM=essentials | ||
| ZONE=us-west2-c | ||
|
|
||
| gcloud --quiet compute instances delete --zone=$ZONE $VM |