mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 08:29:33 -05:00
43076e96a6
Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com> Co-authored-by: Otto Bittner <cobittner@posteo.net>
22 lines
490 B
Bash
Executable File
22 lines
490 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
shopt -s inherit_errexit
|
|
|
|
echo "Using Zone: ${1}"
|
|
echo "Using Constellation UID: ${2}"
|
|
|
|
allInstances=$(
|
|
gcloud compute instances list \
|
|
--filter="labels.constellation-uid=${2}" \
|
|
--format=json | yq eval '.[] | .name' -
|
|
)
|
|
|
|
for instance in ${allInstances}; do
|
|
printf "Fetching for %s\n" "${instance}"
|
|
gcloud compute instances get-serial-port-output "${instance}" \
|
|
--port 1 \
|
|
--start 0 \
|
|
--zone "${1}" > "${instance}".log
|
|
done
|