Server Provisioning with Ansible, Vagrant and Packer.
- Local environment is Vagrant.
- Execute Ansible and Packer with docker-compose.
- Test with Testinfra.
- Create AMI on AWS with Packer.
- Execute server provisioning with Ansible.
- docker
- docker-compose
- vagrant
- virtualbox
If you want to test Vagrant machine from your own terminal, execute the following command.
$ pip install testinfra paramiko
$ vagrant ssh-config > .vagrant/ssh-config
$ py.test -v --hosts=web --ssh-config=.vagrant/ssh-config tests
$ vagrant up web
$ vagrant provision web
$ vagrant ssh web
$ docker-compose run --rm packer validate packer/web.json
$ docker-compose run --rm packer inspect packer/web.json
$ docker-compose run --rm packer build packer/web.json
$ docker-compose run --rm ansible-playbook -i inventory web.yml --syntax-check
$ docker-compose run --rm ansible-playbook -i inventory web.yml