Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Cross-Cluster Progressive Delivery with Argo + Hera

Multi-cluster progressive delivery system demonstrating cluster-level canary deployments using Argo Workflows, Rollouts, and Hera Python SDK.

Perfect for KubeCon EU 2026 presentations!

πŸ“š Documentation

Architecture

Dev Cluster β†’ Stage Cluster β†’ Prod US-East-1 β†’ Prod US-West-2
     ↓              ↓               ↓                ↓
  Rollout       Rollout         Rollout          Rollout
     ↓              ↓               ↓                ↓
  Validate      Validate        Validate         Validate
     ↓              ↓               ↓                ↓
  Promote ────────→ Promote ──────→ Promote ──────→ Done

πŸš€ Getting Started

For First-Time Setup

  1. Read INSTALL.md - Complete installation guide (45 minutes)
  2. Follow all 12 steps - From zero to working demo
  3. Verify setup - Run ./scripts/monitor.sh
  4. Test workflow - Run python3.12 hera-workflows/working_pipeline.py

For Demo Presentation

  1. Read DEMO.md - Complete demo script
  2. Setup port forwards - Argo Workflows, ArgoCD, Dashboard
  3. Practice the flow - 10-minute presentation
  4. Use talking points - Why Hera, progressive delivery, multi-cluster

βš™οΈ Configuration

Environment Variable Overrides

The project supports environment variables to customize repository and image settings, making it portable to your own AWS account and GitHub repository.

Variable Description Default Used By
ECR_REPO ECR repository URL 940019131157.dkr.ecr.us-east-1.amazonaws.com/argocon-demo gitops_pipeline.py
ECR_REPO_TAG Image tag to deploy v5.0.0 gitops_pipeline.py
GITHUB_REPO_URL Full GitHub repository URL https://github.com/elamaran11/k8s-argo-workflows-hera setup-argocd-apps.sh
GITHUB_SLUG GitHub owner/repo format elamaran11/k8s-argo-workflows-hera gitops_pipeline.py
GITHUB_TOKEN GitHub personal access token (none) gitops_pipeline.py

Example Usage

# Setup ArgoCD with your own ECR and GitHub repo
ECR_REPO=123456789.dkr.ecr.us-west-2.amazonaws.com/my-app \
GITHUB_REPO_URL=https://github.com/myorg/my-repo \
./scripts/setup-argocd-apps.sh

# Run GitOps workflow with custom settings
ECR_REPO=123456789.dkr.ecr.us-west-2.amazonaws.com/my-app \
ECR_REPO_TAG=v2.0.0 \
GITHUB_SLUG=myorg/my-repo \
GITHUB_TOKEN=ghp_xxxx \
python3.12 hera-workflows/gitops_pipeline.py

Prerequisites

  • macOS (tested on Ventura/Sonoma)
  • AWS Account with admin access
  • Docker Desktop
  • Python 3.12
  • CLI Tools: kubectl, eksctl, argocd

See INSTALL.md for detailed installation instructions.

Key Features

  • βœ… Hera Simplicity - Python SDK reduces YAML complexity
  • βœ… Progressive Rollout - Region-by-region with validation gates
  • βœ… Argo Rollouts - Canary deployments within each cluster
  • βœ… ArgoCD - GitOps-based deployment automation
  • βœ… Multi-Cluster - 4 EKS clusters across 2 AWS regions
  • βœ… Real-time Monitoring - Custom dashboard + Argo UIs
  • βœ… Production Ready - Argo Workflows v3.7.8 with emissary executor

What's Included

Infrastructure

  • 4 EKS 1.34 clusters (dev, stage, prod-us-east-1, prod-us-west-2)
  • Argo Workflows v3.7.8
  • Argo Rollouts v1.7.2
  • Argo CD v2.13.2
  • Argo Events v1.9.2

Workflows

  • simple_example.py - Prints workflow YAML
  • working_pipeline.py - Demo workflow with echo commands
  • gitops_pipeline.py - Full GitOps promotion with Git operations

Monitoring

Demo Application

  • Simple Flask app with health endpoints
  • Docker builds for amd64 architecture
  • Stored in Amazon ECR
  • Deployed via Argo Rollouts with canary strategy

Repository Structure

.
β”œβ”€β”€ INSTALL.md                    # Complete installation guide
β”œβ”€β”€ DEMO.md                       # KubeCon demo script
β”œβ”€β”€ README.md                     # This file
β”œβ”€β”€ requirements.txt              # Python dependencies
β”œβ”€β”€ infrastructure/               # Cluster and Argo configs
β”‚   β”œβ”€β”€ cluster-template.yaml    # EKSCTL cluster template
β”‚   β”œβ”€β”€ applicationset.yaml      # ArgoCD multi-cluster setup
β”‚   β”œβ”€β”€ workflow-rbac.yaml       # Workflow RBAC permissions
β”‚   └── argo-workflows-configmap.yaml  # Workflow controller config
β”œβ”€β”€ hera-workflows/              # Hera Python workflows
β”‚   β”œβ”€β”€ simple_example.py        # Basic example
β”‚   β”œβ”€β”€ working_pipeline.py      # Demo workflow
β”‚   └── gitops_pipeline.py       # Full GitOps workflow
β”œβ”€β”€ environments/                # GitOps manifests
β”‚   β”œβ”€β”€ dev/                     # Dev environment
β”‚   β”œβ”€β”€ stage/                   # Stage environment
β”‚   β”œβ”€β”€ prod-us-east-1/          # Prod US-East-1
β”‚   └── prod-us-west-2/          # Prod US-West-2
β”œβ”€β”€ visualization/               # Web dashboard
β”‚   β”œβ”€β”€ app.py                   # Flask backend
β”‚   └── templates/               # HTML templates
β”œβ”€β”€ scripts/                     # Automation scripts
β”‚   β”œβ”€β”€ create-clusters.sh       # Create EKS clusters
β”‚   β”œβ”€β”€ install-argo.sh          # Install Argo stack
β”‚   β”œβ”€β”€ setup-argocd-apps.sh     # Setup ArgoCD apps
β”‚   β”œβ”€β”€ deploy-demo-app.sh       # Build and push demo app
β”‚   β”œβ”€β”€ monitor.sh               # Monitoring dashboard
β”‚   └── watch-workflow.sh        # Watch workflow execution
β”œβ”€β”€ demo-app/                    # Sample Flask application
β”‚   β”œβ”€β”€ app.py                   # Flask app code
β”‚   └── Dockerfile               # Container image
└── docs/                        # Additional documentation
    β”œβ”€β”€ TROUBLESHOOTING.md       # Common issues
    β”œβ”€β”€ STEP-9-PROGRESSIVE-DELIVERY.md
    └── STEP-10-MONITORING.md

Quick Commands

Setup (one-time)

# Install everything
./scripts/create-clusters.sh      # ~20 minutes
./scripts/install-argo.sh          # ~5 minutes
./scripts/deploy-demo-app.sh v1.0.0  # ~2 minutes
./scripts/setup-argocd-apps.sh     # ~2 minutes

Daily Use

# Start port forwards (3 terminals)
kubectl port-forward svc/argo-server -n argo 2746:2746 --context dev
kubectl port-forward svc/argocd-server -n argocd 8080:443 --context dev
cd visualization && python3.12 app.py

# Monitor system
./scripts/monitor.sh

# Run workflow
source venv/bin/activate
python3.12 hera-workflows/working_pipeline.py

Get ArgoCD Access

# Get ArgoCD admin password
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d && echo

# Login to ArgoCD (optional - for CLI access)
argocd login localhost:8080 --username admin --password <password-from-above> --insecure

# Get ArgoCD token (if needed for API access)
argocd account generate-token --account admin

Cleanup

# Delete clusters
eksctl delete cluster --name dev --region us-east-1
eksctl delete cluster --name stage --region us-east-1
eksctl delete cluster --name prod-us-east-1 --region us-east-1
eksctl delete cluster --name prod-us-west-2 --region us-west-2

# Delete ECR repository
aws ecr delete-repository --repository-name argocon-demo --region us-east-1 --force

Cost Estimate

Running costs:

  • 4 EKS clusters: ~$0.40/hour
  • 8 EC2 t3.medium nodes: ~$0.67/hour
  • LoadBalancers: ~$0.10/hour
  • Total: ~$1.17/hour or ~$28/day

Cost savings tips:

  • Delete clusters when not in use
  • Use t3.small nodes instead of t3.medium
  • Run in single region (2 clusters instead of 4)

Troubleshooting

See docs/TROUBLESHOOTING.md for common issues.

Quick fixes:

# Workflow controller issues
kubectl logs -n argo deployment/workflow-controller --tail=50 --context dev

# ArgoCD sync issues
argocd app sync argocd/app-dev --force

# Port forward issues
pkill -f "port-forward"

Resources

Contributing

This is a demo project for KubeCon EU 2026. Feel free to:

  • Fork and customize for your use case
  • Submit issues for bugs or improvements
  • Share your progressive delivery stories

License

MIT License - See LICENSE file for details


Ready to get started? Head to INSTALL.md for complete setup instructions!

Preparing for demo? Check out DEMO.md for the presentation guide!

About

Cross Cluster Progressive Delivery with Argo Workflows and Hera

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages