<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>devops on Ole Gensch</title>
    <link>/tags/devops/</link>
    <description>Recent content in devops on Ole Gensch</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 04 Apr 2021 11:42:20 +0200</lastBuildDate><atom:link href="/tags/devops/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>What Is CI/CD/CD</title>
      <link>/posts/what-is-ci-cd-cd/</link>
      <pubDate>Sun, 04 Apr 2021 11:42:20 +0200</pubDate>
      
      <guid>/posts/what-is-ci-cd-cd/</guid>
      <description>CI/CD/CD, sometimes shortened to CI/CD, is maybe one of the most common terms in the current software development community. Nearly every company, no matter how big, uses it. As a software engineer it’s thus close to impossible to avoid this term. But what exactly does this term stand for?
 TL;DR: CI/CD/CD (Continuous Integration, Delivery and Deployment) is a set of practices and processes that aim to enforce a fast and reliable development process.</description>
      <content>&lt;p&gt;CI/CD/CD, sometimes shortened to CI/CD, is maybe one of the most common terms in the current software development community.
Nearly every company, no matter how big, uses it. As a software engineer it’s thus close to impossible to avoid this term.
But what exactly does this term stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; CI/CD/CD (Continuous Integration, Delivery and Deployment) is a set of practices and processes that aim to enforce a fast and reliable development process. This is achieved by automating as many steps as possible with predefined standards.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;ci-cd-and-cd-again&#34;&gt;CI, CD and…. CD, again?&lt;/h2&gt;
&lt;p&gt;First of all, CI/CD/CD is not one term, but the abbreviation of three separate terms. Namely: Continuous Integration, Continuous Delivery and Continuous Deployment.&lt;/p&gt;
&lt;p&gt;The concept of CI/CD/CD slowly evolved as a response to some of the problems that hinder the software development.
Especially in bigger teams problems like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Merging hell or the odd moment when multiple people working on one project, decide to merge their changes… And surprisingly afterwards it neither works nor has the number of bugs gone down.&lt;/li&gt;
&lt;li&gt;Over complicated release schedules, that nearly always are impossible to stick to.&lt;/li&gt;
&lt;li&gt;Varying quality of code&lt;/li&gt;
&lt;li&gt;Ever changing requirements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;tend to show up fairly quickly and often.&lt;/p&gt;
&lt;p&gt;CI/CD/CD is a set of processes that aim to solve these problems, so that the overall process is smoother and more consistent.
The three combinations stand therefore for the concept of achieving a &lt;strong&gt;fast&lt;/strong&gt;, &lt;strong&gt;reliable&lt;/strong&gt; and &lt;strong&gt;continuous&lt;/strong&gt; software development process.&lt;/p&gt;
&lt;p&gt;For this the entire process from coding to operating the product in a production environment is split into multiple stages.
The goal is to then optimize these stages, by automating as many &lt;strong&gt;mundane&lt;/strong&gt; and &lt;strong&gt;error-prone&lt;/strong&gt; steps as possible.
Acting as a guideline for the developers, each of the three terms from CI/CD/CD covers a set of stages.
Each of these stages consists of a clear goal and best practices.&lt;/p&gt;
&lt;p&gt;So, let’s take a look at these stages and their respective processes.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/img/ci-cd-cd.png&#34; alt=&#34;CI/CD/CD stages split up into their respective parts&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;continuous-integration&#34;&gt;Continuous Integration&lt;/h2&gt;
&lt;p&gt;This is the foundation of the entire CI/CD/CD process suite. It precedes the following CD/CD processes and is nearly essential to them.
And even through it would be possible to not implement it, I personally have never seen a company implement any part of the CD/CD processes, without implementing continuous integration in some way.&lt;/p&gt;
&lt;p&gt;Continuous Integration itself is a set of processes, which aim to help developers maintain a &lt;strong&gt;stable&lt;/strong&gt;, &lt;strong&gt;tested&lt;/strong&gt;, &lt;strong&gt;high quality&lt;/strong&gt; code base, without investing huge amounts of time.
For this every code change runs sequentially through a predefined “pipeline” of automatized steps, where only posts that successfully pass through all the stages, end up in the final code base.&lt;/p&gt;
&lt;h3 id=&#34;build&#34;&gt;Build&lt;/h3&gt;
&lt;p&gt;Starting directly after the developer pushes his/her code changes, the &lt;strong&gt;build&lt;/strong&gt; stage is triggered. Here the written code gets built into it’s executable/usable form via it’s compilers and build tools, like &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; or &lt;a href=&#34;http://gradle.org/&#34;&gt;Gradle&lt;/a&gt; (for Java programs).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal / Success Condition&lt;/strong&gt;: Successfully compiling/building the program without running into any fatal errors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Additional Goals&lt;/strong&gt;: Achieving certain key metrics like a maximum size or time to compile.&lt;/p&gt;
&lt;h3 id=&#34;test&#34;&gt;Test&lt;/h3&gt;
&lt;p&gt;After a code change is successfully build, the next logical step is to test the finished product on a multitude of levels.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Unit tests&lt;/strong&gt;: This most basic level tests the individual functions and parts of the program.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration tests&lt;/strong&gt;: These tests check the integration of the program in it’s part of a bigger system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;System tests&lt;/strong&gt;: The automated system runs a test over the entire program system, to check for any unexpected side effects.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each company handles the implementation of the varying levels differently. Some skip some tests, while others test each single level as thoroughly as possible.&lt;/p&gt;
&lt;p&gt;Even through there exists no general best implementation strategy, a general consensus is to at least cover most of the code with unit tests.
Whilst integration tests are normally at least run on a scheduled basis.&lt;/p&gt;
&lt;p&gt;Another common practice is to include the code quality checks within the test stage.
For this tools like &lt;a href=&#34;http://sonarqube.org/&#34;&gt;SonarQube&lt;/a&gt; run static code analysis, checking for any violation of common practices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal / Success Condition&lt;/strong&gt;: Pass a certain percentage (optimally 100%) of the tests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Additional Goals&lt;/strong&gt;: Pass through static code analysis tools without any major violation.&lt;/p&gt;
&lt;h3 id=&#34;merge&#34;&gt;Merge&lt;/h3&gt;
&lt;p&gt;As the simplest of the three continuous integration stages it’s only responsibility lies in applying the build and tested code changes to the current code base.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal / Success Condition&lt;/strong&gt;: Apply code changes to the code base&lt;/p&gt;
&lt;h2 id=&#34;continuous-delivery&#34;&gt;Continuous Delivery&lt;/h2&gt;
&lt;p&gt;After running through the three stages of continuous integration the code changes are part of the existing code base. Depending on the size of the features that are in development, multiple code changes can accumulate, before a software release is planned.&lt;/p&gt;
&lt;p&gt;As the releasing is no longer part of the continuous integration process, it was a manual process.
Through the change in development methods and the shift from strictly planned waterfall models towards agile, iterative software development the manual release of accumulated code changes became a blocker for these fast agile methods.&lt;/p&gt;
&lt;p&gt;As a solution to this problem, the already existing continuous integration process was extended by the new continuous delivery practices, resulting in the term CI/CD.
This extends the set of automated stages by the stage Release.&lt;/p&gt;
&lt;h3 id=&#34;release&#34;&gt;Release&lt;/h3&gt;
&lt;p&gt;In the release stage the current code base is build into it’s usable form.
Afterwards the system packages the results into a deliverable format, making it possible to deliver it to the customer at a moments notice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal / Success Condition&lt;/strong&gt;: Successfully building and packaging the product and saving it in some kind of repository.&lt;/p&gt;
&lt;h2 id=&#34;continuous-deployment&#34;&gt;Continuous Deployment&lt;/h2&gt;
&lt;p&gt;Whilst the goal of continuous delivery is to prepare a deliverable product, this still requires an actual person to go and set up the finished product.&lt;/p&gt;
&lt;p&gt;Here continuous deployment, as the last part of the CI/CD/CD process, extends this process once more.
It’s goal is to automatize the entire process from release to the deployment of the software for the client.&lt;/p&gt;
&lt;h3 id=&#34;deploy&#34;&gt;Deploy&lt;/h3&gt;
&lt;p&gt;This final stage of our CI/CD/CD process is the deploy stage. Within this stage our automation system takes the already released code and bundles it up. It then continues by pushing it into a production environment and installing it there.&lt;/p&gt;
&lt;p&gt;A normal process for this is to either connect to the server directly via SSH or to use some external tool for the deployments like &lt;a href=&#34;https://octopus.com/&#34;&gt;Octopus Deploy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Goal / Success Condition&lt;/strong&gt;: Having an up and running updated version of the application, which is accessible for the customers.&lt;/p&gt;
&lt;p&gt;Wrapping it all up
I hope this posts helps you understand the general principals behind the term CI/CD/CD and what each part of it is responsible for.&lt;/p&gt;
&lt;p&gt;In the end it all boils down to the automation of mundane, manual steps to ensure a consistent, effective and fast working process for developers.&lt;/p&gt;
</content>
    </item>
    
  </channel>
</rss>
