This project aims to deploy Metabase, an open-source business intelligence tool, using EKS, Fargate, Karpenter, and Keda to achieve efficient scaling and cost savings. The setup includes Terraform for infrastructure management, Istio for service mesh, Prometheus and Grafana for monitoring, and Keda for autoscaling.
.
├── README.md
├── annotations.md
├── assets
│ ├── ekfk-arch.drawio.png
│ ├── keda-dashboard.png
│ └── stack-workflow.png
├── environments
│ ├── dev
│ └── lab
│ ├── backend.tf
│ ├── main.tf
│ ├── outputs.tf
│ ├── providers.tf
│ ├── s3-dynamodb
│ │ └── main.tf
│ └── variables.tf
├── infra
│ ├── backend
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ ├── eks-fargate-karpenter
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ ├── rds
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ └── vpc
│ ├── main.tf
│ ├── outputs.tf
│ └── variables.tf
├── scripts
│ └── calculate_cluster_size.sh
└── stack
├── istio
│ ├── istiod-values.yaml
│ ├── pod-monitor.yaml
│ └── service-monitor.yaml
├── keda
│ └── values.yaml
├── metabase
│ ├── metabase-hpa.yaml
│ ├── metabase-scaling-dashboard.yaml
│ └── values.yaml
└── monitoring
└── values.yaml
Clone the devenv repository and set permissions:
chmod +x *.sh
./main.sh
Alternatively, install prerequisites manually:
aws configure
to set up AWS credentials.Navigate to environments/lab/s3-dynamodb
and initialize Terraform:
terraform init
terraform apply
Run the appropriate GitHub Actions workflows to set up the VPC, EKS cluster, and other infrastructure components: plan-workflow.yaml
and apply-workflow
.
Run the stack-workflow.yaml
workflow.
Get service IP addresses:
kubectl get svc -A
Access services using their external IPs:
xxxxx.elb.us-east-1.amazonaws.com
xxxxx.elb.us-east-1.amazonaws.com
xxxxx.elb.us-east-1.amazonaws.com:9090/graph
uninstall-stack-workflow.yaml
destroy-workflow.yaml
For detailed instructions and code, refer to the respective files and directories in the repository. Also, please refer to this medium article for a deeper dive.