Go to file
phahulin 495d3c375a Update year in LICENSE 2018-01-05 22:04:57 +03:00
files Separate group_vars by roles; Rename parity_nouncles; Extract NODE_SOURCE_DEB 2017-12-01 16:35:00 +03:00
group_vars Add warning in all.example 2017-12-28 12:56:48 +03:00
roles fix nginx header issue 2017-12-27 23:05:18 +03:00
.gitignore add igone *.retry 2017-12-21 16:11:20 +03:00
LICENSE Update year in LICENSE 2018-01-05 22:04:57 +03:00
README add warning about ssh for non aws servers. 2017-12-21 00:02:30 +03:00
ansible.cfg Mining role and fix variable name in ec2 create instance 2017-11-27 00:03:42 +03:00
bootnode.yml allow allocate elastic ip for bootnode and valodator 2017-12-21 17:11:35 +03:00
explorer.yml change access control scheme 2017-12-12 15:31:02 +03:00
hosts.example Massive renaming 2017-12-14 11:39:42 +03:00
moc.yml change access control scheme 2017-12-12 15:31:02 +03:00
netstat.yml change access control scheme 2017-12-12 15:31:02 +03:00
site.yml fix nginx header issue 2017-12-27 23:05:18 +03:00
validator.yml allow allocate elastic ip for bootnode and valodator 2017-12-21 17:11:35 +03:00

README

Ansible playbook.

Ansible version 2.3 or high.

Before start, you need get AWS access key, please read the instruction:  http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html

Please create file group_vars/all, copy-paste content from all.network (parameters shared by all roles) and add parameters from a specific role file group_vars/*.example

All variables must be set in site.yml (vars section) and group_vars/all file.

Short FAQ:
Q: Where do I find vpc_subnet_id?
A: You can use aws cli to get the variable (https://aws.amazon.com/cli/). Run: aws ec2 describe-subnets and find "AvailabilityZone". with the related "SubnetId": "subnet-XXXXXX"

Q: How to add ssh key pair?
A: Please see: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

Q: What's the difference between admins.pub and ssh_ROLENAME.pub?
A: File admins.pub contains keys used to access under root and ubuntu (sudo user).File ssh_ROLENAME.pub provides unpriviledged access to a server. If priviledge separation is not required, just use symlink to admins.pub.

Q: When running ec2.yml/site.yml how to verify that everything has completed as expected? Please provide verification steps.
A: ansible-playbooks must pass all steps w/o errors. This means that everything has completed as expected.

Q: Where can I find IMAGE ID for ubuntu LTS?
A: In diffirent regions, ubuntu has unique IMAGE ID. Please see the required IMAGE ID at: https://cloud-images.ubuntu.com/locator/ec2/

Q: What instance type to use?
A: We recommend type m5.large, but you are free to decide. Please see all instance types at: https://aws.amazon.com/ec2/pricing/on-demand/



Usage:
bootnode instance setup: ansible-playbook bootnode.yml
validator instance setup: ansible-playbook validator.yml
netstat instance setup: ansible-playbook netstat.yml
moc instance setup: ansible-playbook moc.yml
explorer instance setup: ansible-playbook explorer.yml

Before setting up instance or refreshing config, add server ip in file hosts and run: ansible-playbook -i hosts site.yml

NOTE: If you want to close external access to validator, please set variables allow_ssh and allow_p2p to false in group_vars/all and run ansible-playbook validator-access.yml

WARNING!!!: don't disable ssh access to non AWS server, you can't restore access to server by ssh, bacause for make changes in firewall, need ssh access. If you need close access to the host, you can open access from your ip / networks.