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

Add docs for fast register #614

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
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
41 changes: 41 additions & 0 deletions rsts/user/features/fast_registration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.. _fast_registration:


*****************
Fast Registration
*****************


Are you frustrated by having to wait for an image build in order to test out simple code changes to your Flyte workflows? If you're interested in reducing to your iteration cycle to mere seconds, read on below.

Caveats
#######

Fast-registration only works when you're testing out code changes. If you need to update your container, say by installing a dependency or modifying a Dockerfile, you **must** use the conventional method of committing your changes and rebuilding a container image.

Prerequisites
#############

* Upgrade your flytekit dependency to ``>=0.15.0``.

* Update your development flyte config and add a new required parameter to the sdk block specifying an intermittent directory for code distributions. Whichever role you use in the [auth] block must have read access to
this directory. For example:

.. code-block:: text

[sdk]
fast_registration_dir=s3://my-s3-bucket/distributions/<myproject>

You'll need to build a base image with these changes incorporated before you can use fast registration.

Fast-registering
################

How-to:

#. After the above prerequisite changes are merged, pull the latest master and create a development branch on your local machine.
#. Make some code changes. Save your files.
#. Assume a role that has write access to the intermittent directory you'll use to store fast registration code distributions (specified in your flytekit config above).
#. Using a python environment with flytekit installed fast-register your changes: ``# flytekit_venv pyflyte -p myproject -d development -v <your-base-image> -c /code/myproject/development.config fast-register workflows --source-dir /code/myproject/``
#. Open the Flyte UI and launch the latest version of your workflow (under the domain you fast-registered above). It should run with your new code!

1 change: 1 addition & 0 deletions rsts/user/features/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Flyte Features
single_task_execution
on_failure_policy
interruptible
fast_registration