mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 23:29:21 +00:00
creating instance groups in parallel
This commit is contained in:
parent
b95fca093d
commit
8dc0be6b9e
@ -2786,18 +2786,21 @@ function create-linux-nodes() {
|
|||||||
this_mig_size=$((${instances_left} / (${NUM_MIGS}-${i}+1)))
|
this_mig_size=$((${instances_left} / (${NUM_MIGS}-${i}+1)))
|
||||||
instances_left=$((instances_left-${this_mig_size}))
|
instances_left=$((instances_left-${this_mig_size}))
|
||||||
|
|
||||||
gcloud compute instance-groups managed \
|
# Run instance-groups creation in parallel.
|
||||||
create "${group_name}" \
|
{
|
||||||
--project "${PROJECT}" \
|
gcloud compute instance-groups managed \
|
||||||
--zone "${ZONE}" \
|
create "${group_name}" \
|
||||||
--base-instance-name "${group_name}" \
|
--project "${PROJECT}" \
|
||||||
--size "${this_mig_size}" \
|
--zone "${ZONE}" \
|
||||||
--template "${template_name}" || true;
|
--base-instance-name "${group_name}" \
|
||||||
gcloud compute instance-groups managed wait-until-stable \
|
--size "${this_mig_size}" \
|
||||||
"${group_name}" \
|
--template "${template_name}" || true;
|
||||||
--zone "${ZONE}" \
|
gcloud compute instance-groups managed wait-until-stable \
|
||||||
--project "${PROJECT}" \
|
"${group_name}" \
|
||||||
--timeout "${MIG_WAIT_UNTIL_STABLE_TIMEOUT}" || true &
|
--zone "${ZONE}" \
|
||||||
|
--project "${PROJECT}" \
|
||||||
|
--timeout "${MIG_WAIT_UNTIL_STABLE_TIMEOUT}" || true
|
||||||
|
} &
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user