Coder Social home page Coder Social logo

vadimso / k8s-tg-gitops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leiarenee/k8s-tg-gitops

0.0 0.0 0.0 906 KB

Sample Repository for Creating a Kubernetes Cluster and replicating the infrastructure by a thin Terraform wrapper, i.e. Terragrunt Open Source Framework using Multi Branch Gitops approach

License: MIT License

Shell 2.06% Python 1.09% Awk 0.02% HCL 96.84%

k8s-tg-gitops's Introduction

K8s-TG-Gitops

Sample Repository for Creating a Kubernetes Cluster over a private VPC and replicating the infrastructure using Multi Branch Gitops approach by Terragrunt & Terraform.

Documentation

Pre-Requisites

  • Terraform > v1.0
  • Terragrunt > v31.0
  • AWS Client > v2.0
  • Jq
  • timeout

Install

brew install terraform terragrunt awscli jq coreutils

Running

You should have an empty sub organizational account with a Route53 hosted zone created to test this code. Duplicate the sample_override.hcl file and rename it as .override.hcl Enter the parameters in override.hcl file.

Run:

./deploy.sh
Output
direnv: loading ~/Dev/Leia/k8s-tg-gitops/.envrc                                                                                                         
direnv: export +AWS_BATCH_ID +AWS_PAGER
leia@Leias-MBP k8s-tg-gitops % ./deploy.sh
/Users/leia/Dev/Leia/k8s-tg-gitops/aws/live
0ba60e3c3736ae1567b44d866fb2a51db9dd8142
Platform: darwin
Running 'apply' command in Environment:

testing
{
  "account_name": "testing",
  "aws_account_id": "57878****1",
  "aws_profile": "leia-testing", (Section title in your `./aws/credentials` file)
  "bucket_suffix": "",
  "parameters": { 
    "CERTIFICATE": "arn:aws:acm:eu-west-1:***68852***2943:certificate/43***1ea9***58-254b-4f8c-995f-a31**1559f**cce5", (Not compulsory)
    "CLUSTER": "my-testing-k8s", (required)
    "DNS_ZONE_ID": "Z0892705215W14M9I9W9N", 
    "DOMAIN": "test.leiarenee.io"
  }
}

AWS Caller Identity
arn:aws:iam::553**52****2943:user/cicd
AIDAY****B27X7****24ZTQXZ

Do you confirm? (y/n)
y

Enter y

Output

Enter y again

Process 89238 Confirmed.
Processing aws/live/api/cluster
Parent PID:89238, Current PID:89264
Processing aws/live/api/deploymets/api/flask
Parent PID:89238, Current PID:89267
Processing aws/live/api/deploymets/services/api/flask/external
Parent PID:89238, Current PID:89272
Processing aws/live/api/deploymets/services/api/flask/internal
Parent PID:89238, Current PID:89275
Processing aws/live/api/deploymets/shared/namespace
Parent PID:89238, Current PID:89278
Processing aws/live/api/vpc
Parent PID:89238, Current PID:89290
INFO[0007] The stack at /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live will be processed in the following order for command apply:
Group 1
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/build/flask
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/vpc

Group 2
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/cluster

Group 3
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/deploymets/shared/namespace

Group 4
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/deploymets/api/flask
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/deploymets/services/api/flask/external
- Module /Users/leia/Dev/Leia/k8s-tg-gitops/aws/live/api/deploymets/services/api/flask/internal

Notes

To disable user interaction:

  • Use --terragrunt-non-interactive with deoploy.sh command
  • Set $TG_DISABLE_CONFIRM environment variable true

Links

Dependencies


Credits

Leia Renée
Senior Cloud Architect

References


Liability

THIS SOFTWARE ALONG WITH ITS DOCUMENTATION IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH IT.

k8s-tg-gitops's People

Contributors

leiarenee 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.