Skip to content

eozcany/CloudNative-Devops-Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudNative DevOps Stack

The Reversed-IP App is an example a Node.js application deployed locally using Docker and Kubernetes. This guide provides a step-by-step process for deploying the app along with its dependencies (MySQL) using Helm.

You can just replace it with your application.

Local Deployment

Prerequisites

Before deploying the app, ensure the following are installed:


Step-by-Step Local Deployment Guide

Start Minikube

minikube start 

Build the Docker image

eval $(minikube docker-env)
cd app
docker build -t reversed-ip:1.0 .

Deploy the Application with Helm

cd helm/charts/local
helm dependency update
helm install local .

Verify the deployment:

kubectl get pods

Access the Application

kubectl port-forward svc/local-reversed-ip 8000:80

Open the browser hit http://localhost:8000/

Prerequisites

Before deploying the app, ensure the following are installed:

Step-by-Step Local Deployment Guide

Navigate to the Terraform code and initilize

cd terraform/live
terraform init

Deploy VPC and EKS at the beginning for only first apply

why: Terraform code consumes both kubernetes and aws provider, so without provisioning an EKS cluster, kubernetes provider terraform resource will throws the error

terraform plan --target module.eks --target module.vpc
terraform apply --target module.eks --target module.vpc

Use --auto-approve flag or type yes if terraform asks to continue

Deploy AWS and Kubernetes resources

terraform plan 
terraform apply

CI-CD Pipeline

  • Uses Github Actions Runner
  • Runner Pods are provisioned in Kubernetes by deployed Actions Runner Controller
  • Find the actions runner file .github/workflows/reversed-ip-ci-cd.yaml
  • Once application updated, Actions runner will be triggered automatically

Architecture

  • Nodejs : Application Software Language
  • Docker : Container Runtime and Image Creating
  • IaC : Terraform, Helm
  • Cloud: AWS
  • Container Orchestration: Kubernetes (EKS Managed Control Plan, Spot Worker Nodes)
  • Networking and Firewall : VPC and Security Groups, (Public and Prviate Subnet)
  • CI-CD: Github Actions
  • CI-CD Runners: Actions Runner Controller on Kubernetes
  • Deployment Strategy: Rolling Update
  • Container Registry: AWS ECR
  • Secrets Management: AWS Secrets Manager
  • Database: MySQL (K8s Deployment)
  • DNS: AWS Route53
  • TLS Certificates: AWS ACM
  • Secrets Synchronizer: External-Secrets Operator on K8s
  • Traffic Management: Nginx Ingress Controller On K8s
  • Load Balancing : AWS ALB
  • EKS Worker Node Scaling: Cluster Autoscaler on K8s
  • Kubernetes Metrics Provider: Metrics Server on K8s
  • IAM Management: IRSA Roles with least permissions trusted only apps on defined namespaces

Future Plannings

  • Argo CD Integration

  • Github APP replacement with PAT

  • Karpenter replacement with Cluster Autoscaler

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published