Mini-Project-DevOps-and-Deployment
Mini-Project-DevOps-and-Deployment
Prepared by:
Mahmoud Hedi Nefzi , Sandra Mourali , Omar Besbes
Project Repository
Part 1: DevOps
Introduction
The aim of this mini-project was to design and implement a fully automated CI/CD
pipeline adhering to DevOps best practices. The pipeline integrates multiple tools and
techniques to ensure seamless application development, testing, and deployment while
maintaining high security and code quality standards.
Objectives
1. Automate the building, testing, and deployment process for an Express.js
application.
2. Integrate vulnerability scanning tools to identify security flaws early in the
pipeline.
3. Use SonarQube to ensure the code meets high-quality standards and detect
critical issues.
4. Leverage Docker to containerize the application and push the resulting images to
Docker Hub.
5. Deploy the application using a GitOps approach, with ArgoCD managing
Kubernetes cluster configurations.
Pipeline Workflow
The CI/CD pipeline was designed to run automatically on every push to the main
branch, ensuring continuous integration and delivery. The following are the key steps
implemented in the pipeline:
SonarQube Configurations:
add sonar URL and token for github yaml via secrets too.
Solution Architecture
The deployment process involves:
Deployment Workflow
1. ArgoCD Configuration
ArgoCD was set up to monitor the GitHub repository containing Kubernetes
manifests.
Any changes to the manifests in GitHub trigger an automatic synchronization
with the Kubernetes cluster.
2. Continuous Deployment
After each push to the main branch, the pipeline ensures:
Validation of Kubernetes configurations.
Deployment of the latest Docker image to the Kubernetes cluster.
3. Rollback Mechanism
Using GitOps principles, ArgoCD allows seamless rollbacks by reverting to a
previous commit in the Git repository. This ensures stability in case of
deployment failures.
4. Monitoring and Alerts
The system was configured to monitor deployments and send alerts for
failures or performance issues.
GITHUB RUNNER
github repository -> settings -> actions -> runners -> self-hosted runners -> add
runner
KUBERNETES
We created kubernetes cluster, KinD on same machine with github-runner and
sonarqube. by this way runner can reach kubernetes cluster locally. y
This script should install docker and create kind kubernetes.
curl https://raw.githubusercontent.com/alperen-selcuk/kind-
install/main/kind.sh | bash -
After installation you can see KinD cluster IP local and port different. because of docker
network
ARGOCD
We installed argocd on our kubernetes cluster via a simple yaml file. crd and argocd
Conclusion
This mini-project demonstrates the implementation of a CI/CD pipeline and deployment
process following industry-standard DevOps practices. It highlights the effective use of
tools like GitHub Actions, Docker, SonarQube, Trivy, and ArgoCD to achieve
automation, security, and scalability.
The project not only ensures efficient and secure application delivery but also provides
a robust framework for future scalability and optimization. As students, this experience
has given us valuable insights into real-world DevOps challenges and solutions.