Join us
@priyanshuchhazed ・ May 25,2022 ・ 10 min read ・ 1297 views
This article focuses on laying down the thought process behind how you should go about answering the above questions so that you can quickly start building your first delivery pipeline.
You want to set up your first automatic deployment pipeline that builds, tests, and deploys code changes to your target cloud environment. You’ve spent days reading docs and blogs to figure out what your automatic deployment pipeline should comprise. But it all seems really overwhelming. They mention various tools like AWS, Azure, GitHub Actions, Ansible, Jenkins, CircleCI, Terraform, and Kubernetes — the list is endless. And you’re not sure which one is necessary for your initial automatic deployment pipeline.
This article focuses on laying down the thought process behind how you should go about answering the above questions so that you can quickly start building your first delivery pipeline.
Assumptions
The post recommends the thought process for building your first CI/CD pipeline assuming the following:
A quick recap of CI/CD definitions
Continuous integration is the process of merging changes to the main branch as often as possible. These changes are then validated by creating a build and running automated tests against the build.
Continuous delivery is an extension of continuous integration since it automatically deploys all code changes to testing and/or production environments after the build stage. This means that while your build and testing are automated, the deployment trigger (say a button-click) is manual. But once the deployment is started, there is no need for manual intervention.
Continuous deployment is like continuous delivery, except that the trigger to deployment is also automated.
So,
The rest of the post uses CD to refer to both continuous delivery and continuous deployment. Your thought process and the choice of tools to set them up will be the same.
What should an initial CD pipeline automate?
The guiding principle while deciding what your initial pipeline (also called a minimum viable pipeline) should be is to solve current problems and leave the theoretical problems for the future. Take small steps, and don’t try to build a fully mature pipeline at the start.
While what your small steps should be is a function of your application use-cases, listed below are the most necessary steps — divided into two stages.
The prerequisite for building any CI/CD pipeline is that developers regularly commit their code to a central repository. For feature branches that remain unmerged to the main branch for a long time, developers should keep it up to date by merging upstream as often as possible.
Note: Your initial pipeline need not implement continuous deployment.
What should an initial CD pipeline NOT do?
Since implementing every step of the pipeline costs time, it is worthwhile to do a cost-benefit analysis of every step that you want to automate beyond the ones mentioned in the previous section. In our experience, in the beginning, most applications don’t need a fully automated CD workflow for the following:
Note: While determining the responsibilities of your minimum viable CD pipeline, recognize that you may need to add one or more steps depending on your application’s use case. For example, a payment processing application might be more sensitive to a bad deployment than an employee-leaves management software. In such a case, the minimum viable CD pipeline for the former should have a step to quickly roll back a bad deployment, while the latter can skip it at first.
What are the necessary components of a minimum viable CD pipeline?
Given our understanding of what an initial pipeline needs to do, let’s take a look at the necessary components to build such a pipeline.
Key criteria to choose the right tools for your initial pipeline
For every component of your initial CD pipeline, you have a plethora of tools to choose from. We recommend that you choose tools that have the following characteristics:
Recommended minimum viable pipelines
While building your first delivery pipeline, you have two categories to choose from.
Pipeline as code means that you configure the steps in your deployment pipeline — build, test and deploy, with code that you store in a repository, such as Git. It enables You to track and manage changes to these configurations in the same way as you manage your application code — using version control and pull requests.
We recommend that you choose one of the three options specified below.
Pros
Cons
Note: Solutions like AWS CodePipeline are also examples of pipelines as code, and are easy to set up. However, they aren’t customizable because integration with non-AWS tools/libraries is difficult. They also make you completely dependent on the specific cloud provider. When you are setting up your first pipeline it might be wiser to keep your options open about how you’d like to evolve your pipeline and then decide whether you’d like to be completely dependent on a specific cloud provider or not.
Release automation platforms remove the need to write code for creating pipelines. They provide a layer of abstraction over the pipeline as code. This abstraction further simplifies the creation and management of your pipeline.
Argonaut is one such tool. You can get your first CI/CD pipeline running in less than 5 minutes in your own cloud.
Automatically create CI/CD pipeline with Argonaut.
How you should go about evolving your pipeline
Once you’ve built an initial pipeline, keep track of what you still do manually, and how often. You can evolve your initial pipeline by automating the following:
To conclude
At the early stages of product development, when you’re racing against time to release product updates, you might be tempted to postpone automating your CI/CD pipeline. While shipping new features to your customer is the topmost priority, taking small steps toward building a continuous CI/CD pipeline will help you release features much faster and more reliably.
We’d love to hear about your number one obstacle in deploying your applications. Comment to let us know or chat with us on our Slack connect channel. We respond to everyone with our recommendations.
Argonaut provides mature pipelines for your app from day 1 with zero effort.
Join other developers and claim your FAUN account now!
Product Marketer, Argonaut
@priyanshuchhazedInfluence
Total Hits
Posts
Only registered users can post comments. Please, login or signup.