Articles

MySAMi > API > What is CI/CD?

SAMi

28 August 2022

Article:
Ainara Vergara

What is CI/CD?

DevOps

Overview

Continuous integration (CI) and continuous delivery (CD), also known as CI/CD, is a method to frequently deliver apps to customers by introducing automation into the stages of app development.

Precisely, CI/CD introduces ongoingautomation and continuousmonitoring throughout the lifecycle of apps, from integration and testing phases to delivery and deployment.

 

Concepts of CI/CD

The main concepts attributed to CI/CD are

  • Continuous integration,
  • Continuous delivery, and
  • Continuous deployment.

CI/CD, embodies a culture, solution to the problems, operatingprinciples, and a set of best practices that application development teams and operations teams use to deliver code changes or integrating new code more frequently and reliably. While ensuring meeting businessrequirements,code quality and softwaresecurity.

It is also a best practice in agile methodology. Taken together, these connected practices are often referred to as a “CI/CD pipeline” and are supported by development and operations teams working together in an agile way with either a DevOps or site reliability engineering (SRE) approach.By automating integration and delivery and is a solution to the problems integrating new code which can cause for integration hell.

 

What’s the difference between CI and CD?

The CD in CI/CD can be separated into one more category depending the needs and requirements of the development. “CD” in CI/CD refers to continuous delivery and/or continuous deployment, which are related concepts that sometimes get used interchangeably. The “CI” in CI/CD always refers to continuous integration, which is an automation process for developers.Continuous delivery and/or continuous deployment both are about automating further stages of the pipeline, but they’re sometimes used separately to illustrate just how much automation is happening.

The “CI” in CI/CD means new code variationsto an app are consistentlybuilt, tested, and merged to a shared repository. It’s a resolutionto the problem of having too many divisionsof an app in development at once that couldconflict with each other.

The “CD” in CI/CD,Continuous delivery typicallymeans a DevOpsteams changes to an application are automatically bug tested and uploaded to a repository (like GitHub or a container registry), where they can then be installed / deployed to a live production environment by the operations team. This is the solution to the problem of poor visibility and communication between DevOps and System analyst or business teams.The main and primary purpose of continuous delivery is to make sure that it takes minimal effort to deploy new code or version controlling.

The other “CD” in CI/CD,Continuous deployment (the further possibilityof “CD”) is refers to systematically and automating releasing of a developer’s changes /modifications from GitHub or a container registry / repository to production, which can be deliver to customers for their usage. It handles / overcome the problem of overburdening DevOpsteams with manual proceduresthat delays/ interrupts app delivery. It delivers the benefits builds on continuous delivery by automating the continuous deployment in the pipeline.

 

 

It is feasible for CI/CD to define only the connected practices of continuous integration and continuous delivery. However, it can also mean complete 3 connected practices of continuous integration, continuous delivery and continuous deployment. Also, to make it more intricate, sometimes “continuous delivery” is also used as to encompass the processes of continuous deployment.

However, it is still not worthy of your time to be broiled in these semantics. One thing to remember is that CI/CD is a process which is often visualized as a pipeline. This involves the addition of high degree of the underway automation and the constant monitoring of the app development.

Base on scenario and requirements, the term CI/CD refers to which depends on how much the automation is built in the CI/CD pipeline. Almost every enterprise start by the addition of CI. After that they work towards the automation delivery and deployment. For instance as part of the cloud native apps.

With the help of our experts, your organization can develop the practices, tools and culture needed for the more efficient modernization of existing applications. This can also help building new applications for your organization.

 

Continuous integration

The approach in modern application development and the goal is to have numerousdevelopers working simultaneously as a team on different features and phases of the same app. However, when an organization is ready to merge all branching source codes (features, updates, modifications or even new phases)compiling together on one day (“merge day /release day”), the consequentialwork can bemind-numbing, manual, and time-consuming. Whereas if the DevOps teams works in Continuous integration (Github etc.) this problem will not occur. The problem will happenwhen a developer working in isolation and it makes a change to an application which is not based on module, there’s a chance it will conflict with changes being concurrentlymade by other developers. Furthermore this problem would be morecompounded if each developer has their own local integrated development environment (IDE), rather than the team agreeing on one cloud-based IDE.

Continuous integration (CI) helps developers merge their code changes/ updates back to a shared branch, or “trunk,” regularly sometimes even daily. To ensure the changes haven’t broken the app,once a developer’s make modification in to an application which is then merged, those changes are authenticatedby the application automatically and can be run different levels of automated testing, usuallyunit and integration tests which includes testing everything from classes and function to the different modules that comprise the entire app. When this automated testing discovers a conflict / bug between new and existing code, CI makes it easier to resolve those bugs quickly.

 

Continuous deployment

The last stage of an applicable CI/CD pipeline is continuous deployment. As a further extension of continuous delivery, continuous deployment automates to the release of an app to production. Continuous deployment relies mostly on a well-designed test automation. This is because there is no manual gate at the stage of pipeline before the production.

Practically, continuous deployment is that the developer’s changing can go live in few minutes of writing (assumed that it passed automation testing). Also, this makes it much easier to consistently receive and assimilate user feedback. Altogether, all of these connected CI/CD practices are helpful in making the deployment of the application less hazardous. Correspondingly, it is also easier to release changes in the apps in smaller pieces, rather than all at once. Though there’s a lot of upfront investment. This is because automated tests will need to be written to assist a variety of testing and release stages in the CI/CD pipeline.

 

What are some common CI/CD tools?

CI/CD tools are really helpful in the automation, deployment and testing of apps. Some tools handle the integration (CI) side specifically, some control development and deployment (CD) while others are specialized tools in continuous testing or related functions.

There are many tools for CI/CD one of the best open source tool for CI/CD is the automation server Jenkins.

  • Jenkins is designed to handle anything from a simple CI server to a complete CD hub.
  • Tekton Pipelines is a CI/CD framework for Kubernetes platforms that provides a standard cloud-native CI/CD experience with containers.

Beyond Jenkins and Tekton Pipelines, other open source CI/CD are:

  • Spinnaker, a CD platform built for multi-cloud environments.
  • GoCD, a CI/CD server with an emphasis on modeling and visualization.
  • Concourse, “an open-source continuous thing-doer.”
  • Screwdriver, a build platform designed for CD.

If your teams also wants managed CI/CD tools that are available from a variety of vendors like:

  • GitLab
  • CircleCI
  • Travis CI
  • Atlassian Bamboo and many others.

Furthermore, there are many tools which are shown in CI/CD workflows that’s foundational to DevOps is likely to be part of a CI/CD process.

  • Ansible
  • Chef
  • Puppet
  • Container runtimes
    • Docker
    • rkt
    • cri-o
  • Container Orchestration
    • Kubernetes

 

Automating the CI/CD pipeline

CI/CD tools assist in storing the environment-specific parameters that should be packaged with each delivery. After that CI/CD automation makes any obligatory service calls to database, web servers and other servers which may need restarting. It may also execute other procedure following deployment. CI/CD also requires continuous testing. This is due to the objective of delivering quality code and applications. During continuous testing, a set of automated regression, performance and other tests are implemented in the CI/CD pipeline.

A professional Developer and operator team with a robust CI/CD pipeline can also execute continuous deployment. This is where the changes in application run through the CI/CD pipeline and passing builds are deployed directly to the production environment. Though some continuous deployment is not optimal for every business application, some teams practicing continuous deployment elect to deploy hourly or even daily to the production.

 

 

CI/CD pipeline often have several devOps best practices in place

  • Micro-services development,
  • Server-less architecture,
  • continuous testing,
  • infrastructure as code,
  • Deployment containers.

 

How continuous integration improves collaboration and code quality

The philosophy in Continuous integration is supported by process mechanism and automation.

The ethics followed by the DevOp teams while practicing continuous integration:

  • Developers commit their code

In the version control repository (Github etc.) teams have a standard of committing code daily.

  • To identify defects and other software quality issues
  • Shorter commit cycles, is less likely that multiple developers will edit the same code and require a merge when committing.

All in all, development teams practicing continuous integration use different techniques to control which features and codes are ready for production.

 

Articles Category

Request A Demo