What is CI/CD? — A 30,000 foot view

“You cannot endow even the best machine with initiative” — Walter Lippmann.

What is CI/CD? — A 30,000 foot view

“You cannot endow even the best machine with initiative” — Walter Lippmann.

CI/CD is an acronym for continuous integration and continuous delivery/deployment). There are many definitions for what it means, but below is a definition i particularly like and think covers the basics of the concept of CI/CD.

CI/CD is the practice of automating your software release process from the point of development all the way to deployment or at-least to the point at which you have a deployable artifact that can then be released to an environment of choice.

CI/CD Overview

An overview of the CI/CD process

As seen above, this encompasses everything that happens from when software is pushed to a source code repository, triggering an automated build of necessary artifacts, tests, security checks, and validations, and finally promotion of these artifacts to the respective environments based on the success of previous steps. This environment can be a pre-production/production environment which serves as the final destination for the software change.

Benefits

There are many benefits of implementing CI/CD but a few that stand out include:

  • Faster Releases: With the automation of your software release process, your teams can integrate new changes quickly and release features much faster.
  • Reduced Risk: Being able to test new changes with users early and often vastly reduces the cost and effort required to release new features and the likelihood of unwanted changes making its way to production. Developers can review code in small atomic units thus leading to safer code integration.

How to Implement CI/CD?

There are two main ways in which CI/CD is implemented today.

  1. Traditional
  2. Managed

Traditional CI/CD

Traditional ci/cd
Traditional CI/CD
  • Privately Managed Infrastructure: In traditional CI/CD, your team is completely responsible for the setup and management of the CI/CD infrastructure and applications. This means having an operations staff/developer responsible for managing the CI/CD server, software and security updates. A downside to managing your own infrastructure could be the heightened cost, time and effort involved.
  • Scaling: Scaling up means provisioning more nodes/VMs, increased cost and effort of management. VMs need to be running at all time to monitor changes in code repositories.
  • Security: In a privately managed environment, there are much more security concerns since your CI/CD server many a times will have direct access to your production/pre production environments. It becomes a critical component of your setup. Thus, access controls need to be setup to control who has access to connect, modify or remove content from the CI/CD server.

Managed CI/CD

Managed CI/CD
Managed CI/CD
  • Zero Infrastructure Management: Managed CI/CD completely encapsulates and abstracts the infrastructure management component of running CI/CD. The third party cloud provider is responsible for the maintenance, upgrade, security and uptime of the CI/CD solution. This can free up more productive hours for your team to focus on actual product development.
  • Pay-Per-Use-Basis: Most managed CI/CD platforms operate on a pay per use basis where you only get charged for the services/resources you consume while running your CI/CD workflow. Depending on your use case, this can drastically reduce your cost commitment.
  • Scaling: Since the infrastructure is externally managed, scaling usually just involves requesting additional resources which is usually available instantly in the cloud. Concurrency is also mostly supported out of the box leading to faster build and deploy times.
  • Micro-service friendly: Pre-built tooling and support for easy testing and deployment of micro-service applications.

Some of the most popular managed CI/CD solutions include CircleCI, TravisCI, Google Cloudbuild and Spinnaker

Which one should you go for?

Deciding whether to build and manage your own CI/CD infrastructure or use a managed platform can be a debate. Below, i highlight four key points i think you should consider in making your decisions to go with either one or the other.

The four main points to consider in choosing a CI/CD solution
  • Team Size: As we have identified earlier, a traditional CI/CD setup requires an enormous amount of management overhead. This can become a pain if you have a really small team since you want to spend time building and improving your product rather than managing infrastructure. Thus, if you have a smaller team with less resources to spare, a managed solution may be more soothing.
  • Expense: Think of expense as the entire cost, effort and time involved in managing your CI/CD setup. This immediately heightens if you are considering or running a traditional CI/CD setup. Managed solutions on the other hand may sometimes feel as expensive, however this definitely falls short in comparison to the entire cost of maintaining a privately maintained CI/CD infrastructure.
  • Integrations: If your CI/CD workflow requires third party integrations, then a managed solution may be the way to go since most managed CI/CD platforms already have these integrations setup and you mostly just need to use the services/tooling available.
  • Security: In a traditional CI/CD setup, your team is wholly responsible for the management of all security concerns, as opposed to a managed solution, where you are practically trusting your third party CI/CD provider to handle security on your behalf. Many a times, these third parties will definitely do a better job at it. However, in a situation where your organization has limited network/security constraints that hinder you from using a managed service, then your team may be left with no other option than implementing this itself.

CI/CD Adoption

A recent study showed that only about 40% of users already use CI/CD. This number may be reflective of the greater percentage of organizations that are exposed to and are taking actions to benefit from the automation of their software release process. While adoption is great and continually improving, if you are a single man team supporting/maintaining a personal project/application, it may or may not be worth the effort at the start. Whichever the case, consider the four key points highlighted earlier in deciding whether you should proceed with a CI/CD implementation or not.

Thank you for making it all the way to the end of the post. I hope you have gained some clarity on what CI/CD is in general and how to ensure your automation efforts further improves efficiency for your team in the long run.

Till next time … stay automating!