Skip to content

Commit

Permalink
Snowflake agent Doc (flyteorg#5620)
Browse files Browse the repository at this point in the history
* TEST build

Signed-off-by: Future-Outlier <[email protected]>

* remove emphasize-lines

Signed-off-by: Future-Outlier <[email protected]>

* test build

Signed-off-by: Future-Outlier <[email protected]>

* revert

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>
  • Loading branch information
Future-Outlier authored and bgedik committed Aug 15, 2024
1 parent dd2957b commit d8e7491
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
6 changes: 4 additions & 2 deletions docs/deployment/agents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <deployment-agent-setup-mmcloud>`
- Configuring your Flyte deployment for the MMCloud agent.
* - {ref}`Sensor Agent <deployment-agent-setup-sensor>`
- Configuring your Flyte deployment for the sensor agent.
* - {ref}`SageMaker Inference <deployment-agent-setup-sagemaker-inference>`
- Deploy models and create, as well as trigger inference endpoints on SageMaker.
* - {ref}`Sensor Agent <deployment-agent-setup-sensor>`
- Configuring your Flyte deployment for the sensor agent.
* - {ref}`Snowflake Agent <deployment-agent-setup-snowflake>`
- Configuring your Flyte deployment for the SnowFlake agent.
* - {ref}`OpenAI Batch <deployment-agent-setup-openai-batch>`
- Submit requests to OpenAI GPT models for asynchronous batch processing.
```
Expand Down
18 changes: 13 additions & 5 deletions docs/deployment/agents/snowflake.rst
Original file line number Diff line number Diff line change
@@ -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 <https://docs.snowflake.com/en/user-guide/key-pair-auth>`__.
2. Create a secret with the group "snowflake" and the key "private_key". For more details, see `"Using Secrets in a Task" <https://https://docs.flyte.org/en/latest/flytesnacks/examples/productionizing/use_secrets.html>`__.
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=<YOUR PRIVATE KEY FILE> --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 <YOUR PRIVATE KEY FILE> | base64) && kubectl patch secret flyteagent -n flyte --patch "{\"data\":{\"snowflake_private_key\":\"$ENCODED_VALUE\"}}"
Specify agent configuration
----------------------------
Expand Down Expand Up @@ -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
------------------------------
Expand All @@ -97,7 +106,6 @@ Upgrade the Flyte Helm release
helm upgrade <RELEASE_NAME> flyte/flyte-core -n <YOUR_NAMESPACE> --values values-override.yaml
Replace ``<RELEASE_NAME>`` with the name of your release (e.g., ``flyte``)

and ``<YOUR_NAMESPACE>`` with the name of your namespace (e.g., ``flyte``).

For Snowflake agent on the Flyte cluster, see `Snowflake agent <https://docs.flyte.org/en/latest/flytesnacks/examples/snowflake_agent/index.html>`_.

0 comments on commit d8e7491

Please sign in to comment.