Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zone info to a few gcloud commands #12

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions terraform/examples/io500/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ gcloud compute instance-groups managed wait-until ${TF_VAR_server_template_name}

printf "\nAdd external IP to first client\n\n"
gcloud compute instances add-access-config ${DAOS_FIRST_CLIENT} --zone ${TF_VAR_zone} && sleep 10
FIRST_CLIENT_IP=$(gcloud compute instances describe ${DAOS_FIRST_CLIENT} | grep natIP | awk '{print $2}')
FIRST_CLIENT_IP=$(gcloud compute instances describe ${DAOS_FIRST_CLIENT} --zone ${TF_VAR_zone} | grep natIP | awk '{print $2}')

log "Configure SSH access"
printf "\nCreate SSH key\n\n"
Expand All @@ -57,9 +57,9 @@ printf "\nConfiguring SSH for user '${SSH_USER}' on all nodes\n\n"
for node in $ALL_NODES
do
# Disable OSLogin to be able to connect with SSH keys uploaded in next command
gcloud compute instances add-metadata ${node} --metadata enable-oslogin=FALSE && \
gcloud compute instances add-metadata ${node} --zone ${TF_VAR_zone} --metadata enable-oslogin=FALSE && \
# Upload SSH key to instance, so that you could login to instance over SSH
gcloud compute instances add-metadata ${node} --metadata-from-file ssh-keys=keys.txt &
gcloud compute instances add-metadata ${node} --zone ${TF_VAR_zone} --metadata-from-file ssh-keys=keys.txt &
done

# Wait for SSH configuring tasks to finish
Expand Down