All Products
Search
Document Center

Container Compute Service:Enable batch task orchestration

Last Updated:Dec 27, 2024

Argo Workflows is a Kubernetes-native workflow engine. It allows you to use YAML or Python to orchestrate concurrent tasks in order to simplify the automation and management of containerized applications. It is suitable for CI/CD pipelines, data processing, and machine learning. You can install the Argo Workflows component to enable batch task orchestration. Then, you can use the Argo CLI or console to create and manage workflows.

Step 1: Install the Argo Workflows component

You can install Argo Workflows from the Add-ons page.

  1. Log on to the ACS console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its ID. In the left-side navigation pane of the cluster details page, choose Operations > Add-ons.

  3. On the Add-ons page, find Argo Workflows and install the component.

    After the component is installed, choose Applications > Helm in the left-side navigation pane to view the status of ack-workflow. If its status displays Deployed, the component is installed.

Step 2: Use Argo CLI or the console

ACK offers two methods to create and manage workflows: Alibaba Cloud Argo CLI and the Argo console.

Method 1: Install Alibaba Cloud Argo CLI

Alibaba Cloud Argo CLI is fully compatible with the open-source Argo CLI and enhances its metrics capabilities. With the Alibaba Cloud Argo CLI, you can monitor the CPU and memory resources consumed by workflows, and their operating costs. Additionally, the Alibaba Cloud Argo CLI has improved logging features, allowing you to query logs from pods that have been deleted from workflows.

  1. Download the Alibaba Cloud Argo CLI installation package argo-cli-aliyun-linux.

    wget https://ack-one.oss-cn-hangzhou.aliyuncs.com/cli/v3.4.12/argo-cli-aliyun-linux

    In this step, Linux is used as an example. The download links for Darwin and Linux systems are argo-cli-aliyun-darwin and argo-cli-aliyun-linux, respectively.

  2. Run the following command to grant executable permissions to argo-cli-aliyun-linux:

    chmod +x argo-cli-aliyun-linux
  3. Move the executable file to a directory included in your PATH environment variable, such as /usr/local/bin/. Directory paths may vary depending on the environment.

    mv argo-cli-aliyun-linux /usr/local/bin/argo

Method 2: Obtain the access credential and use the Argo console

1. Obtain the access credential

You can retrieve a temporary token that is valid for 1 hour from the service account in the cluster to access the Argo Server.

Run the following command to get a temporary token from the service account named argo-server in the argo namespace:

kubectl create token argo-server -n argo

Expected output:

elxxxxxxxxxx

2. Access the Argo console

With the access credential, you can use the Argo console. By default, an internal endpoint is provided by the system, and you can enable Internet access based on your business requirements.

  1. (Optional) Enable Internet access and configure access control.

    1. Run the following command to edit the Argo Server Service and set the value of type to LoadBalancer:

      kubectl edit service argo-server -n argo
    2. To configure the access control for traffic management, see Work with the access control feature of SLB.

  2. Run the following command to retrieve the public IP of the Argo Server Service, which is the value of the EXTERNAL-IP field. This IP address is used to access the Service.

    kubectl get service argo-server -n argo
  3. Use the following format to enter the public IP and port in the browser address bar:

    https://${IP}:2746

    Expected output:

    image

  4. Enter the access credential you obtained in the preceding step into the text box to log on to the console. The input should follow the format Bearer $token.

    image

  5. After you log on, enter the NAMESPACE as argo and check the status of the task.

    image

What to do next

You can use the CLI or console to quickly create a workflow in an ACS cluster. For more information, see Create a workflow.