Skip to content

gjbastidas/ArgoCD-and-ArgoWorflows-on-Kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install ArgoCD from Helm chart

Install Argo helm repo

helm repo add argo https://argoproj.github.io/argo-helm

Apply ArgoCD Helm charts

helm install argocd argo/argo-cd --namespace argocd --create-namespace --version 5.13.5

Enter UI locally:

  1. Port-forward argocd-server
kubectl -n argocd port-forward svc/argocd-server 8080:443
  1. Navigate to https://localhost:8080

  2. Admin credentials: Username: Admin Password: kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

  3. Change admin password: image

  4. You should delete the initial secret afterwards as suggested by the Getting Started Guide: https://argo-cd.readthedocs.io/en/stable/getting_started/#4-login-using-the-cli

kubectl -n argo delete secret argocd-initial-admin-secret

Install Argo workflow

If it's not installed already, Install Argo helm repo

helm repo add argo https://argoproj.github.io/argo-helm

Apply Argo Workflow Helm charts

helm install argowf -f helm/argo-wf/values.yaml argo/argo-workflows --namespace argo --create-namespace --version 0.20.6

Enter UI locally:

  1. Port-forward argo-workflows-server
kubectl -n argo port-forward deployment/argowf-argo-workflows-server 2746:2746
  1. Navigate to https://localhost:2746

Install Argo CLI to interact with Workflows

https://github.com/argoproj/argo-workflows/releases/tag/v3.4.3

For Linux:

# Download the binary
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.3/argo-linux-amd64.gz

# Unzip
gunzip argo-linux-amd64.gz

# Make binary executable
chmod +x argo-linux-amd64

# Move binary to path
mv ./argo-linux-amd64 /usr/local/bin/argo

# Test installation
argo version

Service Account used by Argo Workflows

This is shipped from helm chart

  • SA: argo-workflow
  • Role: argowf-argo-workflows-workflow
  • RoleBinding: argowf-argo-workflows-workflow

Create AWS S3 secrets

This is used by the requested workflow and the Artifact Repository below:

  1. Export AWS secrets as env vars
export AWS_ACCESS_KEY_ID="replace-with-access-key"
export AWS_SECRET_ACCESS_KEY="replace-with-secret-key"
export AWS_DEFAULT_REGION="replace-with-default-region"
  1. Create secret in argo namespace
kubectl -n argo create secret generic aws-s3-creds \
    --from-literal=accessKey=$AWS_ACCESS_KEY_ID \
    --from-literal=secretKey=$AWS_SECRET_ACCESS_KEY \
    --from-literal=region=$AWS_DEFAULT_REGION

Create volume

This is to be passed around containers as workspace.

kubectl create -f wf/local-volume.yaml

Run Argo Workflow

Workflow details

For this case:

  • Local volume to pass around containers
  • S3 input bucket: s3://inputzzz
  • S3 output bucket: s3://outputzzz
argo -n argo submit wf/requested-workflow.yaml --serviceaccount argo-workflow --watch

Argo Workflow Useful commands

# List workflows
argo -n argo list

# See logs
argo -nargo logs process-bak-files6hsm7
argo -nargo logs @latest

# Delete workflow
argo -n argo delete process-bak-files6hsm7
argo -n argo delete @latest

About

How to install ArgoCD and Argo Workflows on Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published