diff --git a/validation/start-nomad.sh b/validation/start-nomad.sh index 215506f..39b9474 100755 --- a/validation/start-nomad.sh +++ b/validation/start-nomad.sh @@ -2,7 +2,14 @@ set -ue NOMAD_VERSION="1.8.1" -NOMAD_PLATFORM="linux_amd64" +NOMAD_PLATFORM=${NOMAD_PLATFORM:-linux_amd64} + +## Available platforms +#- "linux_amd64" +#- "linux_arm64" +#- "darwin_amd64" +#- "darwin_arm64" +#- "windows_amd64" SECURE=0 [[ "$@" =~ '--secure' ]] && SECURE=1 @@ -10,7 +17,8 @@ SECURE=0 if [ ! -f ./nomad ]; then curl -O "https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_${NOMAD_PLATFORM}.zip" unzip nomad_${NOMAD_VERSION}_${NOMAD_PLATFORM}.zip - rm -f nomad_${NOMAD_VERSION}_${NOMAD_PLATFORM}.zip + rm -f nomad_${NOMAD_VERSION}_${NOMAD_PLATFORM}.zip LICENSE.txt + chmod +x ./nomad fi mkdir -p nomad_temp @@ -53,7 +61,7 @@ if [ "$SECURE" == 0 ]; then # basic nomad cluter ../nomad agent -config server.conf -config client.conf -config server-custom.conf -config client-custom.conf else - # secured nomad cluster +# secured nomad cluster ../nomad agent -config server.conf -config client.conf -config server-custom.conf -config client-custom.conf & cd .. ./wait-nomad.sh @@ -62,4 +70,4 @@ NOMAD_TOKEN=$(nomad acl bootstrap | awk '/^Secret ID/ {print $4}') export NOMAD_TOKEN echo New super token generated. echo export NOMAD_TOKEN=$NOMAD_TOKEN -fi +fi \ No newline at end of file