Skip to content

[WIP] Ansible playbooks for deploying and tearing down cloud provider instances.

License

Notifications You must be signed in to change notification settings

yard-turkey/ansible-cloud-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configure

To edit values relative to AWS instances, see playbooks/host_vars/ec2-deploy.yaml

Ansible master configuration

Do the following configuration steps on whichever machine is running the playbook.

Install python dep

  • $ sudo pip install boto

Make ssh key accessible to ansible

  • $ eval ssh-agent && ssh-add ~/.ssh/

Setup AWS keys

Config env for ec2.py (dynamic inventory)

NOTE: Dynamic inventories are not used for now, so this step is optional.

Dynamic Inventory Groups

NOTE: Dynamic inventories are not used for now, so this step is optional.

Test ec2.py

  • $ ansible -u ec2-user -m ping tag_Name_your_tag_name

Run

Start Instances

To deploy 3 aws ec2 instances:

ansible-playbook -i inventories/aws playbooks/cluster-up.yaml -e "tag_name=<some name>"

Optionally, to change the number of instances, set the num_nodes var:

ansible-playbook playbooks/cluster-up.yaml -e "tag_name=<some name> num_nodes=42"

Destroy Instances

To tear down all clusters with the same Name: tag:

ansible-playbook playbooks/cluster-down.yaml -e "tag_name=<some name>"

About

[WIP] Ansible playbooks for deploying and tearing down cloud provider instances.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published