Skip to content

Commit

Permalink
added: 6.8 Continuous Deployment - GitOps and Argo CD Essentials
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
  • Loading branch information
aabouzaid committed Nov 2, 2024
1 parent d34d78e commit eab3f8b
Show file tree
Hide file tree
Showing 4 changed files with 392 additions and 2 deletions.
25 changes: 25 additions & 0 deletions docs/content/module-06/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,35 @@ Multi-environment setup is not a trivial topic, but like anything else, doing it

## 6.8 Continuous Deployment - GitOps and Argo CD Essentials

<p align="center">
<img alt="Skill Set Shapes" border="0" width="90%" src="/img/reconciliation-loop.png"/>
</p>

### What you need to know {#68-what-you-need-to-know}

- As the popularity of CI/CD grew and became an industry standard, more dedicated Continuous Deployment solutions appeared (like Argo CD), and modern practices were introduced (like GitOps).
- Let's start with `GitOps`:
- It is a modern approach to managing infrastructure and application deployments declaratively. It's an important practice in continuous deployment.
- It uses Git as a `Single Source of Truth`. No manual and untracked work should be done outside Git, and all changes should be tracked via Git.
- It mainly relies on the `Declarative Style` of Infrastructure as Code, where the configurations are described as the desired state, and some systems (like Kubernetes) take care of bringing the actual state to match that desired state. The `Imperative Style` could still be used in some cases, but it's not recommended.
- GitOps tools like Argo CD continuously monitor the Git repository and detect any drift, and the system attempts to reconcile the state to the desired state.
- Switching to `Argo CD`:
- It's one of the tools that use the GitOps approach to applying Continuous Deployment.
- It's Kubernetes Native (works only on Kubernetes) and uses a pull model to apply the changes.
- You can use Argo CD to deploy Helm chart, Kustomize resource, or plain Kubernetes manifest (read more about [Kubernetes Configuration Management](../module-05/#56-containers---kubernetes-configuration-management)).
- Like most (if not all) GitOps tools, at the core, it uses a declarative style to deploy any software to Kubernetes using Argo CD [Application object](https://argo-cd.readthedocs.io/en/latest/operator-manual/app-any-namespace/).
- Even though it's recommended to use the declarative manifests to interact with Argo CD, it's still possible to use its UI. Of course, making any changes on the fly from there is against the GitOps approach (really avoid doing that).
- Argo CD has many useful [plugins](https://argo-cd.readthedocs.io/en/stable/operator-manual/config-management-plugins/), and you can even write your own from a basic shell script, advanced code, or even your deployment tool. But before writing one, ensure that it's not already there.

:::tip
Don't mix between "Argo CD" and other [Argo projects](https://argoproj.github.io/) like "Argo Workflows", "Argo Rollouts", and "Argo Events"! They are totally different projects serving different purposes.
:::

### Resources {#68-resources}

- [GitOps Continuous Deployment for cloud native applications - GitOps.tech](https://www.gitops.tech/)
- [Argo CD Best Practices - Argo CD Docs](https://argo-cd.readthedocs.io/en/stable/user-guide/best_practices/)

## Project - HiveBox Phase 6

Follow the instructions in the [HiveBox project phase 6](../../projects/hivebox#phase-6).
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ if you are interested in the DevOps hands-on project **only**. Continue if you w
- [6.4 Infrastructure - Multi-environment Architecture](../content/module-06#64-infrastructure---multi-environment-architecture)
- [6.5 Containers - Kubernetes Operators](../content/module-06#65-containers---kubernetes-operators)
- [6.6 Continuous Delivery - End-to-End Release Automation](../content/module-06#66-continuous-delivery---end-to-end-release-automation)
- [6.7 Continuous Deployment - Introduction and Solutions in the Market](./content/module-06#67-continuous-deployment---introduction-and-solutions-in-the-market)
- 6.8 Continuous Deployment - GitOps and Argo CD Essentials
- [6.7 Continuous Deployment - Introduction and Solutions in the Market](../content/module-06#67-continuous-deployment---introduction-and-solutions-in-the-market)
- [6.8 Continuous Deployment - GitOps and Argo CD Essentials](../content/module-06#68-continuous-deployment---gitops-and-argo-cd-essentials)
- [Project - HiveBox Phase 6](../content/module-06#project---hivebox-phase-6)
- [Interview Questions - Module 6](../content/module-06#interview-questions---module-6)

Expand Down
Binary file added static/img/reconciliation-loop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eab3f8b

Please sign in to comment.