-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sensor agent doc Signed-off-by: Future Outlier <[email protected]> * sensor agent index rst Signed-off-by: Future Outlier <[email protected]> --------- Signed-off-by: Future Outlier <[email protected]> Co-authored-by: Future Outlier <[email protected]> Co-authored-by: Kevin Su <[email protected]>
- Loading branch information
1 parent
31748fe
commit 0fc2ab0
Showing
3 changed files
with
189 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
.. _deployment-agent-setup-sensor: | ||
|
||
Sensor Agent | ||
================= | ||
|
||
Sensor enables users to continuously check for a file or a condition to be met periodically. | ||
|
||
When the condition is met, the sensor will complete. | ||
|
||
This guide provides an overview of how to set up Sensor in your Flyte deployment. | ||
|
||
Spin up a cluster | ||
----------------- | ||
|
||
.. tabs:: | ||
|
||
.. group-tab:: Flyte binary | ||
|
||
You can spin up a demo cluster using the following command: | ||
|
||
.. code-block:: bash | ||
flytectl demo start | ||
Or install Flyte using the :ref:`flyte-binary helm chart <deployment-deployment-cloud-simple>`. | ||
|
||
.. group-tab:: Flyte core | ||
|
||
If you've installed Flyte using the | ||
`flyte-core helm chart <https://github.com/flyteorg/flyte/tree/master/charts/flyte-core>`__, please ensure: | ||
|
||
* You have the correct kubeconfig and have selected the correct Kubernetes context. | ||
* Confirm that you have the correct Flytectl configuration at ``~/.flyte/config.yaml``. | ||
|
||
.. note:: | ||
|
||
Add the Flyte chart repo to Helm if you're installing via the Helm charts. | ||
|
||
.. code-block:: bash | ||
helm repo add flyteorg https://flyteorg.github.io/flyte | ||
Specify agent configuration | ||
---------------------------- | ||
|
||
Enable the Sensor agent by adding the following config to the relevant YAML file(s): | ||
|
||
.. 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 | ||
- sensor: agent-service | ||
plugins: | ||
agent-service: | ||
supportedTaskTypes: | ||
- sensor | ||
.. 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 | ||
sensor: agent-service | ||
plugins: | ||
agent-service: | ||
supportedTaskTypes: | ||
- sensor | ||
Upgrade the deployment | ||
---------------------- | ||
|
||
.. tabs:: | ||
|
||
.. group-tab:: Flyte binary | ||
|
||
.. tabs:: | ||
|
||
.. group-tab:: Demo cluster | ||
|
||
.. code-block:: bash | ||
kubectl rollout restart deployment flyte-sandbox -n flyte | ||
.. group-tab:: Helm chart | ||
|
||
.. code-block:: bash | ||
helm upgrade <RELEASE_NAME> flyteorg/flyte-binary -n <YOUR_NAMESPACE> --values <YOUR_YAML_FILE> | ||
Replace ``<RELEASE_NAME>`` with the name of your release (e.g., ``flyte-backend``), | ||
``<YOUR_NAMESPACE>`` with the name of your namespace (e.g., ``flyte``), | ||
and ``<YOUR_YAML_FILE>`` with the name of your YAML file. | ||
|
||
.. group-tab:: Flyte core | ||
|
||
.. code-block:: | ||
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``). | ||
|
||
Wait for the upgrade to complete. | ||
|
||
You can check the status of the deployment pods by running the following command: | ||
|
||
.. code-block:: | ||
kubectl get pods -n flyte |