An Insight DevOps Fellow Project by Qaif Shaikh
This module deploys EKS Clusters on AWS and installs a list of Helm Charts on them. This repository uses the terraform-aws-eks-base as the base module to deploy the EKS cluster.
For Terraform v0.12.26+
module "this" {
source = "github.com/qaifmz/terrastax"
}
You will need to configure your AWS credentials before using this project:
Add the following in your ~/.bashrc
or ~/.zshrc
with your credentials:
export AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY
Execute the following in your terminal:
$ aws configure
AWS Access Key ID [None]: YOUR_AWS_ACCESS_KEY_ID
AWS Secret Access Key [None]: YOUR_AWS_SECRET_ACCESS_KEY
Default region name [None]: us-west-2
Default output format [None]: json
Initialize and Run Terraform Scripts
terraform init
terraform apply
Default Cluster name = "amz"
and AWS Region: us-west-2
If the output gives connection errors, input the following commands:
aws eks --region us-west-2 update-kubeconfig --name amz
terraform apply
In case you get any dependency errors, it could be because of the modules dependencies which is not supported by Terraform.
Simply rerun terraform apply
to solve this issue
If you want to port forward the services and deployments to your localhost, use the following commands:
kubectl --namespace=monitoring port-forward svc/prometheus-operator-prometheus 9090
kubectl --namespace=monitoring port-forward deploy/prometheus-operator-grafana 3000
kubectl --namespace=monitoring port-forward deploy/airflow-web 8080
kubectl --namespace=kube-system port-forward deploy/kibana-logging 5601
kubectl --namespace=kube-system port-forward svc/elasticsearch-logging 9200
No issue is creating limit on this module.
Name | Version |
---|---|
kubernetes | 1.10 |
Name | Version |
---|---|
aws | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
airflow_enabled | Bool to enable airflow | bool |
true |
no |
all_enabled | Bool to enable all services | bool |
true |
no |
aws_region | The region to deploy in | string |
"us-west-2" |
no |
elk-stack_enabled | Bool to enable elk-stack | bool |
true |
no |
fluentd_enabled | Bool to enable fluentd | bool |
true |
no |
id | The id of the resources | string |
"amz" |
no |
nginx_ingress_enabled | Bool to enable nginx ingress | bool |
true |
no |
prometheus-operator_enabled | Bool to enable prometheus-operator | bool |
true |
no |
Name | Description |
---|---|
airflow | Airflow installed |
elk-stack | ELK Stack installed |
fluentd | Fluentd installed |
nginx_ingress | Nginx Ingress installed |
prometheus-operator | Prometheus Operator installed |
This module has been packaged with terratest tests
To run them:
- Install Go
- Run
make test-init
from the root of this repo - Run
make test
again from root
Module managed by qaifmz