Objectives:

To use infrastructure-as-code tools (Terraform):

  1. Set up Elastic Kubernetes Service (EKS) cluster, Virtual private Cloud (VPC), subnets, and other required resources.
  2. Set up a private Docker registry to store the application's Docker images.
  3. 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

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nxsb443wk2vbn7ynpy7f.png

  1. Client device used to prepare the infrastructure as code. It should have git, terraform and AWS CLI installed.
  2. GitHub: Source Code Management GitHub used for code versioning. With git pull/git push, files are kept in sync with the remote server.
  3. Terraform: The infrastructure-as-code tool used to codify and provision the infrastructure on cloud.
  4. AWS Cloud, where the infrastructure resources are provisioned.

Step 0: Getting Started

Prerequisites: To reproduce this set-up:

Considerations: