Skip to content

Aniket-Rasal/gitops-with-gitlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitOps CI/CD Pipeline with GitLab, Terraform, Helm & AWS EKS πŸ“Œ Overview

This project demonstrates a production-grade GitOps CI/CD pipeline built using GitLab. It automates infrastructure provisioning, application build, containerization, and deployment to AWS EKS.

The system ensures:

Automated end-to-end delivery Infrastructure as Code (IaC) Version-controlled deployments Continuous validation and drift detection

πŸ—οΈ Architecture Summary

The solution is built around three independent but integrated pipelines: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ GitLab β”‚ β”‚ (Source + CI/CD) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β–Ό β–Ό β–Ό

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ CI Pipeline β”‚ β”‚ Terraform CI β”‚ β”‚ Helm CD β”‚ β”‚ (App Build) β”‚ β”‚ (Infra) β”‚ β”‚ (Deploy) β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚

      β–Ό                 β–Ό                 β–Ό

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Maven Build β”‚ β”‚ Validate β”‚ β”‚ Helm Lint β”‚ β”‚ Unit Test β”‚ β”‚ Plan β”‚ β”‚ Package β”‚ β”‚ Checkstyle β”‚ β”‚ Apply β”‚ β”‚ Deploy β”‚ β”‚ SonarQube β”‚ β”‚ Drift Detect β”‚ β”‚ Drift Check β”‚ β”‚ Docker Build β”‚ β”‚ Destroy β”‚ β”‚ Notify β”‚ β”‚ Docker Push β”‚ β”‚ Notify β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β–Ό β–Ό

          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚        AWS Cloud              β”‚
          β”‚                               β”‚
          β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
          β”‚    β”‚        EKS          β”‚    β”‚
          β”‚    │─────────────────────│    β”‚
          β”‚    β”‚  Ingress            β”‚    β”‚
          β”‚    β”‚  Service            β”‚    β”‚
          β”‚    β”‚  Deployment         β”‚    β”‚
          β”‚    β”‚  ConfigMap/Secret   β”‚    β”‚
          β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
          β”‚                               β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Terraform Pipeline (Infrastructure Layer)

Manages AWS infrastructure using Terraform.

Key Responsibilities:

Validate Terraform configurations Plan infrastructure changes Provision/update EKS cluster and AWS resources Perform drift detection Maintain remote state securely 2. CI Pipeline (Application Layer)

Handles build, testing, and containerization.

Stages:

Build & Unit Testing (Maven + JUnit) Code Quality Checks (Checkstyle, SonarCloud) Docker Image Build Push image to GitLab Container Registry Update Helm chart values dynamically 3. Helm Pipeline (Deployment Layer)

Responsible for Kubernetes deployments.

Tasks:

Helm chart linting & packaging Deploy applications to AWS EKS Perform deployment drift detection Send Slack notifications πŸ”„ GitOps Workflow Developer pushes code to GitLab CI pipeline builds and tests application Docker image is created and pushed to registry Helm values are updated automatically Helm pipeline deploys application to EKS Terraform ensures infrastructure consistency Drift detection monitors system state Notifications sent via Slack 🧰 Tools & Technologies πŸ”Ή GitLab GitLab Repositories (3 repos: app, helm, terraform) GitLab CI/CD pipelines GitLab Container Registry GitLab Terraform Backend πŸ”Ή AWS Amazon EKS (Kubernetes cluster) EC2 (GitLab Runner) IAM (Roles & Policies) VPC (Networking) S3 (Terraform backend) πŸ”Ή DevOps Tools Terraform (Infrastructure as Code) Docker (Containerization) Helm (Kubernetes package manager) SonarCloud (Code quality) Slack (Notifications) πŸ’» Tech Stack Category Tools/Technologies Language Java, YAML, Bash Build Tool Maven Testing JUnit Code Quality Checkstyle, SonarScanner Container Docker Version Control Git πŸ“‚ Repository Structure

This project follows a multi-repo architecture:

Application Repo β†’ Source code + CI pipeline Helm Repo β†’ Helm charts for deployment Terraform Repo β†’ Infrastructure provisioning πŸ” Key Features βœ”οΈ Fully automated CI/CD pipeline βœ”οΈ GitOps-driven deployment strategy βœ”οΈ Infrastructure as Code (Terraform) βœ”οΈ Containerized application delivery βœ”οΈ Kubernetes deployment using Helm βœ”οΈ Code quality and security checks βœ”οΈ Drift detection and alerting βœ”οΈ Slack integration for notifications πŸ“ˆ Benefits Faster and reliable deployments Improved traceability and auditability Reduced manual intervention Scalable and production-ready architecture

πŸ‘¨β€πŸ’» Author Aniket Rasal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors