From 0fc30b8102ad9a5166adbfcf3bbc26cdc6d3ef86 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 5 Feb 2024 10:43:08 -0800 Subject: [PATCH] [Doc] Airflow agent deployment Signed-off-by: Kevin Su --- docs/deployment/agents/airflow.rst | 88 +++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/docs/deployment/agents/airflow.rst b/docs/deployment/agents/airflow.rst index 9db7554cd6..5da009ef0c 100644 --- a/docs/deployment/agents/airflow.rst +++ b/docs/deployment/agents/airflow.rst @@ -4,8 +4,94 @@ Airflow agent ================= This guide provides an overview of how to set up the Airflow agent in your Flyte deployment. +Please note that the you don't need an Airflow cluster to run the airflow tasks. Flytekit will +automatically compile it to a Flyte task and execute it on the Flyte cluster. Specify agent configuration ---------------------------- -TK +.. tabs:: + + .. group-tab:: Flyte binary + + Edit the relevant YAML file to specify the agent. + + .. code-block:: bash + + kubectl edit configmap flyte-sandbox-config -n flyte + + .. code-block:: yaml + :emphasize-lines: 7,11,16 + + tasks: + task-plugins: + enabled-plugins: + - container + - sidecar + - k8s-array + - agent-service + default-for-task-types: + - container: container + - container_array: k8s-array + - airflow: agent-service + + plugins: + agent-service: + supportedTaskTypes: + - airflow + + .. group-tab:: Flyte core + + Create a file named ``values-override.yaml`` and add the following configuration to it. + + .. code-block:: yaml + + configmap: + enabled_plugins: + # -- Tasks specific configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#GetConfig) + tasks: + # -- Plugins configuration, [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#TaskPluginConfig) + task-plugins: + # -- [Enabled Plugins](https://pkg.go.dev/github.com/flyteorg/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend + enabled-plugins: + - container + - sidecar + - k8s-array + - agent-service + default-for-task-types: + container: container + sidecar: sidecar + container_array: k8s-array + airflow: agent-service + plugins: + agent-service: + supportedTaskTypes: + - airflow + + +Upgrade the Flyte Helm release +------------------------------ + +.. tabs:: + + .. group-tab:: Flyte binary + + .. code-block:: bash + + helm upgrade flyteorg/flyte-binary -n --values + + Replace ```` with the name of your release (e.g., ``flyte-backend``), + ```` with the name of your namespace (e.g., ``flyte``), + and ```` with the name of your YAML file. + + .. group-tab:: Flyte core + + .. code-block:: bash + + helm upgrade flyte/flyte-core -n --values values-override.yaml + + Replace ```` with the name of your release (e.g., ``flyte``) + + and ```` with the name of your namespace (e.g., ``flyte``). + +For Airflow plugin on the Flyte cluster, please refer to `Airflow Plugin Example `_