forked from maticnetwork/terraform-polygon-supernets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·21 lines (17 loc) · 847 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
### Creating resources with Terraform
terraform init
terraform plan
terraform apply -auto-approve
### Output the private key for instances
terraform output pk_ansible > ~/devnet_private.key
chmod 600 ~/devnet_private.key
eval "$(ssh-agent)"
ssh-add ~/devnet_private.key
### Save the rootchain rpc address
ROOTCHAIN_RPC=$(terraform output -raw geth_private_ip)
cd ansible
### Run ansible to configure the nodes
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