View Source

{toc-zone}
{toc}{toc-zone}

h1. Server Components


h2. Amazon CloudFront

Provides CDN and SSL termination

h2. Amazon S3

Web server for [MathML Cloud frontend application|https://github.com/benetech/mmlc-app]. The staging site files are stored in the [app-staging.mathmlcloud.org S3 bucket|https://console.aws.amazon.com/s3/home?region=us-east-1#&bucket=app-staging.mathmlcloud.org&prefix=].


h2. Amazon EC2 / EC2 Container Service

The [MathML Cloud Node.js backend API application|https://github.com/benetech/mmlc-api] runs inside a Docker container on the [BenetechLabsProjects ECS cluster|https://console.aws.amazon.com/ecs/home?region=us-east-1#/clusters/BenetechLabsProjectsCluster/services]

|| Environment || Task Definition Name || Service Name || Elastic Load Balancer ||
| staging | MathMLCloudApiTask-staging | MathMLCloudApiService-staging | ECS-MathMLCloudApiService-stagin |

h2. MongoDB

The main database for the MMLC application.

The Benetech Labs MongoDB cluster was originally launched using an [Amazon provided quick start guide|https://aws.amazon.com/blogs/aws/mongodb-on-the-aws-cloud-new-quick-start-reference-deployment/]. However, there have now been some modifications made to the systems to facilitate backups so they cannot be recreated from scratch using the template without manually migrating the backup service..

The cluster consists of three nodes spread across Amazon's us-east-1 region. As currently configured the cluster provided continued support for reads in the event the primary replica becomes unavailable.

h2. Amazon ElastiCache (Redis replacement)

Not really sure what this does.

h1. Deployment


h2. mmlc-app (frontend)

A [Jenkin's job|https://build.benetech.org/view/Deploy/job/Deploy-mmlc-app/] is used to deploy the application into Amazon S3. The job clones the mmlc-app git repository and uses the AWS CLI to upload files to Amazon S3.

h2. mmlc-api (backend)

A [Jenkin's job|https://build.benetech.org/view/Deploy/job/Deploy-ECS/] is used to deploy the application container onto the Benetech Labs ECS cluster. The job builds a Docker container which provides the runtime environment for the Node.js backend API.