This is a project for the AWS Program from Applaudo Studios. The goal of this project is to create a solution that includes a front-end, a back-end and a MongoDB databases running in an EKS Cluster.
The solution consist of an infrastructure built on terraform that has two availability zones, each one with a public and a private subnet. The public subnets have a NAT Gateway, the private subnets have an EKS Cluster with a Node Group and a MongoDB database. The application is deployed from an ECR repository.
The estimated cost of this solution are divided as follows:
Name | Monthly Quantity | Unit | Monthly Cost |
---|---|---|---|
EKS cluster | 730 | hours | $73.00 |
NAT Gateway | 730 | hours | $32.85 |
NAT Gateway 2 | 730 | hours | $32.85 |
DNS Charges | 730 | hours | $6.00 |
Overall total | $144.70 |
This costs may vary depending on the region and the amount of traffic.
The application is deployed in AWS using the following services:
- Amazon EKS
- Nat Gateway
- Load Balancer
- VPC
- ECR
- Route tables
- Security Groups
The ECR service is deployed using Github Actions from the repository where the application lives, and the MongoDB database is deployed manually using Atlas.
- Clone the repository
- Install Terraform
- Install AWS CLI
- Configure AWS CLI
- Run the following commands:
terraform init
terraform workspace new prod
terraform plan
terraform apply -auto-approve
You can copy the code from the repository and run it locally using the following command:
git clone https://github.com/Walter-Gaitan/devops-final-project-app.git
You can learn more about how to use it in the documentation of the repository.
During the presentation of this project, I will have a live demo of the application running in AWS, you can access it using the following link: mernstack.waltergaitan.codes
You can create a MongoDB database using Atlas and connect it to the application.
Before destroying the infrastructure, you need to delete the load balancers and kubeconfig file. Once you have done that, you can run the following command:
terraform destroy -auto-approve