Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MiguelNdeCarvalho/f348eb84ddde78ff15002569a7f6d380 to your computer and use it in GitHub Desktop.
Save MiguelNdeCarvalho/f348eb84ddde78ff15002569a7f6d380 to your computer and use it in GitHub Desktop.
Document
# Choosing the best CD
## Current Problem
- When there is a new release the **Pipeline** will start, depending the case it can be performed by:
- **Jenkins**
- **Drone CI**
- **GitHub Actions**
- The **pipeline** is formed by 4 different stages:
- Build the application;
- Run automatic tests (in some cases the tests are run manually);
- Build **docker** image containing the application built in the first stage;
- Push the image to the respective **registry** (GCR, ECR or Docker HUB).
- That **docker** image is _tagged_ with the version and the _hash_ of the last commit made in this version.
- After the **pipeline successfully run** we need to upgrade the **images** running on our **K8s cluster** and this process is currently being made manually.
- We need to automate the process of upgrade the images after they get pushed to the **registry**
## Solution
The best solution is to start using a **CD** .
### Using CD Tools
#### What is CD?
**CD** stands for **Continuous Delivery** and it is responsible to sync our **Kubernetes cluster** with the configuration in the **Git repository** and update the images running on our **cluster** in **staging** and **production** environments.
#### Currently available tools
There are many available **CD tools** like:
- [Flux](https://github.com/fluxcd/flux2)
- [ArgoCD](https://github.com/argoproj/argo-cd)
- [Jenkins X](https://jenkins-x.io/)
- [Spinnaker](https://spinnaker.io/)
- [Weave GitOPS Core](https://www.weave.works/product/gitops-core/)
- [RunX](https://www.runx.dev/)
- [Kubestack](https://www.kubestack.com/)
- [Humanitec](https://humanitec.com/)
- [Octopus](https://octopus.com/)
- [Slim.ai](https://www.slim.ai/)
- [Waypoint](https://www.waypointproject.io/)
#### Comparation between them
| Name | Type | Equivalent to | Comments | Classification (0-10) |
| :-------: | :--------------: | :-----------: | :-----------------------------------------------------------------------------: | :-------------------: |
| **FluxCD** | GitOPS oriented | - | There is a need to refactor all the current K8s code | 8 |
| **ArgoCD** | GitOPS oriented | FluxCD | There is a need to refactor all the current K8s code | 8 |
| **JenkinsX** | CI/CD+GitOPS | - | There is a need to refactor all the current Jenkins pipelines and configuration files and the current K8s code | 6 |
| **Spinnaker** | CD Only | - | Really hard to deploy and the local Demo doesn't work | 5 |
| **Weave GitOPS Core** | - | - | Very bad and confuse documentation | 0 |
| **RunX** | Infrastructure+CD | - | This tool provides us so much abstraction that we don't need (Infrastructure) | 0 |
| **Kubestack** | Infrastructure+CD | RunX | This tool provides us so much abstraction that we don't need (Infrastructure + CD) | 0 |
| **Humanitec** | CD Only | Spinnaker | Tool that permit us to do CD in K8s | 8 |
| **Octopus** | CD Only | Spinnaker | Tool that permit us to do CD in K8s | 9 |
| **Slim.ai** | Image analyzer | - | Image analyzer | 0 |
| **Waypoint** | CI/CD | Jenkins X | CI and CD tool focused for DEV and there is a need to refactor all the current CDs | 6 |
#### The chosen one
The chosen tool was **Octopus** because it offers:
- a community license that offers up to 5 targets (5 deployment targets)
- a simple and modular way to configure it
- a simple interface to manage the CD
- the possibility to use Terraform to configure it
- the option to self host or use the cloud version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment