This infrastructure uses Ansible (docs).
- Python 2.7+/3.5+
- A copy of Ansible 2.4+ (
pip install ansible
) - A VM running Debian, for local testing changes to deployments
- Create a VM running Debian 8 (vm2) or 9 (vm1). To prevent accidental production deployment, do not use the same password for this account that you use in production.
- Install your SSH key into the default account in the VM
- Update
staging.yml
with the correct hosts for your dev environment - Run
ansible-playbook -i staging.yml site.yml
- Install your SSH key into the remote user account
- Ensure the remote user account is in sudoers
- Add the new server to an appropriate group in
production.yml
- If the server is part of a new group, add the roles for the new group to
site.yml
- Run
ansible-playbook -i production.yml -l new-host.example site.yml