Go to file
Jakub Sokołowski 315eb38f26
limit aws provider version
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-12-12 11:23:33 +01:00
ansible drop unused origin-cert role 2019-11-12 22:00:01 +01:00
files redirect approval@dap.ps to dapps-approvals@status.im 2019-06-13 10:30:53 -04:00
modules don't forward caching headers 2019-11-05 18:52:31 +01:00
.gitignore ignore *.tfstate.*.backup 2019-07-25 17:04:52 -04:00
Makefile fix which credentials are used for smtp 2019-08-06 09:47:42 -04:00
README.md add Data Lifecycle Policy for MongoDB volumes 2019-10-04 14:56:46 +02:00
ansible.cfg use python2 by default 2019-08-01 14:12:25 -04:00
backup.tf add Data Lifecycle Policy for MongoDB volumes 2019-10-04 14:56:46 +02:00
dev.tf add a CloudFront CDN 2019-11-05 18:32:32 +01:00
mail.tf upgrade Lambda function NodeJS: 8.10 > 10.x 2019-10-21 18:37:35 +02:00
main.tf add Data Lifecycle Policy for MongoDB volumes 2019-10-04 14:56:46 +02:00
outputs.tf comment out smtp outputs for now 2019-08-06 09:43:57 -04:00
prod.tf switch prod to use new CDN 2019-11-12 22:00:13 +01:00
ses.tf upgrade to Terraform 0.12 2019-07-30 14:36:52 -04:00
smtp.tf add more actions to smtp sending policy 2019-08-06 09:02:10 -04:00
variables.tf upgrade Amazon Linux 2018/03: v4.8.3 > v4.11.0 2019-11-02 14:45:16 +01:00
versions.tf limit aws provider version 2019-12-12 11:23:33 +01:00

README.md

Description

This repo configures infrastructure for the https://dap.ps/ service.

The service is split into two stages:

The prod environment is CNAMEed to dap.ps domain.

Technical Details

The infrastructure is hosted on AWS and consists of 5 main elements:

All the AWS parts are provisioned and managed with Terraform and the MongoDB cluster configured with Ansible.

The only part that is not AWS is Gandi DNS provider due to AWS Route53 not supporting the .ps TLD.

Usage

Creation of both dev and prod stages is as simple as:

terraform init
terraform apply

And then configure the MongoDB hosts using ansible:

ansible-playbook ansible/dev.yml
ansible-playbook ansible/prod.yml

Known Issues

  • The ElasticBeanstalk environments can fail when being recreated
    • This is mostly due to AWS being slow at destorying resources and their race conditions
  • There is no easy way of making ElasticBeanstalk spread geographically
    • The only way seems to have multiple EB environments linked via ELB

TODO

  • #4 - [prod] Geographically spread hosts
  • #11 - [prod] MongoDB Web UI
  • #13 - [prod] Stress test infrastructure

Links

These helped me during work on this setup: