Snapshot and Publish Notebooks

This guide will walk you through snapshotting all notebooks of an Arrikto EKF cluster, adding them into Rok buckets, and publishing the buckets to a Rok Registry.

Procedure

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

This is work in progress.
  1. Connect to the 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 an identifier for your cluster that will be used to distinguish the Rok Registry buckets for this cluster:

    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"
  6. Set the bucket prefix that the script will use when creating Rok Registry buckets:

    jovyan@mynotebook-0:~$ export ROK_REGISTRY_BUCKET_PREFIX=cluster-migration-${CLUSTER_NAME?}
  7. Snapshot and publish the notebooks in the cluster:

    jovyan@mynotebook-0:~$ rok-notebook-backup

    Important

    If your Rok cluster version is < 1.4, you need to start the notebooks before snapshotting them. You can also let the script do it for you:

    jovyan@mynotebook-0:~$ rok-notebook-backup \ > --start-notebooks \ > --stop-notebooks

    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 the notebooks of the cluster in the Notebooks UI.
  2. Make sure all the above notebooks appear in the relevant bucket in the Rok UI.
  3. Make sure the bucket has been successfully published to the Rok Registry.

Summary

You have snapshotted all the notebooks of the cluster, added them into Rok buckets, and published the buckets to a Rok Registry.

What’s Next

The next step is to subscribe to the buckets you just published, and present all notebooks to the destination cluster.