forked from maticnetwork/terraform-polygon-supernets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
19 lines (16 loc) · 998 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
terraform init
terraform plan
terraform apply -auto-approve
terraform output pk_ansible > ~/devnet_private.key
chmod 600 ~/devnet_private.key
eval "$(ssh-agent)"
ssh-add ~/devnet_private.key
ROOTCHAIN_RPC=$(terraform output -raw geth_private_ip)
cd ansible
echo "viable decrease resist spoil loop vocal foot only become glass satisfy dog pull junior jaguar maple entry donate panel slow innocent try movie snake" > password.txt
cp local-extra-vars.yml.template local-extra-vars.yml
echo "\nrootchain_json_rpc: http://$ROOTCHAIN_RPC:8545" >> local-extra-vars.yml
ansible --inventory inventory/aws_ec2.yml --vault-password-file=password.txt --extra-vars "@local-extra-vars.yml" all -m ping
ansible-galaxy install -r requirements.yml
# if this step fails due to "sudo: a password is required", make sure you are in sudo mode in the terminal you are running this on
ansible-playbook --inventory inventory/aws_ec2.yml --vault-password-file=password.txt --extra-vars "@local-extra-vars.yml" site.yml