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

Commit

Permalink
Azure: remote vm dev bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Feb 11, 2022
1 parent 3a864f0 commit 1967580
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/azure-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ az vm create --resource-group $RESOURCE_GROUP --name $VM \
echo "+++ get IP for $VM"
IP=$(az vm show --name $VM --resource-group $RESOURCE_GROUP -d --query publicIps -otsv)

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

echo "+++ wait for boot and cloud-init ${VM} ${IP}"
ssh-keygen -R "$IP"
while ! ssh $NAME@$IP sudo cloud-init status --wait ; do
Expand All @@ -45,7 +54,7 @@ done

echo "+++ configuring VM"
ssh -A $NAME@$IP <<EOF
echo '--- connected to $NAME@IP'
echo '--- connected to $NAME@$IP'
sudo apt-get update
sudo apt-get install --yes azure-cli
az login --identity
Expand All @@ -59,15 +68,6 @@ git config --global user.email "$(git config user.email)"
git clone --branch $BRANCH $REPO
EOF

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

echo "+++ starting Jypter"
ssh $NAME@$IP -t -L 8080:localhost:8080 -L 8081:localhost:8081 "cd $PROJECT ; ./scripts/jupyter-lab.sh"

Expand Down

0 comments on commit 1967580

Please sign in to comment.