Skip to content

Commit

Permalink
GCP build script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Jan 10, 2022
1 parent 92694ba commit b186d21
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions scripts/gcp-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ echo "=== gcp-dev.sh $PROJECT $BRANCH"
echo "+++ creating/starting VM"
gcloud compute instances create --zone=$ZONE $VM \
--scopes=cloud-platform \
--machine-type=e2-highcpu-4 --preemptible
--machine-type=e2-highcpu-2 --preemptible
gcloud compute instances start --zone=$ZONE $VM
IP=$(gcloud compute instances describe essentials --format='value(networkInterfaces.accessConfigs[0].natIP)')
IP=$(gcloud compute instances describe essentials --zone=$ZONE --format='value(networkInterfaces.accessConfigs[0].natIP)')

echo "+++ configure local ssh $IP"
gcloud compute config-ssh
Expand Down Expand Up @@ -51,15 +51,5 @@ git config --global user.email "$(git config user.email)"
git clone --branch $BRANCH $REPO
EOF

echo "+++ configure local ssh"
gcloud compute config-ssh
cat > ~/.ssh/$VM.config <<EOF
Host essentials
HostName $IP
CheckHostIP=no
ForwardAgent=yes
User=$NAME
EOF

echo "+++ starting Jypter"
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"

0 comments on commit b186d21

Please sign in to comment.