diff --git a/docs/deployment/agents/chatgpt.rst b/docs/deployment/agents/chatgpt.rst index cb0b44fa39..9483d95d35 100644 --- a/docs/deployment/agents/chatgpt.rst +++ b/docs/deployment/agents/chatgpt.rst @@ -78,45 +78,25 @@ Specify agent configuration Add the OpenAI API token ------------------------------- -1. Install flyteagent pod using helm: +1. Install the flyteagent pod using helm: -.. code-block:: +.. code-block:: bash helm repo add flyteorg https://flyteorg.github.io/flyte helm install flyteagent flyteorg/flyteagent --namespace flyte -2. Get the base64 value of your OpenAI API token: +2. Set Your OpenAI API Token as a Secret (Base64 Encoded): -.. code-block:: +.. code-block:: bash - echo -n "" | base64 + SECRET_VALUE=$(echo -n "" | base64) && \ + kubectl patch secret flyteagent -n flyte --patch "{\"data\":{\"flyte_openai_api_key\":\"$SECRET_VALUE\"}}" -3. Edit the flyteagent secret: +3. Restart development: - .. code-block:: bash - - kubectl edit secret flyteagent -n flyte - - .. code-block:: yaml - :emphasize-lines: 3 - - apiVersion: v1 - data: - flyte_openai_api_key: - kind: Secret - metadata: - annotations: - meta.helm.sh/release-name: flyteagent - meta.helm.sh/release-namespace: flyte - creationTimestamp: "2023-10-04T04:09:03Z" - labels: - app.kubernetes.io/managed-by: Helm - name: flyteagent - namespace: flyte - resourceVersion: "753" - uid: 5ac1e1b6-2a4c-4e26-9001-d4ba72c39e54 - type: Opaque +.. code-block:: bash + kubectl rollout restart deployment flyteagent -n flyte Upgrade the Flyte Helm release ------------------------------ diff --git a/docs/deployment/agents/databricks.rst b/docs/deployment/agents/databricks.rst index b81c9a28aa..b419144021 100644 --- a/docs/deployment/agents/databricks.rst +++ b/docs/deployment/agents/databricks.rst @@ -199,45 +199,25 @@ Add the Databricks access token You have to set the Databricks token to the Flyte configuration. -1. Install flyteagent pod using helm +1. Install the flyteagent pod using helm .. code-block:: helm repo add flyteorg https://flyteorg.github.io/flyte helm install flyteagent flyteorg/flyteagent --namespace flyte -2. Get the base64 value of your Databricks token. +2. Set Your Databricks Token as a Secret (Base64 Encoded): -.. code-block:: +.. code-block:: bash - echo -n "" | base64 + SECRET_VALUE=$(echo -n "" | base64) && \ + kubectl patch secret flyteagent -n flyte --patch "{\"data\":{\"flyte_databricks_access_token\":\"$SECRET_VALUE\"}}" -3. Edit the flyteagent secret - - .. code-block:: bash - - kubectl edit secret flyteagent -n flyte - - .. code-block:: yaml - :emphasize-lines: 3 - - apiVersion: v1 - data: - flyte_databricks_access_token: - kind: Secret - metadata: - annotations: - meta.helm.sh/release-name: flyteagent - meta.helm.sh/release-namespace: flyte - creationTimestamp: "2023-10-04T04:09:03Z" - labels: - app.kubernetes.io/managed-by: Helm - name: flyteagent - namespace: flyte - resourceVersion: "753" - uid: 5ac1e1b6-2a4c-4e26-9001-d4ba72c39e54 - type: Opaque +3. Restart development: + +.. code-block:: bash + kubectl rollout restart deployment flyteagent -n flyte Upgrade the deployment ---------------------- diff --git a/docs/deployment/agents/openai_batch.rst b/docs/deployment/agents/openai_batch.rst index 2cfa70471a..8e1c622b73 100644 --- a/docs/deployment/agents/openai_batch.rst +++ b/docs/deployment/agents/openai_batch.rst @@ -65,38 +65,18 @@ Add the OpenAI API token helm repo add flyteorg https://flyteorg.github.io/flyte helm install flyteagent flyteorg/flyteagent --namespace flyte -2. Get the base64 value of your OpenAI API token: +2. Set Your OpenAI API Token as a Secret (Base64 Encoded): -.. code-block:: - - echo -n "" | base64 +.. code-block:: bash -3. Edit the flyteagent secret: + SECRET_VALUE=$(echo -n "" | base64) && \ + kubectl patch secret flyteagent -n flyte --patch "{\"data\":{\"flyte_openai_api_key\":\"$SECRET_VALUE\"}}" - .. code-block:: bash +3. Restart development: - kubectl edit secret flyteagent -n flyte - - .. code-block:: yaml - :emphasize-lines: 3 - - apiVersion: v1 - data: - FLYTE_OPENAI_API_KEY: - kind: Secret - metadata: - annotations: - meta.helm.sh/release-name: flyteagent - meta.helm.sh/release-namespace: flyte - creationTimestamp: "2023-10-04T04:09:03Z" - labels: - app.kubernetes.io/managed-by: Helm - name: flyteagent - namespace: flyte - resourceVersion: "753" - uid: 5ac1e1b6-2a4c-4e26-9001-d4ba72c39e54 - type: Opaque +.. code-block:: bash + kubectl rollout restart deployment flyteagent -n flyte Upgrade the Flyte Helm release ------------------------------ diff --git a/docs/flyte_agents/deploying_agents_to_the_flyte_sandbox.md b/docs/flyte_agents/deploying_agents_to_the_flyte_sandbox.md index c4f1a2881e..2f068eb681 100644 --- a/docs/flyte_agents/deploying_agents_to_the_flyte_sandbox.md +++ b/docs/flyte_agents/deploying_agents_to_the_flyte_sandbox.md @@ -52,30 +52,8 @@ image: localhost:30000/flyteagent:example 3. Set up your secrets: Let's take Databricks agent as an example: ```bash -kubectl edit secret flyteagent -n flyte -``` -Get your `BASE64_ENCODED_DATABRICKS_TOKEN`: -```bash -echo -n "" | base64 -``` -Add your token to the `data` field: -```yaml -apiVersion: v1 -data: - flyte_databricks_access_token: -kind: Secret -metadata: - annotations: - meta.helm.sh/release-name: flyteagent - meta.helm.sh/release-namespace: flyte - creationTimestamp: "2023-10-04T04:09:03Z" - labels: - app.kubernetes.io/managed-by: Helm - name: flyteagent - namespace: flyte - resourceVersion: "753" - uid: 5ac1e1b6-2a4c-4e26-9001-d4ba72c39e54 -type: Opaque +SECRET_VALUE=$(echo -n "" | base64) && \ +kubectl patch secret flyteagent -n flyte --patch "{\"data\":{\"flyte_databricks_access_token\":\"$SECRET_VALUE\"}}" ``` :::{note} Please ensure two things: @@ -85,7 +63,7 @@ Please ensure two things: 4. Restart development: ```bash -kubectl rollout restart deployment flyte-sandbox -n flyte +kubectl rollout restart deployment flyteagent -n flyte ``` 5. Test your agent remotely in the Flyte sandbox: