A sample project demonstrating how to use Hera Python SDK with Argo Workflows running in Kubernetes locally.
This project showcases the integration between Argo Workflows and Hera, providing examples of different workflow patterns and capabilities:
- Basic workflow execution
- DAG-based workflows
- Artifact passing between workflow steps
- Workflow retry mechanisms
- ETL pipeline example
- Docker
- k3d
- kubectl
- Helm
- Python 3.13+
- uv (Python package manager)
git clone https://github.com/PyDataBlog/argo-hera.git
cd argo-herauv venv
source .venv/bin/activate
uv pip install -e .The project includes a Makefile to automate the setup:
# check all available commands
make help
# Set up everything (cluster + all components)
make all
# Or step by step:
make cluster
make install-envoy
make install-minio
make install-argo-events
make install-argoThis will:
- Create a k3d cluster
- Install Envoy Gateway
- Set up MinIO for artifact storage
- Install Argo Events
- Install Argo Workflows with appropriate configuration
The Makefile uses a USER_IP variable, which defaults to 10.145.85.4. This IP is used for configuring access to services like MinIO and Argo Workflows.
You can override this IP in two ways:
-
Command-line argument:
make USER_IP=your_ip_address <target> # Example: make USER_IP=192.168.1.100 all
-
Environment variable:
export USER_IP=your_ip_address make <target> # Or for a single command: # USER_IP=your_ip_address make <target>
If you don't provide USER_IP, the default value will be used.
python workflows/hello_world.pypython workflows/main.pypython workflows/etl.pypython workflows/artifacts_passing.pypython workflows/retry_workflow.pymake run-sampleRun the tests using pytest:
pytestkubernetes/argo-roles.yaml: RBAC roles for Argo Workflowskubernetes/argo-route.yaml: HTTP route for Argo serverkubernetes/argo-values.yaml: Helm values for Argo Workflowskubernetes/minio-values.yaml: Helm values for MinIOkubernetes/eg.yaml: Envoy Gateway configuration- Python examples in
workflows/:workflows/hello_world.py: Simple workflow exampleworkflows/main.py: DAG diamond pattern workflowworkflows/etl.py: ETL pipeline exampleworkflows/artifacts_passing.py: Example of passing artifacts between tasksworkflows/retry_workflow.py: Example of retrying failed tasks
test/: Test files