Argo from Applatix is an open source project that provides container-native workflows for Kubernetes implementing each step in a workflow as a container. Argo enables users to launch multi-step pipelines using a custom DSL that is similar to traditional YAML. The framework provides sophisticated looping, conditionals, dependency-management with DAG’s etc. which facilitates increased flexibility in deploying application stacks and flexibility of configuration and dependencies. With Argo, users can define dependencies, programmatically construct complex workflows, artifact management for linking the output of any step as an input to subsequent steps and monitor scheduled jobs in an easy to read UI.

Argo V2 is implemented as a Kubernetes CRD (Custom Resource Definition). As a result, Argo workflows can be managed using kubectl and natively integrates with other Kubernetes services such as volumes, secrets, and RBAC. The new Argo software is lightweight and installs in under a minute but provides complete workflow features including parameter substitution, artifacts, fixtures, loops and recursive workflows.

The workflow automation in Argo is driven by YAML templates (easy to adopt as Kubernetes majorly uses the same DSL) that are designed using ADSL (Argo Domain Specific Language). Every instruction that is provided using ADSL is treated as a piece of code and hosted alongside with application code in SCM (Source Code Management). Argo provides/supports six different YAML constructs: Container Templates : creating a single container and parameters as required, Workflow Templates: defining a job, in other words short-running-app which runs to completion. A step in a workflow can be a container, Policy Templates: rules for triggering/invoking a job or a notification, Deployment Template: create long running applications, Fixture Templates: glues third-party resources outside Argo, Project Templates: workflow definitions that can be accessed in Argo catalog.

Argo supports several different ways in which Kubernetes manifests can be defined: Ksonnet applications, Helm charts and simple directory of YAML/json manifests.

Basic Argo Workflow Template

the template below is a simple template where a workflow is defined to create a pod with two containers where one container has curl (Alpine-based image with just curl) and other being a Nginx sidecar container (sidecar runs alongside the service as a second process and provides ‘platform infrastructure features’). Here curl is a ‘main’ container which polls the nginx sidecar container until it is ready to service requests.