Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit

Permalink
Specify the user to use in the VM
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Nov 10, 2021
1 parent d2d7eae commit d23119c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/gcp-start.sh → scripts/gcp-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
BRANCH="${1:-gcp-dev}" # checkout branch $1

# Static Config - update gcp-*.sh files
NAME=learner
VM=essentials
ZONE=us-west2-c
PROJECT=CLASS-Essentials
Expand All @@ -16,13 +17,13 @@ gcloud compute instances create --zone=$ZONE $VM --machine-type=e2-highcpu-4 --p


echo "+++ wait for boot"
while ! gcloud compute ssh --zone=$ZONE $VM --command='hostname' ; do
while ! gcloud compute ssh --zone=$ZONE $NAME@$VM --command='hostname' ; do
sleep 1
done

echo "+++ configuring VM"

gcloud compute ssh --zone=$ZONE $VM --ssh-flag='-A' <<EOF
gcloud compute ssh --zone=$ZONE $NAME@$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
Expand All @@ -38,4 +39,4 @@ echo "+++ configure local ssh"
gcloud compute config-ssh

echo "+++ starting Jypter"
gcloud compute ssh --zone=$ZONE $VM --ssh-flag='-t -L 8080:localhost:8080 -L 8081:localhost:8081' --command="cd $PROJECT ; ./scripts/jupyter-lab.sh"
gcloud compute ssh --zone=$ZONE $NAME@$VM --ssh-flag='-t -L 8080:localhost:8080 -L 8081:localhost:8081' --command="cd $PROJECT ; ./scripts/jupyter-lab.sh"
File renamed without changes.

0 comments on commit d23119c

Please sign in to comment.