Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs for FlyteRemote #2847

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions docs/source/design/control_plane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ A :class:`~flytekit.remote.remote.FlyteRemote` object can be created in various
Auto
====

The :py:class:`~flytekit.configuration.Config` class's :py:meth:`~flytekit.configuration.Config.auto` method can be used to automatically
construct the ``Config`` object.
The :py:class:`~flytekit.remote.remote.FlyteRemote` class's :py:meth:`~flytekit.remote.remote.FlyteRemote.auto` method can be used to automatically construct the ``Config`` object.

.. code-block:: python

from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
from flytekit import FlyteRemote

remote = FlyteRemote(config=Config.auto())
remote = FlyteRemote.auto()

``auto`` also accepts a ``config_file`` argument, which is the path to the configuration file to use.
The order of precedence that ``auto`` follows is:
Expand All @@ -50,34 +48,30 @@ The order of precedence that ``auto`` follows is:
Sandbox
=======

The :py:class:`~flytekit.configuration.Config` class's :py:meth:`~flytekit.configuration.Config.for_sandbox` method can be used to
construct the ``Config`` object, specifically to connect to the Flyte cluster.
The :py:class:`~flytekit.remote.remote.FlyteRemote` class's :py:meth:`~flytekit.remote.remote.FlyteRemote.for_sandbox` method can be used to construct the ``Config`` object, specifically to connect to the Flyte cluster.

.. code-block:: python

from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
from flytekit import FlyteRemote

remote = FlyteRemote(config=Config.for_sandbox())
remote = FlyteRemote.for_sandbox()

The initialization is as simple as calling ``for_sandbox()`` on the ``Config`` class!
The initialization is as simple as calling ``for_sandbox()`` on the ``FlyteRemote`` class!
This, by default, uses ``localhost:30081`` as the endpoint, and the default minio credentials.

If the sandbox is in a hosted-like environment, then *port-forward* or *ingress URLs* need to be taken care of.

Any Endpoint
============

The :py:class:`~flytekit.configuration.Config` class's :py:meth:`~flytekit.configuration.Config.for_endpoint` method can be used to
construct the ``Config`` object to connect to a specific endpoint.
The :py:class:`~flytekit.remote.remote.FlyteRemote` class's :py:meth:`~flytekit.remote.remote.FlyteRemote.for_endpoint` method can be used to construct the ``FlyteRemote`` object to connect to a specific endpoint.

.. code-block:: python

from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
from flytekit import FlyteRemote

remote = FlyteRemote(
config=Config.for_endpoint(endpoint="flyte.example.net"),
remote = FlyteRemote.for_endpoint(
endpoint="flyte.example.net",
default_project="flytesnacks",
default_domain="development",
)
Expand Down
Loading