8000 GitHub - jcdotio/kube-create: Ansible EC2 Kuberentes Bootstrap
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jcdotio/kube-create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EC2 Cluster Create

A starting point for automating cluster creation.

Setup

Install Ansible
$ sudo pip install ansible (or setup your favorite virtualenv)
ensure you are running 2.4.1+ or later. Otherwise this fix is necessary: https://github.com/ansible/ansible/pull/30333
Set AWS Credentials
$ export AWS_ACCESS_KEY_ID=’AK123′
$ export AWS_SECRET_ACCESS_KEY=’abc123′
Configure ansible.cfg
$ cp ansible.cfg.default ansible.cfg && vim ansible.cfg
Set your pem path
First Run

Be sure to open up your aws dashboard and watch things work. If you see any other 'test-dev' instances in the ec2 dashboard you can terminiate them, but duplicates will not be made if you do not and all shoudl still be well.

$ ansible-playbook -i hosts ec2-cluster-create.yml

or with all debug output

$ ansible-playbook -i hosts ec2-cluster-create.yml -vvv

Once complete you should see something like this:

PLAY RECAP ****************************************************************************
172.18.100.103             : ok=3    changed=3    unreachable=0    failed=0
172.18.110.151             : ok=1    changed=1    unreachable=0    failed=0
172.18.110.173             : ok=1    changed=1    unreachable=0    failed=0
172.18.110.222             : ok=1    changed=1    unreachable=0    failed=0
172.18.70.40               : ok=3    changed=3    unreachable=0    failed=0
172.18.80.246              : ok=3    changed=3    unreachable=0    failed=0
172.18.90.96               : ok=3    changed=3    unreachable=0    failed=0
localhost                  : ok=19   changed=10   unreachable=0    failed=0
Directory Structure

From best practices here

Notes

Tag Bug

Ensure you are running 2.4.1+ or otherwise make this ansible core fix: ansible/ansible#30333

Dynamic Inventory

Managed by ec2.py Read more here.
Configuration is kept at /ec2.ini. Cmdline example to list all ec2 nodes.

$ ./ec2.py --list

ec2.py is set to return "test-dev" tagged instances only

Since there is no teardown yet be sure to delete you instances ( they are xl instances by default. Search for tag 'test-dev'

About

Ansible EC2 Kuberentes Bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0