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
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_varsdirectoryINSTALL_DIR/wf_installer/config.ymlINSTALL_DIR/wf_installer/inventories/inventory.ini.j2INSTALL_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:
Go to
INSTALL_DIR, where the installation directory was created during the initial installation, for example:/opt/workfusion:$ cd INSTALL_DIRCreate the
wf_installer_newdirectory for the new version of the installer. Ensure that the directory is writable forWFUSER.Use only the
wf_installer_newname for the directory to store the new installation package. Otherwise, the backup won't start.$ mkdir wf_installer_newDownload 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_newdirectory using any convenient method.Extract the installer:
$ tar xzf <10.1.6.x-installer-archive> --strip 1Update the configuration file and add the
jupyter_passline to it:$ vi config.ymljupyter_pass: '********'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.ymlEncrypt
config.yml:$ ./install.sh encrypt configCopy
hosts.ymlandlicense.agreementfrom existingINSTALL_DIR/wf_installer/toINSTALL_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
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