From b18449e2f441216e7eb50de4d2317302f7759232 Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Fri, 2 Aug 2024 11:41:16 +0800 Subject: [PATCH] Snowflake agent Doc (#5620) * TEST build Signed-off-by: Future-Outlier * remove emphasize-lines Signed-off-by: Future-Outlier * test build Signed-off-by: Future-Outlier * revert Signed-off-by: Future-Outlier --------- Signed-off-by: Future-Outlier --- docs/deployment/agents/index.md | 6 ++++-- docs/deployment/agents/snowflake.rst | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/deployment/agents/index.md b/docs/deployment/agents/index.md index 912ab8613c..11ce607788 100644 --- a/docs/deployment/agents/index.md +++ b/docs/deployment/agents/index.md @@ -25,10 +25,12 @@ If you are using a managed deployment of Flyte, you will need to contact your de - Configuring your Flyte deployment for the BigQuery agent. * - {ref}`MMCloud Agent ` - Configuring your Flyte deployment for the MMCloud agent. -* - {ref}`Sensor Agent ` - - Configuring your Flyte deployment for the sensor agent. * - {ref}`SageMaker Inference ` - Deploy models and create, as well as trigger inference endpoints on SageMaker. +* - {ref}`Sensor Agent ` + - Configuring your Flyte deployment for the sensor agent. +* - {ref}`Snowflake Agent ` + - Configuring your Flyte deployment for the SnowFlake agent. * - {ref}`OpenAI Batch ` - Submit requests to OpenAI GPT models for asynchronous batch processing. ``` diff --git a/docs/deployment/agents/snowflake.rst b/docs/deployment/agents/snowflake.rst index fe1c8482ae..a689c748bf 100644 --- a/docs/deployment/agents/snowflake.rst +++ b/docs/deployment/agents/snowflake.rst @@ -1,16 +1,25 @@ .. _deployment-agent-setup-snowflake: Snowflake agent -================= +=============== This guide provides an overview of how to set up the Snowflake agent in your Flyte deployment. 1. Set up the key pair authentication in Snowflake. For more details, see the `Snowflake key-pair authentication and key-pair rotation guide `__. -2. Create a secret with the group "snowflake" and the key "private_key". For more details, see `"Using Secrets in a Task" `__. +2. Create a secret with the group "private_key" and the key "snowflake". + This is hardcoded in the flytekit sdk, since we can't know the group and key name in advance. + This is for permission to upload and download data with structured dataset in python task pod. .. code-block:: bash - kubectl create secret generic snowflake-private-key --namespace=flytesnacks-development --from-file=your_private_key_above + kubectl create secret generic private-key --from-file=snowflake= --namespace=flytesnacks-development + +3. Create a secret in the flyteagent's pod, this is for execution snowflake query in the agent pod. + +.. code-block:: bash + + ENCODED_VALUE=$(cat | base64) && kubectl patch secret flyteagent -n flyte --patch "{\"data\":{\"snowflake_private_key\":\"$ENCODED_VALUE\"}}" + Specify agent configuration ---------------------------- @@ -73,7 +82,7 @@ Specify agent configuration supportedTaskTypes: - snowflake -Ensure that the propeller has the correct service account for BigQuery. +Ensure that the propeller has the correct service account for Snowflake. Upgrade the Flyte Helm release ------------------------------ @@ -97,7 +106,6 @@ Upgrade the Flyte Helm release 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 Snowflake agent on the Flyte cluster, see `Snowflake agent `_.