Skip to content

Insight Fellow Project by Qaif Shaikh - 20B DO SV

Notifications You must be signed in to change notification settings

qaifmz/terrastax

Repository files navigation

Build Status open-issues open-pr

TerraStax for AWS

An Insight DevOps Fellow Project by Qaif Shaikh

Features

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.

Terraform Versions

For Terraform v0.12.26+

Usage

module "this" {
    source = "github.com/qaifmz/terrastax"
}

Instructions

You will need to configure your AWS credentials before using this project:

Linux

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

Windows

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

Testing the Project

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

Examples

Known Issues

No issue is creating limit on this module.

Requirements

Name Version
kubernetes 1.10

Providers

Name Version
aws n/a

Inputs

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

Outputs

Name Description
airflow Airflow installed
elk-stack ELK Stack installed
fluentd Fluentd installed
nginx_ingress Nginx Ingress installed
prometheus-operator Prometheus Operator installed

Testing

This module has been packaged with terratest tests

To run them:

  1. Install Go
  2. Run make test-init from the root of this repo
  3. Run make test again from root

Authors

Module managed by qaifmz

About

Insight Fellow Project by Qaif Shaikh - 20B DO SV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published