Vagrant managed VirtualBox VM (ubuntu-trusty64) for AWS configured with Docker and Ansible.
vagrant plugin install vagrant-cachier
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-proxyconf
Cachier caches downloads, vbguest installs the host's VirtualBox Guest Additions, proxyconf helps dealing with corporate proxies.
Place credentials and default region in .bashrc
in the secret
directory next to the Vagrantfile. Keys also go there:
secret/.bashrc
secret/*.pem
...
Vagrantfile
Note: Keys are copied into the VM on each login to restrict access required by ssh.
ec2-ssh <ec2-public-ip-address>
: ssh login into your instanceec2-status
: Returns a status table for all your instancesec2-terminate <ec2-instance-id>
: Terminates the instance with the given IDec2-terminate-all
: Terminates all instance (after prompt)
ec2-status
should list all your ec2 instancesansible all -m ping
should ping all ec2 instancesansible all -a "df -h"
should show disk space on all ec2 instances
Use at your own risk.