Subscribe and Present Notebooks¶
This guide will walk you through subscribing to Rok Registry buckets, downloading the notebook snapshots of an Arrikto EKF cluster, and presenting them to the target Arrikto EKF cluster.
Overview
What You'll Need¶
- An existing Arrikto EKF and Rok Registry deployment.
- A registered Rok cluster to Rok Registry.
- An issued token for a Rok Registry user.
- Published snapshots of all the notebooks in the source Arrikto EKF cluster.
- A privileged notebook server running in the target Arrikto EKF cluster.
- The latest Arrikto wheels installed in the notebook.
Procedure¶
Choose one of the following options, depending on your desired environment.
Connect to a privileged notebook server and open a new terminal.
Set the Rok Registry token:
Read a line from the standard input:
jovyan@mynotebook-0:~$ read -s ROK_REGISTRY_TOKEN
Paste the Rok Registry token you issued, by following the relevant guide.
Export the Rok Registry token:
jovyan@mynotebook-0:~$ export ROK_REGISTRY_TOKEN
Set the Rok Registry URL:
jovyan@mynotebook-0:~$ export ROK_REGISTRY_URL=<URL>
Replace
<URL>
with the base URL of your Rok Registry installation. For example:jovyan@mynotebook-0:~$ export ROK_REGISTRY_URL=https://arrikto-cluster.apps.example.com/registry
Set the identifier for the source cluster, which you are already using to distinguish the Rok Registry buckets for it:
jovyan@mynotebook-0:~$ export CLUSTER_NAME=<CLUSTER_NAME>
Replace
<CLUSTER_NAME>
with the name of the cluster, for example:jovyan@mynotebook-0:~$ export CLUSTER_NAME="arrikto-cluster"
Important
This name should be the same as the name you provided in Snapshot and Publish Notebooks.
Set the bucket prefix that the script will use, when deciding which Rok Registry buckets it will subscribe to:
jovyan@mynotebook-0:~$ export ROK_REGISTRY_BUCKET_PREFIX=cluster-migration-${CLUSTER_NAME?}
Note
The script expects to find buckets whose names match the format
$ROK_REGISTRY_BUCKET_PREFIX-$NAMESPACE
. It will use the$NAMESPACE
part to decide in which Kubernetes namespace it will present the notebooks.For example, if the prefix is
cluster-migration-arrikto-cluster
, then the notebooks in a Rok Registry bucket namedcluster-migration-arrikto-cluster-kubeflow-user
will be created in thekubeflow-user
namespace.Subscribe and present the notebooks to the cluster:
jovyan@mynotebook-0:~$ rok-notebook-restore
Troubleshooting
dialog.ExecutableNotFound
If the above command fails with an error message similar to the following:
dialog.ExecutableNotFound: Executable not found: can't find the executable for the dialog-like program
it means your notebook does not have the
dialog
package installed. You can install it with:jovyan@mynotebook-0:~$ sudo apt install dialog
and retry the command.
Verify¶
- List all notebooks in the source cluster.
- List all notebooks in the destination cluster and make sure they are the same as the ones in the previous step.
Summary¶
You have subscribed to the Rok Registry buckets that contain the notebook snapshots of a source Arrikto EKF cluster, and presented them to the target Arrikto EKF cluster.
What's Next¶
You can check out the rest of the maintenance operations that you can perform on your cluster.