Fully automated setup for local functioning Argo CI/CD. It is done by
- setting up Kind k8s cluster
- installing Argo CD
Then Argo CD installs and maintain all other applications specified in the app/application.yml
file. Here both other infra apps, such as Argo itself, and non-infra apps are defined.
Everything is setup to be done with make
for an easy and idempotent interaction.
Argo Workflow: installation guide
Argo Events working example
kind (0.17.0)
kubectl (1.26.2-1)
make (4.4.1)
terraform (v1.4.0) -- Only for Terraform install
Following this blog post and his repo
Using the present main.tf
file to setup
- k8s cluster
- Argo CD, from official manifest
- Load a
application.yml
to initialize the CD
Run the following
cd terraform_manifest
make install
Following installation guide
Using the present manifest files
- k8s cluster
- Argo CD, from official manifest
- Load a
application.yml
to initialize the CD
Run the following
cd manual_install
make install
Once the pods are up and running, port forward the Argo services and fetch admin credentials to access the UI. There is a UI for both Argo CD
and Argo Workflows
.
Run the following to start services
make start
To stop the services, run
make stop
If the UI's don't auto start, you will find Argo CD on https://localhost:8080/, and Argo Workflow on https://localhost:2746/. All the commands are placed in the maintenance
directories as shell scripts.
Since we have our CD application also automatically synced with git, when we ever make any changes, to either an application or Argo CD itself, we can just roll back with git. Use your knowledge of git to choose the appropriate way of doing so; revert
, reset
, rebase
. Here is an example of how to do it with reset
to a specific COMMIT
id
git log --oneline
git reset --hard <COMMIT>
git push --force
To clean up the k8s cluster and all created resources and files, just run
make clean
inside of the chosen installation method's directory.
Applications are continuously deployed with Argo CD. The applications are deployed using a GitOps structure, where the actual state is compared to the desired state to identify the need for updating the k8s resources.
The Argo infra is using a automatic sync approach, i.e., sync every three minutes while all deployed applications use the EventFlow structure. These apps are deployed using Workflows. These are tightly coupled with Events, using the below architecture.
Events are written to the Event Bus, which are then picked up by the Sensor which triggers the Workflow and does potential tests etc, and finished by deploying to prod env.
Setup deployment/CD to be triggered by event: potential guide