Continuous integration and continuous delivery

 

DevOps, or Development Operations, is a practice combinging both Development and Systems Operations. It has a clear pipeline of "Develop, Build, Package, Test, Stage, Deploy". It involves five Continious aspects as well: Continiuous Integration, Continuous Delivery, Continious Testing, Continious Deployment, and Continuous Feedback

Continuous integration and continuous delivery are the core of DevOps. They embody a set of operating principles and practices that enable application development teams to deliver code changes more frequently and reliability. It allows collaboration and flexibility.

 

Tools of the CI/CD pipeline

 

There are several conponents of CI/CD pipeline.

 

1. Containers

 

2. Orchestraction

 

3. Cloud

 

4. Infrastructure Automation

 

5. Source Control

 

6. Continuous Monitoring

 

 

Continuous intergration

 

CI is a set of practices to implement small changes in check in code t version control repositories frequency. Most modern applications require developing code in different platforms and tools. The team needs a mechanism to integrate and validate its changes. It's a constant and automated way to build, package and test applications. This leads to better collaboration and software quality.

 

Implementing Continuous Interrogation is cheap, and not implementing it is expensive. If a company does not have a continuous approach, they will have longer periods between integration.

 

There are several benefits to CI:

    1.  

Long and tense integration do not exist.

    1.  

Increased visibility enabling rater communication

    1.  

Catch issues easily and nip hem in the bug

    1.  

Less time debugging and more time adding features

    1.  

Build a solid foundation

    1.  

Stop waiting to find out if your code will work.

    1.  

Reduce integration problems allowing you to deliver software more rapidly.

 

CI is backed by several important principles and practices.

 

Maintain a single source repository

Automate the build

Make your build self-testing

Every commit should build on an integration machine

Keep the build fast

Test in a clone of the production environment

Make it easy for anyone to get the latest executable version

Everyone can see what’s happening

Automate deployment

 

How to do it

    1.  

Developers check out code into their private workspaces

    1.  

When done, commit the changes to the repository

    1.  

The CI server monitors the repository and checks out changes when they occur

    1.  

The CI server builds the system and runs unit and integration tests

    1.  

The CI server releases deployable artifacts for testing

    1.  

The CI server assigns a build label to the version of the code it just built

    1.  

The CI server informs the team of the successful build

    1.  

If the build or tests fail, the CI server alerts the team

    1.  

The team fixes the issue at the earliest opportunity

    1.  

Continue to continually integrate and test throughout the project

 

 

Team responsibilities

 

    1.  

Check in frequently

    1.  

Don’t check in broken code

    1.  

Don’t check in untested code

    1.  

Don’t check in when the build is broken

    1.  

Don’t go home after checking in until the system builds

 

In short: CI is the practice of releasing every good build to users, by Jez Humble.

 

By adopting both continuous integration and continuous deployment, it will reduce risks and catch bugs quickly, but also move rapidly to working software.

 

CI is in short a practice where a team of developers integrate their code early and often to the main branch or code repository. The ultimate goal is to reduce the risk of seeing “integration hell” by waiting for the end of a project or a sprint to merge the work of all developers.

 

Continuous Delivery

 

CD automates the deliver of applications to selected infrastructure environments. They perform any necessary service calls to web servers, databases and other services that may need to be restarted or other procedures.

 

Both of them require continuous testing because the objective is to deliver quality application and code to users. This is done via a set of automated regression, performance, and other tests that are executed in the CI/CD pipeline.

 

A typical CD pipeline includes many of these steps:

 

• Pulling code from version control and executing a build.

• Executing any required infrastructure steps that are automated as code to stand up or tear down cloud infrastructure..

• Moving code to the target compute environment.

• Managing the environment variables and configuring them for the target environment.

• Pushing application components to their appropriate services, such as web servers, API services, and database services.

• Executing any steps required to restarts services or call service endpoints that are needed for new code pushes.

• Executing continuous tests and rollback environments if tests fail.

• Providing log data and alerts on the state of the delivery.

 

More sophisticated CD may have other steps including performing data synchronization, archiving information resources or performing some application and library patching.

 

The CI/CD pipelines are implemented on cloud environments, they use containers such as Docker an Kubernetes. Containers allow packaging and shipping applications in standard portable ways.