Giter Club home page Giter Club logo

tf-eks-argo's Introduction

Technical Challenge

Terraform

I wrote the terraform code using modules, this is the structure of the files:

├── argo-manifests
│   └── app-of-apps
│       ├── dev
│       │   ├── api.yaml
│       │   └── static.yaml
│       ├── main
│       │   ├── api.yaml
│       │   └── static.yaml
│       └── stage
│           ├── api.yaml
│           └── static.yaml
├── backend.tf
├── main.tf
├── modules
│   ├── eks
│   │   ├── main.tf
│   │   ├── output.tf
│   │   └── variables.tf
│   └── vpc
│       ├── main.tf
│       ├── output.tf
│       └── variables.tf
├── output.tf
├── providers.tf
├── README.md
├── tfvars
│   ├── dev.tfvars
│   ├── prod.tfvars
│   └── stage.tfvars

How tu run

Each environment will be deployed in its own workspace: dev, prod and stage and has its won var values files (tfvars/prod.tfvars, tfvars/dev.tfvars, tfvars/stage.tfvars). To apply the terraform code you need to be in the root folder with backend configured and the aws credentials configured in the aws cli and run:

terraform init
terraform workspace select dev # change dev for the environment that you need
terraform plan -var-file ./tfvars/dev.tfvars #check wath it'll be created
terraform apply  -var-file ./tfvars/dev.tfvars #and if it's ok copnfir the apply

Floder: argo-manifests

In this folder there are other folder, one for each environment that contains the Argo Apps CRDS to deploy the Argo Apps pointin to the app repo as source and the eks cluster as detination to deploy it.

Modules Folder

Here are the modules that I'll use to deploy the resources:

  • eks: here I use the eks module to deploy the eks cluster and then the eks_blueprints_addons module to deploy argo inside of the cluster and point it the workloads to the path wher I have the Argo manifests.

  • vpc: here I configure al the terrafor code to deploy the vpc and their realated resources.

tfvars

Here I put one file for each env where you define the specific configuratioon for each environmet that will applied in its corresponding workspace

Root folder files

  • backend.tf: all the configuration needed to store the terraform state file in a remote backen in this case an s3 bucket

  • main.tf: the entry point of the code, from here you call the module passing them the specific configs needed.

  • providers.tf: all the configuration related to the providers needed to deploy the code

  • variables.tf: variables definitions

tf-eks-argo's People

Contributors

mmunizclicoh avatar mmuniz0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.