This repository contains the solution for a DevOps practical task to assess skills and expertise in the DevOps lifecycle. The task involved setting up both Build and Release pipelines, creating Docker images, generating Helm charts, and deploying Kubernetes.
The main goal of this task was to build a CI/CD pipeline in Azure DevOps that handles the following:
- Source Code Checkout: Using
checkout: selfto retrieve the project's latest version. - Docker Image Build: Building the Docker image using the provided Dockerfile and pushing it to Docker Hub.
- Helm Chart Generation: Creating Helm charts for Kubernetes deployments.
- Release Pipeline: Deploy the application to Kubernetes environments (Dev and Prod) using Helm, with environment-specific configurations.
Here’s the project structure:
├── CD.yml
├── CI.yml
├── Dockerfile
├── k8s
│ └── deploy.yaml
└── webapp
├── Chart.yaml
├── environment
│ ├── deployment_dev.yaml
│ ├── deployment_prod.yaml
│ ├── values_dev.yaml
│ └── values_prod.yaml
├── templates
│ ├── deployment.yaml
│ ├── hpa.yaml
│ ├── ingress.yaml
│ ├── service.yaml
│ ├── serviceaccount.yaml
│ └── tests
│ └── test-connection.yaml
└── values.yaml- CI/CD Pipelines: Configured using Azure DevOps with
checkout: selffor code retrieval. - Docker & Kubernetes: Docker image build and Kubernetes deployment via Helm.
- Environment-Specific Configurations: Separate configurations for Dev and Prod environments using Helm chart values.
- Clone the repository.
- Set up your Azure DevOps account and pipelines (Build and Release).
- Configure your Kubernetes cluster.
- Run the pipelines to build and deploy the application.
- Azure DevOps: For pipeline management.
- Docker: For containerization.
- Helm: For Kubernetes deployments.
- Kubernetes: For orchestrating the deployment.