System test repo for system tests defined using argo workflows.
1.) Install Argo Workflow
The argo workflow is deployed by argocd, below are optional commands to install it manually.
Create argo namespace
kubectl create namespace argo-workflows
Install the latest version of argo workflow
kubectl apply -n argo-workflows -f https://github.com/argoproj/argo-workflows/releases/download/v3.5.6/install.yaml
Argo CLI is installed when the argo-workflow is installed above. No need to deploy it separately. Below commands are optional, showing how to deploy argo cli manually.
Download the binary
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.5.5/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
Execute workflow defined in a yaml file
argo submit -n argo-workflows --watch <yaml file> --serviceaccount argo
argo submit -n argo-workflows --watch <yaml file> -p <parametername>=<parametervalue> --serviceaccount argo
e.g.
argo submit -n argo-workflows --watch homepage-test.yaml -p url="https://dev.eodatahub.org.uk" --serviceaccount argo
argo submit -n argo-workflows --watch <yaml file> --parameter-file <parameterfilename> --serviceaccount argo
e.g.
argo submit -n argo-workflows --watch homepage-test.yaml --parameter-file urlfile.yaml --serviceaccount argo
where, the urlfile.yaml content is
url: https://dev.eodatahub.org.uk
and homepage-test.yaml
file is under /samples
folder.
kubectl -n argo-workflows port-forward deployment/argo-server 2746:2746
Navigate your browser to Workflow UI using
https://localhost::2746/
Due to the self-signed certificate, you will receive a TLS error which you will need to manually approve.
Click + Submit New Workflow
and then Edit using full workflow options
You can find an example workflow already in the text field. Press + Create
to start the workflow.
argo template create url-test-workflowtemplate.yaml -n argo-workflows
Create workflow which includes reference to workflowtemplate as usual
argo submit -n argo-workflows --watch -p url="https://dev.eodatahub.org.uk/" url-up-and-running-workflow.yaml --serviceaccount=argo
Cron workflows are used to schedule executing of a workflow in a specific time
argo cron create <manifestfile>
e.g.
argo cron create url-up-and-running-cron.yaml -p url="https://dev.eodatahub.org.uk"
argo cron create homepage-test-fromfile-cron.yaml
argo cron list -n argo-workflows
argo cron get <cron workflow name> -n argo-workflows
e.g.
argo cron get url-up-and-running-workflow-5qpqk -n argo-workflows
argo cron delete <cron workflow name define in manifest> -n argo
e.g.
argo cron delete url-test-cronworkflow -n argo-workflows
list workflows created
argo list -n argo-workflows
then delete the one selected
argo delete <name of the workflow> -n argo-workflows
kubectl create configmap urlnames-configmap --from-file=urlnames.json -n argo-workflows
the urlnames-configmap
can then be used as volume in argo workflow