Introduction to DevOps & CI / CD

Jumanah Al Asadi
4 min readJul 12, 2021

--

Continuous Integration, Continuous Delivery / Deployment, DevOps & pipeline

Meet the old school software team :-(

They seem to prefer to take things slow, they have different teams dedicated to different things. Developers only code, an IT / Operations team handles the rest, and they pass things to each other manually with a set of instructions.

The team works in iterations ranging anywhere from weeks to months. Within each iteration, the team develops, compiles, and packages their code. Afterwards, when the code is deployed and integrated, it gets tested by QA. If any bugs are reported, they are sent back and the development team works on them again.

Problems with the old school Software Development team

  • This process has a long feedback cycle. We can only detect issues at the end of the iteration.
  • Integration is time-consuming and difficult since bigger merge conflicts will occur.

Meet the modern software team! :-)

They follow a DevOps model:

  • A new way of thinking, a new culture
  • Educating the team to use automation tools
  • Removing human, manual processes
  • Under a DevOps model, development and operations teams are no longer “siloed.
  • Increase speed to deliver and deploy application

They still work in iterations. But this time, all the developers integrate and deploy their code in a shared development environment several times a day. This way, the merging of code and testing can take place often, and at any time, not just at the end of the iteration.

This is known as Continuous Integration, CI.

Continuous Integration (CI)

Continuous Integration is a development practice that requires developers to integrate code into a shared repository several times a day. Developers are responsible for integrating their code with the shared code. They make sure their code works well with the rest of the code early on.

To accomplish continuous integration:

  1. We create a development environment/server where developers can build their code often
  2. The build process should be automatically triggered when any developer pushes any commit
  3. After each build, the results will be posted for developers to check for any compilation errors or test errors. The build should be quick so that developers fix things quickly
  4. After each build, the packaged code gets tested using unit tests and snapshot tests. Running the tests should happen after the build.
  5. Once the build compiles and these tests pass, then success is returned to the developer. If the build fails, then the developers should fix it right away.

Benefits of Continuous Integration (CI)

  • Short feedback cycle to see issues with the code
  • Integration is automated and quick

Continuous Integration (CI) — Build Pipeline

This all sounds like a pipeline. Yes, it actually is. Continuous Integration, or what we discussed just above is part of the build pipeline.

  • A commit gets pushed into a repo
  • Code is compiled
  • Code is packaged
  • Code is tested using automated unit tests
  • Code is deployed
  • Build results are sent back to the developer

All steps in the pipeline should run on a dedicated build server, and there should be no human intervention. It should be completely automated.

Alright, this all sounds helpful as we are developing our code. What about when we are finally ready to release our code and deploy it on the production environment? GO LIVE!!!

The old school way is to pass the package of code + instructions to another team which would read the instructions, prepare the environment and test and deploy the code.. this was all done manually!

Problems with this approach

  • All steps are manual and are error-prone
  • Different instructions for different environments
  • Lots of down-time

Meet the new style. Almost everything is automated using scripts. The build is always in a state that is ready to be released to production. The human only needs to say when! This is known as Continuous Delivery, CD

Continuous Delivery (CD)

Continuous delivery is a software development practice where software can be released to production at any time. This is because the build is always ready, because of continuous integration.

To accomplish continuous delivery:

  • Must have continuous integration
  • Automated scripts prepare for each environment
  • Deployments are automated, easily repeatable and less down-time

This all sounds like a pipeline. Yes, it actually is. Continuous Delivery, or what we discussed just above is part of the delivery pipeline.

Benefits of Continuous Delivery (CD)

  • Prevents human error when setting up each environment
  • Deployments are automated and quick, less down time

Continuous Deployment (CD)

In continuous delivery, we have the option to release at any time because we remain in a ready state. But only big companies need to have continuous deployment. This is when in fact, the software is automatically released to production continuously. This could be risky!

That’s it for now. :)

Summary:

  • continuous integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day.
  • continuous delivery (CD) is a software development practice where software is ready to be released to production at any time
  • continuous deployment(CD) is when software is automatically released to production continuously
  • pipeline: The CI/CD pipeline combines continuous integration, delivery and deployment into four major phases: source, build, test and deploy. Each phase uses highly detailed processes, standards, tools, and automation.
  • devops: a new way of doing things, a new culture of automation, and delivering things quickly

--

--

Jumanah Al Asadi
Jumanah Al Asadi

Written by Jumanah Al Asadi

I am just a web developer who loves writing, teaching and music :) My teaching style is playful and fun. At least I hope, lol :p

No responses yet