Objectives:
To use infrastructure-as-code tools (Terraform):
- Set up Elastic Kubernetes Service (EKS) cluster, Virtual private Cloud (VPC), subnets, and other required resources.
- Set up a private Docker registry to store the application's Docker images.
- Setup MySQL Database.
The repository referenced throughout this project is hosted on my github: https://github.com/paschalogu/Terraform
Infrastructure Architecture Diagram
Figure 1: Infrastructure diagram of the setup
- Client device used to prepare the infrastructure as code. It should have git, terraform and AWS CLI installed.
- GitHub: Source Code Management GitHub used for code versioning. With git pull/git push, files are kept in sync with the remote server.
- Terraform: The infrastructure-as-code tool used to codify and provision the infrastructure on cloud.
- AWS Cloud, where the infrastructure resources are provisioned.
Step 0: Getting Started
Prerequisites:
To reproduce this set-up:
- Familiarity with Linux, Git and GitHub, infrastructure-as-code and DevOps has been assumed.
- Ubuntu Linux 20.04 Focal Fossa LTS distribution was used for all the activities in the task.
- An AWS account with appropriate permissions to create resources like EKS, VPC, subnets, ECR, and RDS (MySQL) is required. Visit this link to create an AWS account if you don't already have an account.
Considerations: