Search
⌃K
Links

Deploy on AWS

Using Terraform

Introduction

Amazon Web Services, one of the world's three most popular cloud providers, offers reliable and scalable cloud computing services. Free to join. Pay only for what you use.
At the moment, memphis utilizing Terraform to automate the entire deployment process from VPC creation, to K8S, to memphis deployment.
Terraform codifies cloud APIs into declarative configuration files.

Prerequisites

IAM Policy to use -
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Sid": "VisualEditor0",
6
"Effect": "Allow",
7
"Action": [
8
"iam:*",
9
"kms:*",
10
"logs:*",
11
"ec2:*",
12
"eks:*"
13
],
14
"Resource": "*"
15
}
16
]
17
}
How to configure AWS CLI -
$ aws configure
AWS Access Key ID [****************EF66]:
AWS Secret Access Key [****************Fzna]:
Default region name [eu-central-1]:
Default output format [json]:

Terraform Installation Flow

Step 0: Clone Memphis-Terraform repo

Using git ssh
git clone [email protected]:memphisdev/memphis-terraform.git && \
cd memphis-terraform/AWS/EKS
Using git http
git clone https://github.com/memphisdev/memphis-terraform.git && \
cd memphis-terraform/AWS/EKS

Step 1: Deploy EKS Cluster using Terraform

make infra
Instead of running three terraform commands

Step 2: Deploy Memphis

make cluster
Once deployment is complete, the Application Load Balancer URL will be revealed.

Step 3: Login to Memphis

Display memphis load balancer public IP by running the following -
kubectl get svc -n memphis
The UI will be available through https://<Public IP>:9000

Appendix A: Clean (Remove) Memphis Terraform deployment

Destroy Memphis App -
make destroymemphis
It might take a few minutes for the ELB to be deleted.
Destroy Memphis EKS Cluster -
make destroyinfra