/jaehong21-infra-archive

Implementation of GitOps and IaC using ArgoCD and Terraform

Primary LanguageHCL

Introduction

├── management
│   ├── archive
│   └── scripts
├── platform
│   ├── init.tf
│   ├── main.tf
│   └── module
└── service
    ├── application
    └── example
        ├── cert
        ├── dev
        └── prod
  1. Management
    This folder contains the scripts and yaml files to manage the infrastructure.
    The scripts are written in bash and are used to create the infrastructure and to destroy it.
    The archive folder contains kubernetes manifest files.

  2. Platform
    This folder contains the terraform files to create the infrastructure.
    init.tf file contains terraform provider and the backend configuration.
    main.tf file contains the resources to create.
    module folder contains the modules to create the infrastructure.

  3. Service
    This folder contains the kubernetes manifest files to deploy in ArgoCD.
    application folder contains the ArgoCD project format in yaml files.
    example represents one of applications in ArgoCD.
    cert folder contains the certificate files.
    dev folder contains the kubernetes manifest files to deploy the application in dev environment.
    prod folder contains the kubernetes manifest files to deploy the application in prod environment.

Terraform

Terraform is an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure.

This repository is based on AWS (GCP or AZURE is not supported)

# use command below to start
terraform init

Terraform Usage

uncomment main.tf to use following templates

  1. NAT instance
  2. EC2 (+ k3s) (Lightweight Kubernetes setup using EC2)
  3. EKS (Elastic Kubernetes Service)
  4. ECR (Elastic Container Registry)
  5. AWS Lambda (Serverless)
  6. Route53
  7. Key Pair
  8. Lightsail
  9. VPC and Subnet
# module "nat" {
# source = "./module/nat"
# }

module "eks" {
 source = "./module/eks"
}