Since this is kind of test-task, there are a lot of things to improve here. But the basic+ setup is implemented.
- Depoy AWS infrastructure via
terraform apply
- Provision servers via ansible.
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook site.yaml -i inventories/scandiweb
Vault Password: scandiweb
PS. Self signed certificate for domain scandiweb.lv
has been created for this task.
- Create more servers (separate database & probably nginx, put them in own autoscaling groups).
- Log metrics & based on them create autoscaling policies
- Centralize logs.
- Consider using RDS.
- Consider using Packer to bake images & pull out configuration deployment. In that way you can speed up deployment process a lot (this also works for autoscaling).