Skip to main content

Configure OpenLineage for a Remote Execution Agent

Airflow 3 only
This feature is only available for Airflow 3.x Deployments.

OpenLineage enables you to access data lineage and provenance across your Airflow workflows for your Remote Execution Agent. Features like Observe and Astro Alerts require that you enable OpenLineage for your data pipelines.

When you create your Remote Execution Agent, Astro automatically generates a Helm values.yaml file with OpenLineage configurations pre-filled. To set up OpenLineage, you need to configure an access credential for OpenLineage. This can be an Astro Deployment API token used as your OpenLineage API key. There are three methods you can use to add your API key to your Helm values:

  • Configure the API key as plain text: This stores your API key in your values.yaml file as plaintext, which is the simplest but least secure option. It would be appropriate for development or testing environments.
  • Use a pre-created Kubernetes secret: This procedure stores your API key separately from your values.yaml file, which provides more security than storing as plaintext. This option provides security with standard Kubernetes features.
  • Inject your API key with a secrets manager: This approach uses the init container to inject the Agent Token into the Remote Execution Agent component Pods. This example uses the Hashicorp Vault agent, but you can use your own secrets manager. This option provides enhanced security with the potential for secret rotation.

Prerequisites

Setup

Step 1: Retrieve your OpenLineage Namespace and URL

  1. In the Astro UI, go to the Deployment page and choose Agent. Then click Register Remote Agent.

  2. Click Download values.yaml file.

The downloaded Helm values file will come with some of the key information for OpenLineage pre-filled, including OpenLineage Namespace and URL. So you only need to configure the OpenLineage API key.

Step 2: Configure the OpenLineage API Key

This method stores an Astro Deployment API token as your OpenLineage API key as plain text in your values.yaml file, so that the Remote Execution Agent Helm chart can use it to creates a Kubernetes secret named openlineage-api-key-secret. This API key is base64-encoded in the Kubernetes secret.

All Remote Execution Agent components, such as the Worker, DAG Processor, Triggerer, use this API key to authenticate with the OpenLineage endpoint.

  1. Add the following OpenLineage configuration to your values.yaml file:
openlineage:
# Enable OpenLineage integration
enabled: true

# Set your OpenLineage API key directly in the values file
apiKey: "insert-your-openlineage-api-key-here"

# Do NOT set apiKeySecret when using apiKey
# apiKeySecret: ~

# Astro OpenLineage URL endpoint (This should be prefilled in the downloaded values.yaml from Astro UI)
url: "https://your-openlineage-endpoint.example.com"

# Astro Deployment's namespace (This should be prefilled in the downloaded values.yaml from Astro UI)
namespace: "your-astro-deployment-namespace"
  1. Apply the chart using the values.yaml file with the following command:

helm install astro-agent astronomer/astro-remote-execution-agent -f values.yaml

Was this page helpful?