github-projects
k8-devops-pipeline
What Is

DevOps Infrastructure on AWS with Kubernetes

This project showcases a complete DevOps infrastructure setup on AWS, leveraging Kubernetes clusters on EC2 virtual machines along with several essential DevOps tools. The infrastructure supports end-to-end workflows, from code management and CI/CD to monitoring and deployment.

Overview

The project implements a CI/CD pipeline and infrastructure using AWS services and other tools. Below are the key tools and technologies included:

Tools Used

  • GitLab: Version control and source code management
  • Docker / Docker Hub: Containerization and image repository
  • SonarQube: Code quality and security analysis
  • Jenkins: Continuous integration and delivery
  • Kubernetes / Minikube: Orchestration of containers for deployment and scaling
  • Terraform: Infrastructure as code (IaC) for resource provisioning

Technologies Used

  • AWS RDS: Managed relational database service
  • AWS EC2: Compute resources for hosting services and clusters
  • CI/CD: Continuous Integration and Continuous Deployment setup

Architecture

The infrastructure follows a structured DevOps workflow, outlined below:

  1. Plan: Use Terraform to define and plan the infrastructure, including Kubernetes clusters, EC2 instances, and security configurations.
  2. Code: Source code is managed in GitLab repositories, facilitating version control and collaborative development.
  3. Test: SonarQube integrates with CI pipelines to ensure code quality and security compliance.
  4. Build: Jenkins automates the build process, using Docker to containerize applications and pushing images to Docker Hub.
  5. Deploy: Applications are deployed to the Kubernetes cluster, with Minikube for local development and testing.
  6. Monitor: Tools like Prometheus and Grafana (optional additions) can be integrated for monitoring application health and infrastructure.

Project Structure

This repository contains configuration files, scripts, and templates to set up and manage the DevOps infrastructure.

  • Terraform Configurations: Files for provisioning AWS resources and configuring Kubernetes clusters on EC2 instances.
  • GitLab CI/CD: YAML files to define CI/CD pipelines, including testing, building, and deployment stages.
  • Jenkins Jobs: Pre-configured jobs for building and deploying applications to the Kubernetes cluster.
  • SonarQube: Configuration for integrating SonarQube code analysis into the CI pipeline.
  • Kubernetes Manifests: YAML files for deploying applications and services within the cluster.

Getting Started

  1. Clone the Repository

    git clone https://github.com/yourusername/your-repo-name.git
    cd your-repo-name
  2. Set Up Infrastructure with Terraform

    • Ensure AWS CLI is configured with appropriate credentials.
    • Initialize and apply Terraform configurations to provision the infrastructure:
      terraform init
      terraform apply
  3. Configure GitLab and Jenkins

    • Import your code repositories into GitLab.
    • Set up Jenkins jobs to monitor GitLab repositories, run tests, build images, and deploy them.
  4. Deploy to Kubernetes

    • Use kubectl to apply Kubernetes manifests:
      kubectl apply -f k8s-deployment.yaml
  5. Monitor Application and Infrastructure

    • Integrate monitoring tools (optional) to observe application performance and resource usage.

Workflow Summary

  • Plan: Terraform for IaC
  • Code: Managed in GitLab
  • Test: Automated testing with SonarQube
  • Build: Jenkins builds and Dockerizes the application
  • Deploy: Kubernetes manages deployment and scaling
  • Monitor: (Optional) Prometheus and Grafana for monitoring

License

This project is licensed under the MIT License.



🧙 AI Wizard - Instant Page Insights

Click the button below to analyze this page.
Get an AI-generated summary and key insights in seconds.
Powered by Perplexity AI!