CR DevOps
CR DevOps
Compte-rendu TP4
Modern Pipeline Creation
Rédigé par:
- CHAIMA BOUHLEL
- NADA KHELIF
GL4
Introduction
In this lab, we delve into Continuous Integration and Continuous Deployment (CI/CD)
pipelines, focusing on their pivotal role in modern software development. We aim to
propose three comprehensive pipelines encompassing the latest concepts and using
open-source tools. Through three different pipeline architectures, we aim to elucidate each
tool's contribution's significance, foster a deeper understanding of CI/CD principles and
practices, and pave the way for seamless software delivery and deployment.
CI/CDPiprline1.drawio
2
3
Description:
Our pipeline encompasses automated steps that streamline the software engineering
process from code development to delivery.
The CI/CD pipeline typically begins with the source stage, where code is retrieved from a
version control system like GitHub. This stage includes setting up branch protection rules
and implementing linting checks to maintain code integrity and quality.
The subsequent build stage involves compiling code and creating container images, often
using technologies like Docker. Unit tests are run during this stage to verify basic
functionality, and code coverage checks ensure sufficient test coverage.
Moving forward, the testing stage conducts comprehensive testing, such as integration
tests, to validate the application's functionality as a whole. This stage may require an
integrated testing environment to simulate dependencies accurately.
Finally, the release stage deploys the application to the dockerhub for use in various
environments, including QA, staging, and production. Images are shipped to a registry, and
environments pull these images for additional testing and deployment.
Tools Choice:
Tool: GitLab
4
Tool: Jenkins
- Explanation: Jenkins is a popular automation server that facilitates the build process
in CI/CD pipelines. It supports compiling code, building container images (e.g., using
Docker), and running unit tests. Jenkins' flexibility and extensibility make it suitable
for various build tasks across different technologies.
Tool: Selenium
5
CICD.drawio
6
Description:
We will take our previous CI/CD pipeline and then we will trigger a CD pipeline:
Manifest Files Population: Once the configuration repository is set up, it is populated with
manifest files. For example, a Kubernetes deployment manifest is added, referencing the
container image generated in the CI/CD pipeline.
Deployment Models: We have two deployment models: the push model and the pull
model. In the push model, configurations are manually or automatically pushed to
environments. In contrast, the pull model, facilitated by tools like Argo CD, pulls
7
configurations from the repository to synchronize environments automatically. We will be
using the pull model!
Tools Choice:
Tool: Kubernetes
ArgoCD:
GitOps:
GitOps is the foundation of the deployment pipeline, where configurations and deployment
manifests are stored in Git repositories. Tools like ArgoCD or Flux continuously reconcile
the cluster state with the desired state defined in Git, enabling automated and declarative
deployments.
8
GitLab and GitLab CI/CD:
GitLab provides a comprehensive platform for version control (Git repository hosting),
issue tracking, code review, and CI/CD automation. GitLab CI/CD pipelines are used to
define, build, test, and deploy applications automatically based on code changes.
Terraform:
Stores Docker images generated during the CI/CD pipeline for deployment.
9
Link to the diagram:
Copy of CICD.drawio
This stage involves fetching the source code of the application from a version
2. Build Image:
The source code is used to build a container image, which includes all the
Tools used: Docker (for containerization), GitLab CI/CD (to define and automate the
build process).
3. Test:
Automated tests are run on the built image to ensure that the application functions
10
Tools used: GitLab CI/CD (for defining and executing automated tests), SonarQube
Once the image passes the tests and is deemed ready for deployment, it is pushed
5. Deploy on Kubernetes:
The image stored in the container registry is deployed onto a Kubernetes cluster,
Tools used: Kubernetes (for container orchestration), GitLab CI/CD (for deploying
Azure is used as the cloud provider, providing infrastructure services and resources
Conclusion
In conclusion, we have successfully designed and implemented three pipelines: a CI/CD
pipeline, a CD pipeline, and a complete CI/CD pipeline. Each pipeline integrates essential
tools such as GitLab for version control, Jenkins for automation, Docker for
containerization, and Kubernetes for orchestration. This architecture ensures a smooth
workflow from code development to deployment, streamlining the software delivery
process.
11