deployment-playbooks/README

43 lines
2.2 KiB
Plaintext
Raw Normal View History

2017-11-15 12:07:11 -08:00
Ansible playbook.
Ansible version 2.3 or high.
2017-11-21 02:35:31 -08:00
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
2017-11-21 02:35:31 -08:00
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?
2017-12-02 10:19:31 -08:00
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"
2017-11-21 02:35:31 -08:00
2017-12-02 10:19:31 -08:00
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/
2017-11-21 02:35:31 -08:00
Usage:
2017-12-02 10:19:31 -08:00
bootnode instance setup: ansible-playbook bootnode.yml
2017-12-11 01:52:15 -08:00
validator instance setup: ansible-playbook validator.yml
2017-12-02 10:19:31 -08:00
netstat instance setup: ansible-playbook netstat.yml
2017-12-11 01:52:15 -08:00
moc instance setup: ansible-playbook moc.yml
2017-12-02 10:19:31 -08:00
explorer instance setup: ansible-playbook explorer.yml
2017-11-21 02:35:31 -08:00
2017-12-02 10:19:31 -08:00
Before setting up instance or refreshing config, add server ip in file hosts and run: ansible-playbook -i hosts site.yml
2017-11-15 12:07:11 -08:00
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