Update the Private Action Runner

This product is not supported for your selected Datadog site. ().
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

Overview

This page explains how to update the private action runner (PAR). The update process depends on your installation method.

Agent-based runner

If you installed the PAR through the Datadog Agent, updating the PAR is part of the standard Agent upgrade process.

Upgrade the Datadog Agent to the latest version. The PAR is bundled with Agent version 7.77.0 and later.

sudo apt-get update && sudo apt-get install datadog-agent

Or for RHEL/CentOS:

sudo yum update datadog-agent

Restart the Agent after the upgrade:

sudo systemctl restart datadog-agent

For detailed upgrade instructions, see Upgrade to Agent v7.

Download the latest Agent MSI installer from the Datadog Agent download page and run the installer.

Alternatively, use PowerShell:

# Download the latest installer
Invoke-WebRequest -Uri "https://s3.amazonaws.com/ddagent-windows-stable/ddagent-cli-latest.msi" -OutFile ddagent-cli-latest.msi

# Run the installer
Start-Process -Wait -PassThru msiexec -ArgumentList '/qn /i ddagent-cli-latest.msi'

Restart the Agent after the upgrade:

Restart-Service -Force datadogagent

Update the Datadog Operator and Agent image versions in your DatadogAgent manifest.

  1. Update the Datadog Operator:

    helm repo update
    helm upgrade datadog-operator datadog/datadog-operator \
        --set image.repository=datadog/operator \
        --set image.tag=latest # you can pin a specific version, see available tags on [Docker Hub][102]
    
  2. Update the Agent image versions in your datadog-agent.yaml manifest:

    override:
      nodeAgent:
        image:
          name: datadog/agent:<NEW_AGENT_VERSION>
      clusterAgent:
        image:
          name: datadog/cluster-agent:<NEW_AGENT_VERSION>
    
  3. Apply the updated manifest:

    kubectl apply -f datadog-agent.yaml
    
  4. Verify the update:

    kubectl get pods
    kubectl logs -l app.kubernetes.io/component=cluster-agent --tail=100 | grep private
    

Updating the PAR is part of the standard Datadog Agent Helm chart upgrade process.

helm repo update
helm upgrade datadog-agent datadog/datadog -f values.yaml

For detailed upgrade instructions, see Upgrading Datadog Helm.

Update the version variables in your Terraform configuration:

locals {
  helm_operator_version = "<NEW_OPERATOR_VERSION>"
  agent_version         = "<NEW_AGENT_VERSION>"
  # ...
}

Apply the changes:

terraform plan
terraform apply -var="datadog_api_key=<YOUR_API_KEY>" -var="datadog_app_key=<YOUR_APP_KEY>"

Standalone runner

If you installed the PAR as a standalone container, use one of the following methods to update.

Currently, the PAR is on v1.20.1.

Navigate to the directory where you started the PAR. Next, navigate to the config directory, then the config.yaml file.

Find the current ID of your container:

docker ps

Stop the container:

docker stop <id>

Start a new container with the latest image. Environment variables are not needed. Everything is configured in the config/config.yaml file.

Run:

docker run -d \
 --cpus="0.25" \
 --memory="1g"  \
 -e DD_PRIVATE_RUNNER_CONFIG_DIR=/etc/dd-action-runner/config \
 -v ./config:/etc/dd-action-runner/config \
 --health-cmd "curl http://localhost:9016/liveness" \
 --health-interval 10s \
 --health-timeout 10s \
 --health-retries 3 gcr.io/datadoghq/private-action-runner:v1.20.1

After confirming the new PAR version is working as expected, remove the old version:

docker rm <id>

To check the PAR logs:

docker logs <id-of-container>

Navigate to the directory containing your docker-compose.yaml file and update the image version:

services:
  private-actions-runner:
    image: gcr.io/datadoghq/private-action-runner:1.20.1
    cpus: 0.25
    mem_limit: 1g
    deploy:
      replicas: 1
    environment:
      - DD_BASE_URL=https://app.datadoghq.com
      - DD_PRIVATE_RUNNER_CONFIG_DIR=/etc/dd-action-runner/config
      - STATSD_ENABLED=true
    volumes:
      - "./config:/etc/dd-action-runner/config"

Start the container again:

docker compose up -d

To check the logs:

docker compose logs runner

When using Helm, there are two options for upgrading the PAR:

  1. (Recommended) Upgrade the chart, which uses the latest version of the PAR. There may be changes to the chart; review the changelog.
  2. Upgrade the runner without upgrading the chart.

Upgrading the chart (recommended)

Navigate to the directory containing your values.yaml file and run:

helm repo update
helm upgrade <RELEASE_NAME> datadog/private-action-runner -f ./values.yaml

Upgrading the PAR only

Specify the PAR version in your values.yaml under the common.image.tag key with the values found here:

common:
  image:
    repository: gcr.io/datadoghq/private-action-runner # optional
    # latest image https://api.datadoghq.com/api/v2/on-prem-management-service/runner/latest-image
    tag: v1.0.0

Then run:

helm upgrade <RELEASE_NAME> datadog/private-action-runner -f ./values.yaml

To check the logs:

kubectl get pods
kubectl logs <name-of-the-pod>