Skip to content

manuelnucci/argocd-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArgoCD Demo

Prerequisites

  • Kubernetes cluster (minikube it's the one I used)
  • kubectl
  • kustomize (just to see how it works, ArgoCD takes care of the rest afterwards)

Commands

# Install ArgoCD in k8s
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Access ArgoCD UI
kubectl get svc -n argocd
kubectl port-forward svc/argocd-server 8080:443 -n argocd

# Login with admin user and below token (as in documentation):
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 --decode && echo

# Create applications to control each environment
kubectl apply -f applications/ -n argocd

Sequence of events

After running the previous commands we've simulated a scenario with development, staging and production environments.

Suppose now myapp had a new feature developed. With the help of kustomize the process of updating the deployment of each environment is as follows:

  • The CI pipeline is triggered in the development environment.
  • The pipeline builds and pushes the new image to the registry.
  • Once the image is pushed, the pipeline updates the images[0].newTag key in the corresponding overlay, through a commit and push in the DevOps repo (this one!).

This process can be executed again by another instances of the pipeline, once the changes are promoted to higher environments (CI pipeline for staging, CI pipeline for production, etc.)

Links

About

ArgoCD demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published