github.com/smithx10/nomad@v0.9.1-rc1/e2e/upgrades/run_cluster.sh (about) 1 #/bin/bash 2 # This script takes path to a binary and runs a 3 server, two node cluster 3 if [ "$#" -ne 1 ]; then 4 echo "expected usage ./run_cluster.sh /path/to/nomad/binary" 5 exit 255 6 fi 7 NOMAD_BINARY=$1 8 # launch server 9 ( ${NOMAD_BINARY} agent -config=server1.hcl 2>&1 | tee "/tmp/server1/log" ; echo "Exit code: $?" >> "/tmp/server1/log" ) & 10 11 ( ${NOMAD_BINARY} agent -config=server2.hcl 2>&1 | tee "/tmp/server2/log" ; echo "Exit code: $?" >> "/tmp/server2/log" ) & 12 13 ( ${NOMAD_BINARY} agent -config=server3.hcl 2>&1 | tee "/tmp/server3/log" ; echo "Exit code: $?" >> "/tmp/server3/log" ) & 14 15 # launch client 1 16 ( ${NOMAD_BINARY} agent -config=client1.hcl 2>&1 | tee "/tmp/client1/log" ; echo "Exit code: $?" >> "/tmp/client1/log" ) & 17 18 # launch client 2 19 ( ${NOMAD_BINARY} agent -config=client2.hcl 2>&1 | tee "/tmp/client2/log" ; echo "Exit code: $?" >> "/tmp/client2/log" ) & 20 21 # launch consul 22 (consul agent -dev)&