From 5b1ce25d7be25a156f61beb35dfe74643d9bf335 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Thu, 12 Nov 2020 15:00:24 -0800 Subject: [PATCH] Add docs for fast register --- rsts/user/features/fast_registration.rst | 41 ++++++++++++++++++++++++ rsts/user/features/index.rst | 1 + 2 files changed, 42 insertions(+) create mode 100644 rsts/user/features/fast_registration.rst diff --git a/rsts/user/features/fast_registration.rst b/rsts/user/features/fast_registration.rst new file mode 100644 index 0000000000..d2ad8c5401 --- /dev/null +++ b/rsts/user/features/fast_registration.rst @@ -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/ + +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 -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! + diff --git a/rsts/user/features/index.rst b/rsts/user/features/index.rst index 1549fd95fe..d1f83ec3f6 100644 --- a/rsts/user/features/index.rst +++ b/rsts/user/features/index.rst @@ -17,3 +17,4 @@ Flyte Features single_task_execution on_failure_policy interruptible + fast_registration