e2e bin/update and bin/run, README
This commit is contained in:
parent
1635fa3c00
commit
e61597a098
|
@ -7,7 +7,8 @@ The `terraform` folder has provisioning code to spin up a Nomad cluster on AWS.
|
|||
|
||||
Local Development
|
||||
=================
|
||||
The workflow when developing end to end tests locally is to run the provisioning step described below once, and then run the tests as described below.
|
||||
The workflow when developing end to end tests locally is to run the provisioning step described below once, and then run the tests as described below.
|
||||
When making local changes, use `./bin/update $(which nomad) /usr/local/bin/nomad` and `./bin/run sudo systemctl restart nomad` to destructively modify the provisioned cluster.
|
||||
|
||||
Provisioning
|
||||
============
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "./run.sh commands..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nodes=$(terraform output -json -state=terraform/terraform.tfstate | jq -r '(.clients,.servers).value[]')
|
||||
for node in $nodes
|
||||
do
|
||||
echo Executing: ssh -i terraform/keys/*.pem ubuntu@$node $@
|
||||
ssh -o StrictHostKeyChecking=accept-new -i terraform/keys/*.pem ubuntu@$node $@
|
||||
done
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "./upload.sh <source> <destination>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$2" == "" ]; then
|
||||
echo "./upload.sh <source> <destination>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nodes=$(terraform output -json -state=terraform/terraform.tfstate | jq -r '(.clients,.servers).value[]')
|
||||
for node in $nodes
|
||||
do
|
||||
echo Executing: scp -C -i terraform/keys/*.pem $1 ubuntu@$node:$2
|
||||
#scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@$node:"$2"
|
||||
scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@$node:/tmp/uploaded
|
||||
ssh -i terraform/keys/*.pem ubuntu@$node sudo mv /tmp/uploaded "$2"
|
||||
done
|
Loading…
Reference in New Issue