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.

What You'll Need

Procedure

Choose one of the following options, depending on your desired environment.

This is work in progress.
  1. Connect to a privileged notebook server and open a new terminal.

  2. Set the Rok Registry token:

    1. Read a line from the standard input:

      jovyan@mynotebook-0:~$ read -s ROK_REGISTRY_TOKEN
      
    2. Paste the Rok Registry token you issued, by following the relevant guide.

  3. Export the Rok Registry token:

    jovyan@mynotebook-0:~$ export ROK_REGISTRY_TOKEN
    
  4. 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
    
  5. 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.

  6. 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 named cluster-migration-arrikto-cluster-kubeflow-user will be created in the kubeflow-user namespace.

  7. 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.

This is work in progress.

Verify

  1. List all notebooks in the source cluster.
  2. 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.