You are on page 1of 70

DEVELOPMENT OPERATIONS

ITLDO801
LO2. IMPLEMENT CI/CD
Prepared by Anastase MUVANDIMWE
Introduction to CI/CD pipelines

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 2


Description of CI/CD pipeline
oThe CI/CD pipeline is the continuous integration, delivery, and deployment
workflow.
oThe pipeline triggers various processes during the development stages through
a configuration file.
oThe pipeline focuses on using CI/CD automation tools.
oOn the other hand, a DevOps pipeline focuses more on responsiveness,
highlighting the importance of input from different DevOps roles and
responsibilities.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 3


Description of CI/CD pipeline(Cont’)
oA pipeline is a process that drives software development through a path of
building, testing, and deploying code, also known as CI/CD.
oBy automating the process, the objective is to minimize human error and
maintain a consistent process for how software is released.
oTools that are included in the pipeline could include compiling code, unit tests,
code analysis, security, and binaries creation.
oFor containerized environments, this pipeline would also include packaging the
code into a container image to be deployed across a hybrid cloud.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 4


Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 5
Continuous Integration(CI)
oContinuous integration is a process where changes are merged into a central
repository after which the code is automated and tested.
oThe continuous integration process is a practice in software engineering used to
merge developers' working copies several times a day into a shared mainline.
oIt refers to the process of automating the integration of code changes coming
from several sources. The process comprises several automation tools that
emphasize on the code’s correctness before Integration

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 6


Continuous Integration(CI) Cont’
oContinuous integration (CI) is the process of automatically building and testing
code every time a team member commits code changes to version control.
oA code commit to the main or trunk branch of a shared repository triggers the
automated build system to build, test, and validate the full branch.
oCI encourages developers to share their code and unit tests by merging their
changes into the shared version control repository every time they complete a
task.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 7


Continuous Deployment(CD)
oContinuous Delivery (CD) is a DevOps practice that refers to the building,
testing, and delivering improvements to the software code.
oThe phase is referred to as the extension of the Continuous Integration phase to
make sure that new changes can be released to the customers quickly in a
substantial manner.
oThis can be simplified as, though you have automated testing, the release
process is also automated, and any deployment can occur at any time with just
one click of a button.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 8


Continuous Deployment(CD) Cont’
oCD is a lean practice, with the goal to keep production fresh with the fastest
path from new code or component availability to deployment.
oAutomation minimizes the time to deploy and time to mitigate (TTM) or time to
remediate (TTR) production incidents.
oIn lean terms, CD optimizes process time and eliminates idle time.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 9


References
CI/CD Pipeline: Definition, Overview & Elements (phoenixnap.com)
What is a CI/CD pipeline? (redhat.com)
What is Continuous Integration? All you need to know (simplilearn.com)
Use continuous integration - Azure DevOps | Microsoft Learn
What is Continuous Integration, Deployment, and Delivery? (simplilearn.com)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 10


Features, Benefits and challenges of CI/CD

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 11


Automation
oCI/CD emphasizes automation throughout the software development lifecycle.
oAutomation helps in reducing manual errors, ensures consistency, and
accelerates the delivery pipeline.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 12


Continuous Integration(CI)
oCode Repository: Developers regularly integrate their code changes into a
shared version control repository (e.g., Git).
oAutomated Builds: Automated build processes compile and build the
application whenever code changes are pushed to the repository.
oAutomated Testing: Automated testing, including unit tests and other types of
tests, is run to ensure that the new code integrates well with the existing
codebase without introducing regressions.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 13


Continuous Delivery
oAutomated Deployment: Once code changes pass all tests in the CI phase, CD
automates the deployment process to staging or pre-production
environments.
oConfiguration Management: CD ensures that the deployment environment is
consistent across different stages of the pipeline, reducing the chances of
deployment-related issues.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 14


Continuous Deployment(CD)
oIn some cases, CI/CD includes continuous deployment, where code changes
automatically move through the pipeline and get deployed to production
without manual intervention after passing all tests

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 15


Pipeline Orchestration
oCI/CD pipelines are defined as code, specifying the series of steps and stages
required to build, test, and deploy the application.
oOrchestration Tools: CI/CD pipelines are managed and executed by
orchestration tools (e.g., Jenkins, GitLab CI, Travis CI, or GitHub Actions).

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 16


Feedback loops & Versioning
oFeedback Loops
oCI/CD provides rapid feedback to developers by running automated tests and
checks. This helps identify issues early in the development process, reducing
the cost and effort required for fixing defects.
oVersioning
oCI/CD systems often support versioning of artifacts, allowing for traceability and
rollback capabilities in case of issues with a particular release.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 17


Collaboration, Monitoring and logging &
Security Integration
oCollaboration:
oCI/CD encourages collaboration between development, operations, and
quality assurance teams by providing a standardized and automated process
that all teams can follow.
oMonitoring and Logging:
oContinuous monitoring and logging of applications in production are often
integrated into the CI/CD process, allowing for quick detection and resolution
of issues.
oSecurity Integration:
oSecurity checks and scans can be integrated into the CI/CD pipeline to identify
and address security vulnerabilities early in the development lifecycle.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 18


Benefits
oDeliver software with less risk
oCI/CD pipelines standardize release processes across projects. By testing every
change in source code, we reduce the chances of introducing bugs.
oRelease new features more frequently
oA CI/CD pipeline can visualize your entire path from commit to production in a
single screen. You can navigate across stages, spot inefficiencies, and optimize
your process. By removing the roadblocks to productivity, you enable your
company to succeed.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 19


Benefits Cont’
oDeliver the product that users need. Delivering updates often leads to more
user feedback. You can take advantage of that by A/B testing features, or testing
early versions of products with real customers. This way you avoid investing too
much in features that your customers don’t need, and focus on those that
matter.
oImprove developer productivity. Engineering teams that don’t practice CI/CD
often work under stress. There are constant fires for bad deploys and hard-to-fix
outages. Developers write a lot of code that never gets used. Long-lived feature
branches are too big to get proper peer review, so code degrades in quality. On
the other hand, CI/CD guides product management to optimize for user impact.
Developers deploy code while it’s fresh in their minds. The result is a happy
engineering team.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 20


References
CI/CD: Continuous Integration & Delivery Explained - Semaphore (semaphoreci.com)
12 Business Benefits of CI/CD | Opsera

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 21


CI/CD challenges
oComplexity of Legacy Systems:
o Integrating CI/CD into existing legacy systems can be challenging due to outdated technologies,
monolithic architectures, and lack of proper version control.

oCultural Resistance:
o Teams accustomed to traditional development practices may resist the cultural shift towards CI/CD.
Resistance can arise due to fear of change, lack of awareness, or concerns about job security.

oInfrastructure Complexity:
o Managing and maintaining the infrastructure required for CI/CD pipelines can be complex.
Organizations need to invest in scalable and reliable infrastructure, which may include servers,
containers, and orchestration tools.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 22


CI/CD challenges(Cont’)
Integration Challenges:
◦ Integrating CI/CD tools with existing development tools, version control systems, and
issue tracking systems can be challenging. Compatibility issues may arise, requiring
customization or development of plugins.
Lack of Skills and Expertise:
◦ Organizations may face a shortage of skilled professionals who are proficient in CI/CD
practices and tools. Training and upskilling may be required to bridge this gap.
Inadequate Test Coverage:
◦ Insufficient test coverage may lead to undetected bugs in the production environment.
It's essential to ensure comprehensive testing strategies, including unit tests, integration
tests, and end-to-end tests.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 23


CI/CD challenges(Cont’)
Dependency Management:
◦ Managing dependencies, including third-party libraries and external services, can be
challenging. Changes in dependencies may impact the stability and reliability of the CI/CD
pipeline.

Rollback Complexity:
◦ Despite versioning and rollback capabilities, rolling back changes can be complex, especially if
there are database schema changes or data migrations involved. Ensuring a smooth rollback
process is crucial for minimizing downtime and impact on users.

Scalability Challenges:
◦ As the number of projects and developers grows, organizations may face challenges in scaling
their CI/CD infrastructure to handle increased load and demand.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 24


Elements and Components of CI/CD
pipeline/Stages of the CI/CD Pipeline

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 25


Source
oDevelopment teams use version control systems, such as Git. These systems
store code in a centralized repository. As a result, tracking changes,
collaborating, and securing the source code becomes a breeze.
oCI assumes repository changes happen at least daily, if not more often. In the
pipeline, source tracking is the base step in the pipeline automation process.
Monitoring changes and triggering events based on actions provides better
control over the source code.
oAutomating the source ensures the team stays informed of any changes and
problems with the code. Pinpointing the issue and advising the team allows
developers to act quickly and resolve issues in no time.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 26


Build
oThe build stage combines the source code with dependencies. The result is an
instance of the software potentially ready for end-users.
oThis step includes compiling code for languages like Go or Java. In this case, the
action requires special build tools such as Maven, Ant, or Gradle. Interpretive
languages such as Python or Ruby do not require such tools.
oThe build stage ideally runs in a clean and isolated environment, and
developers run the code in containers or VMs.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 27


Test
oThe testing stage in the pipeline involves a tremendous amount of automation, and
continuous testing ensures the pipeline discovers issues during the development stages.
oVarious automation testing tools help make this process easier.
oThe tests run across different devices and environments. The earlier, the better. The
testing stage automates performance, integration, functional, and regression tests.
Using both white box and black box testing yields the best results.
oDiscovering bugs as quickly as possible brings two benefits:
1. The issues do not reach the end-user, resulting in improvement in user experience.
2. The developers find it easier to fix a bug while the code is still fresh. Addressing issues as early
as possible makes debugging less costly.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 28


Deploy
oThe final stage in the CI/CD pipeline is deployment.
oAfter the software passes all the tests successfully, the program is ready for a
production environment.
oVarious deployment strategies exist, including assessing a few nodes or
providing software versions.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 29


References
CI/CD Pipeline: Definition, Overview & Elements (phoenixnap.com)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 30


Select the right CI/CD Tools

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 31


Benefits of using CI/CD tools
oWithout CI CD tools, organizing code updates is a time-consuming manual
procedure. Software projects can automate code updates with the use of CI CD
tools.
oThe primary purpose of using a Continuous Integration tool is for automation
and checking the consistency of the developer’s modification with the recent
code version. And all changes and dependencies added by the other team
members as well.
oA Continuous Deployment tool ensures that the code change passes through
the whole pipeline before being released.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 32


How to choose the right CI/CD tools?
oFunctionality
oThe tool’s extensibility
oProgramming languages and platforms supported
oYour budget
oConvenience and ease of use

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 33


Some of CI/CD Tools
oJenkins
oThis free, open-source Java-based software is among the most popular CI/CD tools on the
market. It combines tools for continuous delivery and integration with real-time testing and
reporting.
oTeamCity
oTeamCity is a sub-product of JetBrains. Like Jenkins, it is powered by Java and open-source. It
integrates perfectly with Docker and Kubernetes. The latter are solutions for building and
deploying containerized apps and testing them in virtual environments.
oCircleCI
oSome people say, it is the best CI/CD tool to streamline DevOps automation and software
deployment processes. With it, workflows can be split, shared and reused across multiple
containers.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 34


Some of CI/CD Tools(Cont’)
oTravis CI
oOne of the top picks for enterprise development because of the enhanced level
of security. The platform integrates perfectly with Lambda Test to streamline the
process of DevOps testing across different browsers, platforms and
environments.
oGitlab CI
oIf your development team hosts code in the GitLab repository, using this tool for
DevOps engineering is a clever choice. It allows DevOps developers to review
the code, deploy, integrate and deliver from a single dashboard.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 35


Some of CI/CD Tools(Cont’)
oTerraform
oAnother well-known platform for infrastructure management. Consider adding
Terraform to CircleCI to deploy your infrastructure in the same pipeline.
oAzure DevOps
oIt is almost an all-in-one solution developed by Microsoft. With it, you can use
Azure Pipelines, Visual Studio Team Services (VSTS), and Software Delivery
Services already built-in.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 36


Some of CI/CD Tools(Cont’)
oGitHub Actions
oGitHub Actions is a feature-rich CI/CD platform embedded within GitHub,
enabling developers to automate, customize, and execute software
development workflows directly in their repositories. An Action inside GitHub
Actions is a discrete unit of automation that performs a specific task within a
workflow. All the Actions are reusable, and there are many to choose from. You
can even create your own reusable ones.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 37


Some of CI/CD Tools(Cont’)
oAWS CodePipeline
oAWS CodePipeline is a fully managed CI/CD service offered by AWS. It
automates the build, test, and deployment features of your release process. It is
designed to provide a seamless integration experience with other AWS services
and popular third-party tools. AWS Code Pipeline ensures rapid and reliable
application and infrastructure updates, empowering developers to iterate swiftly
and maintain high software quality standards.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 38


References
Top CI/CD Tools: The Most Complete Guide with 34 Best Picks for DevOps Source – Cprime
13 Most Useful CI/CD Tools for DevOps Engineers in 2023 (spacelift.io)
Best 14 CI/CD Tools You Must Know 2023 | Katalon
Best CI/CD Tools for DevOps: A Review of the Top 10 (bluelight.co)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 39


Implement effective CI/CD Pipeline

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 40


Integration of version control

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 41


Git Practice
Git Tutorial (w3schools.com)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 42


DevOps Test Automation

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 43


The importance of test automation
oContinuous testing and test automation increase the reliability, consistency, and
efficiency of both the development team and the final product. This makes it
easier for DevOps and QA teams to remain on schedule without sacrificing
crucial debugging and troubleshooting processes.
oAdditionally, test automation is faster and more effective than manual tests. It
reduces the potential for costly human error and eliminates communication
barriers among team members, saving time and money.
oTest automation also offers new modes of flexibility, meaning development
teams can reuse their test scripts for any related testing suites.
oThanks to the automation environment, they don’t have to worry about
breaking the code or creating new scripts for each test case

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 44


Test Automation stages
oUnit testing
oUnit testing involves isolating your application into units and then testing the
behaviour of each as a function independent from external parties, databases,
or configurations. Unit testing often occurs during the build period and is
considered the first layer of testing.
oIntegration testing
oIntegration testing evaluates how several units are logically integrated, and how
this affects the system functionality without unintended errors in the integration
process. The main purpose of integration testing is to test the compliance of a
system by verifying how disparate modules work together.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 45


Test Automation stages(Cont’)
oRegression testing
oRegression testing ensures that bug fixes or other changes have not adversely
affected existing functionality. Automating regression tests allows developers to
quickly and efficiently identify and fix any issues that may have been introduced
by code changes, ensuring that the software remains reliable and bug-free.
oEnd-to-end testing
oAn end-to-end testing framework tests the functionality and performance of
the application by simulating the user’s expectations and needs from start to
finish. The end goal isn’t just to ensure the application validates and checks all
the user’s needs, but to ensure it operates and behaves at least as well as
expected.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 46


Test Automation stages(Cont’)
oExploratory testing
oExploratory testing is a more sophisticated software testing strategy that
involves parallel learning, testing, and reviewing various functional and visual
components from the user’s perspective.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 47


Test automation tools
oSelenium
oSelenium is a widely used open-source tool for automating web browsers. It supports
multiple programming languages and browsers, making it a popular choice for web
application testing.
oJenkins
oJenkins is an open-source automation server that is commonly used for continuous
integration and continuous delivery (CI/CD). It supports the automation of building,
testing, and deploying software.
oDocker
oDocker is a platform for automating the deployment of applications in lightweight,
portable containers. It is widely used in DevOps for containerization, enabling consistent
deployment across various environments.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 48


Integrate devops test automation to
workflow
oAutomation Testing practice

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 49


References
DevOps test automation | GitLab
DevOps Testing: The Basics and 5 Best Practices (brightsec.com)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 50


Devops Deployment Automation

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 51


Define deployment automation
oDeployment in DevOps is a process that enables you to retrieve important
codes from version control so that they can be made readily available to the
public and they can use the application in a ready-to-use and automated
fashion.
oDeployment tools DevOps comes into play when the developers of a particular
application are working on certain features that they need to build and
implement in the application.
oIt is a very effective, reliable, and efficient means of testing and deploying
organizational work.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 52


Define deployment automation
oAutomating the tasks involved in deploying a new build to both pre-production
and production environments creates a fast, repeatable, and reliable process.
oDeployment automation forms the second half of a CI/CD pipeline. Having
published build artifacts as part of the continuous integration stage, the next
steps involve deploying those artifacts to pre-production environments for
automated integration, end-to-end, performance, and security tests. These are
followed by manual exploratory tests and collecting feedback from staging.
oThe final stage involves releasing changes to production, either with a fully
automated process (continuous deployment) or with a scripted process that is
triggered manually (continuous delivery)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 53


References
What is Deployment Automation? | TeamCity CI/CD Guide | JetBrains
10 Best Deployment Tools for DevOps in 2023 (knowledgehut.com)

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 54


Deployment automation benefits
oAnyone can deploy
oFaster, more efficient deployment
oIncreased productivity
oFewer errors
oMore frequent releases
oImmediate feedback

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 55


Benefits of deployment automation
oFaster release cycles: Automation reduces the software deployment time so
that teams can ship updates more frequently.
oReduced human errors: Manual deployments are prone to human errors.
Automation minimizes mistakes.
oImproved reliability: Automated deployments are consistent, repeatable, and
standardized.
oIncreased efficiency: Automation frees up developer time from manual work.
oBetter collaboration: Automated pipelines improve visibility and collaboration
across teams.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 56


How to perform automated deployment
oCommit code changes to a version control system such as Git.
oThe code commit triggers an automated build process.
oAutomatically test the new build artifacts.
oIf tests are successful, deploy the build artifacts into a staging environment for
further testing.
oAfter approval, deploy changes to the production environment.
oCollect metrics to track the deployment.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 57


References
Deployment Automation: What is it & How to Start (atlassian.com)
6 Benefits of Deployment Automation – BMC Software | Blogs

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 58


Principals of deployment automation
oInfrastructure as Code (IaC)
oContinuous Integration and Deployment
oBlue green deployments
oCanary Deployments

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 59


Infrastructure as Code (IaC)
oThis principal is all about defining and managing infrastructure through code.
oTreat infrastructure configuration in the same way as software code.
oUse tools like Terraform, Ansible, or CloudFormation to define and manage
infrastructure resources programmatically.
oThis ensures consistency and repeatability in your deployments

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 60


Continuous Integration and Deployment
oImplement CI/CD pipelines to automate the build, test, and deployment
process.
oWith CI, developers integrate their code changes into a shared repository
frequently, triggering automated builds and tests.
oWith CD, code changes that pass CI are automatically deployed to production or
staging environments, minimizing manual intervention and reducing the time to
market.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 61


Blue green deployments
oBlue-green deployment is a deployment strategy used in software
development and release management.
oIt aims to minimize downtime and reduce the risk associated with
deploying new versions of an application by maintaining two
identical production environments, typically referred to as blue and
green.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 62


Deployment automation tools
1. Jenkins
2. GitLab CI/CD
3. CircleCI
4. Travis CI
5. Ansible

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 63


Deployment Automation workflow
oSource Control
oDevelopers commit code changes to a version control system (e.g., Git).
oSource control systems track changes, maintain version history, and enable
collaboration.
oContinuous Integration (CI)
oCI servers (e.g., Jenkins, GitLab CI) monitor the version control system for
changes.
oWhen changes are detected, the CI server triggers automated builds to
compile the code.
oAutomated unit tests and static code analysis are performed to ensure code
quality.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 64


Deployment Automation workflow(Cont’t)
oArtifact Repository
oThe CI server packages the compiled code, dependencies, and other artifacts.
oThese artifacts are stored in an artifact repository (e.g., Nexus, Artifactory) for
versioning and reuse.
oDeployment Automation
oAutomated deployment tools (e.g., Ansible, Terraform) use Infrastructure as
Code (IaC) to provision and configure infrastructure.
oDeployments can follow strategies like blue-green deployments or canary
releases for minimizing downtime and risk.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 65


Deployment Automation workflow(Cont’t)
oTesting
oAutomated testing is a crucial part of the deployment process.
oUnit tests, integration tests, and acceptance tests are executed as part of the CI/CD
pipeline to ensure the stability of the application.
oTesting environments should mirror production as closely as possible.
oMonitoring
oMonitoring tools (e.g., Prometheus, Grafana) are set up to track the application's
performance, availability, and errors.
oAlerts are configured to notify teams of any anomalies or issues.
oContinuous monitoring provides real-time insights into the application's health.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 66


Deployment Automation workflow(Cont’t)
oRollback Mechanism
oA rollback mechanism is in place to revert to the previous version in case of
deployment issues.
oAutomated or manual rollback procedures should be well-defined and tested.
oEnvironment Configuration Management
oAutomated tools manage environment configurations to ensure consistency
across different stages of the deployment pipeline.
oInfrastructure configurations are versioned and tracked to prevent
configuration drift.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 67


Deployment Automation workflow(Cont’t)
oSecurity Scanning
oAutomated security scanning tools (e.g., SonarQube, OWASP ZAP) are
integrated into the pipeline to identify and address security vulnerabilities.
oSecurity scans are performed at different stages of the deployment process.
oDocumentation
oMaintain up-to-date documentation for the deployment process,
configurations, and infrastructure.
oDocumentation aids in troubleshooting, knowledge transfer, and compliance.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 68


Deployment Automation workflow(Cont’t)
oCollaboration and Feedback
oFoster collaboration between development, operations, and other
stakeholders.
oEstablish feedback loops to gather insights from each deployment cycle for
continuous improvement.
oUser Acceptance Testing (UAT)
oInclude user acceptance testing in the workflow to ensure that the deployed
changes meet end-user expectations.
oUAT is often conducted in an environment that closely resembles the
production environment.

Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 69


Thursday, March 14, 2024 DEVOPS PREPARED BY ANASTASE MUVANDIMWE 70

You might also like