Skip to main content
Version: 10.2.8

Install Jupyter Notebook

The guide describes the installation process of the Jupyter Notebook inside the Work.AI environment (previously IA Cloud Enterprise).

Jupyter Notebook is a server-client application that allows you to combine rich text elements—such as figures, charts, links, equations—with a real-time code execution within the so-called notebooks. You can edit and run each notebook via the web browser either locally on your machine (a client and a server running on the same machine) or remotely (the web browser as a client locally and a remote server).

Prerequisites

caution

Install Jupyter in the demo environment only. Installing the Jupyter Notebook inside your environment may cause serious failures if not done with caution. Never install it in your production environment.

The environment must have the following components running:

  • IA Cloud Enterprise (Work.AI) v10.1.6.1+ environment
  • Supervisor
  • HAProxy

Prepare for upgrade

Back up previous installation

The guide assumes that you use the copy of the INSTALL_DIR/wf_installer directory. In this case, backup is not needed as all the changes are revertable provided the previous INSTALL_DIR/wf_installer was untouched.

In case of modifying the INSTALL_DIR/wf_installer directory—although not recommended—back up the following configuration files:

  • INSTALL_DIR/wf_installer/group_vars directory
  • INSTALL_DIR/wf_installer/config.yml
  • INSTALL_DIR/wf_installer/inventories/inventory.ini.j2
  • INSTALL_DIR/wf_installer/roles/haproxy/templates/haproxy.conf.j2

Download and extract installer

Jupyter Notebook is included in the full-package installer.

To download and extract the installer, connect to the server with the installation package with the previous version via SSH and perform the following steps as WFUSER:

  1. Go to INSTALL_DIR, where the installation directory was created during the initial installation, for example: /opt/workfusion:

    $ cd INSTALL_DIR
  2. Create the wf_installer_new directory for the new version of the installer. Ensure that the directory is writable for WFUSER.

    Use only the wf_installer_new name for the directory to store the new installation package. Otherwise, the backup won't start.

    $ mkdir wf_installer_new
  3. Download the installer to INSTALL_DIR/wf_installer_new:

    $ curl -o '<10.1.6.x-installer-archive>' '<link-to-installer-10.1.6.x>'

    If Internet access isn't available on the server, place the package to the INSTALL_DIR/wf_installer_new directory using any convenient method.

  4. Extract the installer:

    $ tar xzf <10.1.6.x-installer-archive> --strip 1
  5. Update the configuration file and add the jupyter_pass line to it:

    $ vi config.yml
    jupyter_pass: '********'
  6. Generate new configuration files from existing ones:

    $ export ANSIBLE_VAULT_PASS="<ansible_vault_password>"   # Password for decryption of config.yml.

    $ cd INSTALL_DIR/wf_installer_new
    $ ./install.sh config_yml generate -e @INSTALL_DIR/wf_installer/config.yml
    $ ./install.sh ports_yml generate -e @INSTALL_DIR/wf_installer/ports.yml
  7. Encrypt config.yml:

    $ ./install.sh encrypt config
  8. Copy hosts.yml and license.agreement from existing INSTALL_DIR/wf_installer/ to INSTALL_DIR/wf_installer_new/.

Update HAProxy

To update HAProxy, reconfigure HAProxy using the following command:

$ cd INSTALL_DIR/wf_installer_new
$ ./install.sh configure haproxy

Install Jupyter Notebook

To install the Jupyter Notebook application, run the following commands:

$ cd INSTALL_DIR/wf_installer_new
$ ./install.sh install jupyter
$ ./install.sh check jupyter

Remove Jupyter

To remove the Jupyter Notebook from the platform environment, perform the actions described in the following sections.

Update HAProxy

note

The step applies to version 10.1.6.1 only. You can omit it if version 10.1.6.2+ is installed.

To discard routing the /jupyter path in URL to the Jupyter application, bring the previous configuration of HAProxy back. If you created a separate directory for the installer, for example, wf_installer_new, go back to your previous installer and reconfigure the load balancer:

$ cd INSTALL_DIR/wf_installer
$ ./install.sh configure haproxy

If you were working on the existing installer during the upgrade and didn't follow the Download and extract installer section, bring the INSTALL_DIR/roles/haproxy/templates/haproxy.conf.j2 file back and trigger the same set of commands as earlier.

Remove Supervisor configuration and Jupyter binaries

To remove all Jupyter-related files from the platform environment, run the following commands:

$ cd INSTALL_DIR/wf_installer_new
$ ./install.sh uninstall jupyter