[go: up one dir, main page]

0% found this document useful (0 votes)
16 views60 pages

CICD

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 60

‫بسم هللا‬

‫الرحمن‬
‫الرحیم‬
CI - CD
Issues to be covered
• What is DevOps?
• What is Continuous Integrating?
• What is Continuous Delivery?
• What is Continuous Development?
• How to implement CICD?
What is DevOps?
• DevOps is a methodology in the software
development and IT industry, used as a set
of practices and tools. DevOps integrates
and automates the work of software
development(Dev) and IT operations(Ops)
as a means for improving and shortening
the Systems/Software Development Life
Cycle(SDLC).
Cont.
• DevOps is a comprehensive software
development approach that combines
development(Dev) and operations(Ops) to
automate and streamline the entire
software delivery lifecycle, enabling faster,
more reliable, and collaborative
development and deployment.
Cont.
• DevOps has 8 iterative stages:
1. Plan
2. Code
 Source code
 Version control
3. Build
 Development
 Automation
Cont.
3. Test
 Quality control
4. Release
 Continuous Integration
 Continuous Development/Continuous
Delivery
5. Deploy
 Infrastructure as code
 Provisioning
 Configuration management
Cont.
7. Operate
 Validation
 Containerization
8. Monitor
 Logging
 Visualization

• Where first four stages are parts of Dev and


the rest four stages are known as parts of Ops
What is CI-CD?
• CICD is one of DevOps stages(Release), and
is a software development practice that
automates building, testing, and
deployment of code changes, ensuring a
rapid and reliable software delivery pipeline.
• CICD is a method to frequently deliver apps
to customers by introducing automation
into the stages of software development.
Cont.
• Pipeline: A pipeline is a process that drives
software development through a path of
building, testing, and deploying code, as
known as CI/CD.
Cont.
What is CI?
• CI or Continuous Integration is the practice of
automating the integration of code changes from
multiple developers into a single codebase. It is a
software development practice where the
developers commit their work frequently into the
central code repository (Github or Stash). Then there
are automated tools that build the newly committed
code and do a code review, etc. as required upon
integration.
Cont.?
• The key goals of Continuous Integration are to
 find and address bugs quicker,
 make the process of integrating code across a
team of developers easier,
 improve software quality and
 reduce the time it takes to release new feature
updates.
• Some popular CI tools are Jenkins, TeamCity, and
Bamboo.
Why CI?
• There could be scenarios when developers in a team,
work in isolation for an extended period of time and
only merge their changes to the master branch once
their work was completed. This not only makes the
merging of code very difficult, prone to conflicts, and
time-consuming but also results in bugs
accumulating for a long time which are only
identified in later stages of development. These
factors make it harder to deliver updates to
customers quickly.
Cont.
• With Continuous Integration, developers
frequently commit to a shared common
repository using a version control system such
as Git. A continuous integration pipeline can
automatically run builds, store the artifacts,
run unit tests and even conduct code reviews
using tools like Sonar. We can configure the CI
pipeline to be triggered every time there is a
commit/merge in the codebase.
How CI works?
• Once the developer commits their code to a
version control system like Git, it triggers the
CI pipeline which fetches the changes and
runs automated build and unit tests. Based
on the status of the step, the server then
notifies the concerned developer whether
the integration of the new code to the
existing code base was a success or a failure.
Cont.
• This
 helps in finding and addressing the bugs much
quickly,
 makes the team more productive by freeing the
developers from manual tasks, and
 helps teams deliver updates to their customers
more frequently.
It has been found that integrating the entire
development cycle can reduce the developer’s
time involved by ~25 – 30%.
Cont.
What is CD(C. Delivery)?
• CD or Continuous Delivery is carried out after
Continuous Integration to make sure that we can
release new changes to our customers quickly in an
error-free way. This includes running integration and
regression tests in the staging area (similar to the
production environment) so that the final release is
not broken in production. It ensures to automate the
release process so that we have a release-ready
product at all times and we can deploy our
application at any point in time.
Cont.
• Continuous Delivery automates the
entire software release process. The
final decision to deploy to a live
production environment can be
triggered by the developer/project lead
as required. Some popular CD tools are
AWS CodeDeploy, Jenkins, and GitLab.
Why CD(C. Delivery)?
• Continuous delivery helps developers
test their code in a production-similar
environment, hence preventing any last
moment or post-production surprises.
These tests may include UI testing, load
testing, integration testing, etc. It helps
developers discover and resolve bugs
preemptively.
Cont.
• By automating the software release process,
CD contributes to low-risk releases, lower
costs, better software quality, improved
productivity levels, and most importantly, it
helps us deliver updates to customers faster
and more frequently. If Continuous Delivery is
implemented properly, we will always have a
deployment-ready code that has passed
through a standardized test process.
What is CD(C. Development)?
• Continuous development is the same
concept as Continuous Delivery; but
there is a subtle difference, and that is
the final decision of deploying the
product in Continuous development is
automated and there is no need for the
developer/stakeholders to confirm or
trigger.
How CI and CD work together?
• We have seen how Continuous Integration
automates the process of building, testing, and
packaging the source code as soon as it is
committed to the code repository by the
developers. Once the CI step is completed, the
code is deployed to the staging environment
where it undergoes further automated testing (like
Acceptance testing, Regression testing, etc.).
Finally, it is deployed to the production
environment for the final release of the product.
Why is CICD important?
• CI/ CD enables organizations to develop
software quickly and efficiently. CI/CD
enables an effective process for getting
products and software to market faster
than ever before, continuously moving
code into production, and ensuring a
steady flow of new features.
What are benefits of CICD?
• Automated testing enables continuous delivery
that ensures software quality and safety and
increases code profitability in production. CI/ CD
pipelines enable a much shorter time-to-market
for new product features, resulting in happier
customers and reducing the burden on
development.
• The significant increase in overall delivery speed
enabled by CI/CD pipelines improves a company’s
competitive advantage.
Cont.
• Automation allows team members to focus
on what they do best, resulting in the best
end products. Companies with a successful
CI/CD pipeline can attract outstanding talent.
• By moving away from traditional waterfall
methods, engineers and developers are no
longer engaged in repetitive activities that are
often highly dependent on completing other
tasks.
How to implement CICD?
• Here, we use Jenkins for implementing
CI/CD. So we need to follow some steps:
1. Downloading Jenkins.msi from
https://www.Jenkins.io.
2. Installing Jenkins
– Note: we should have a JDK
installed.
• It is better to
install Jenkins
where JDK is
installed.
• Assign a port
and test if it is
available and
working.
• Some less
important
steps are
ignored in
pictures.
How to implement CICD?
3. Using/running Jenkins:
– Open Google Chrome and write
“Localhost:Jenkins’_port .
How to implement CICD?
• Here, we go to Jenkins’ installation
directory and open “jenkins.err.log”. A
password like
“eda9f56292a6439b92fce8d6e317465f”
is written there; we copy it and paste it
at Jenkins.
How to implement CICD?
• … Jenkins as one of the tools we can use for
CI/CD has a vast area to study and practice;;
just imagine how other areas can CI/CD cover..
That is why we prefer not to continue more.
• A comprehensive practical information about
CI/CD & Jenkins is available here: “
https://youtu.be/M5nOIklD7SA?si=EnyjHy2ok7
SRZ9b1
”.
Resources
• Geeksforgeeks.com
• Synopsys.com
• RedHat.com
• Boby_Cloud/CICD
• https://youtu.be/M5nOIklD7SA?si=EnyjHy2ok7SRZ9b
1
Group members

• Khan M. Hasani
• Nasrullah Yousufi
• M. Zahir Akbari
Thank You

You might also like