Go to file
Jakub Sokołowski 55e4630222
upgrade Lambda function NodeJS: 8.10 > 10.x
NodeJS 8.10 is approaching End-of-life and AWS Lambda
will stop supporting it at the end of 2019.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-21 18:37:35 +02:00
ansible add replicaSet argument to mondodb URI 2019-08-14 10:57:04 -04:00
files redirect approval@dap.ps to dapps-approvals@status.im 2019-06-13 10:30:53 -04:00
modules go back to using CloudPosse versions of modules 2019-10-10 11:21:55 +02: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 specify explicitly EB_NODE_COMMAND 2019-08-07 12:27:41 -04: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 go back to using CloudPosse versions of modules 2019-10-10 11:21:55 +02: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 create a db.dev instance using new aws-ec2-instance module 2019-07-31 12:36:57 -04:00
versions.tf upgrade to Terraform 0.12 2019-07-30 14:36:52 -04: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: