Configuring Jupyter Notebook Server

You can change the default settings in IBM® Cognos® Analytics for Jupyter Notebook Server by editing the config.conf file and by updating Cognos Configuration.

Procedure

  1. Edit the config.conf file.
    1. In a text editor, open the file jupyter_installation_location/dist/scripts/unix/config.conf file for Linux or the jupyter_installation_location/dist/scripts/windows/config.conf for Microsoft Windows 10.
    2. Specify values, as required, for the parameters listed in the following table:

      Parameter

      Description
      CERTIFICATES_DIRECTORY_PATH

      If you are securing Jupyter Notebook Server using SSL, enter the path to the directory that contains certificates for trusted SSL hosts.

      Tip: We recommend that the directory containing the certificates be located outside the jupyter_installation_location directory. As a result, the certificate files won't need to be moved after subsequent installations and the config.conf file can continue to point to the certificates.

      For example:

      CERTIFICATES_DIRECTORY_PATH=//myjupyterserver.mycompany.com/certificates
      PROXY_CERTIFICATE_FILE_PATH If using SSL, enter the path, in Privacy Enhanced Mail (PEM) format, to the certificate file for the Jupyter Server.

      For example:

      PROXY_CERTIFICATE_FILE_PATH=//myjupyterserver.mycompany.com/certificates/myjupyterserver.chained.pem
      PROXY_KEY_FILE_PATH If using SSL, enter the path, in Privacy Enhanced Mail (PEM) format, to the certificate private key file for the Jupyter Server.

      For example:

      PROXY_KEY_FILE_PATH=//myjupyterserver.mycompany.com/certificates/myjupyterserver.my company.com.rsa.key
      DOCKER_IMAGES_PATH=../../images

      If the location of your Docker images changes, update the path to the new location.

      HOST_NAME=$(hostname)

      You should not need to edit the hostname value. It is resolved automatically if the hostname is set correctly. To check this, type hostname on a command line. The fully qualified name of the computer should be returned. If it is incorrect, you can edit the HOST_NAME value and add the fully qualified name.

      For example, type the following:

      HOST_NAME=myjupyterserver.mycompany.com

      HOST_PORT=8000

      The port number of the Jupyter Notebook hub.

      11.1.7COGNOS_HOST

      COGNOS_HOST is an optional parameter that points the Jupyter server to the Cognos Analytics host. By default, the Jupyter server uses the Dispatcher URI for External Applications environment parameter from Cognos Configuration. However, if required, it can be overwritten here.

      Valid examples: https://cognos.domain.com:9300 , http://9.23.132.233:9300 , or http://another-cognos-host.com

      Note: localhost or 127.0.0.1 cannot be used.
      SERVER_LIMIT=0

      Specifies the maximum number of users that can be connected at one time. When set to 0 (the default value), no limit is enforced.

      MEM_LIMIT= Specifies the memory limit for each user's container.

      The value can either be an integer (bytes) or a string with a K, M, G or T prefix.

      Examples:

      MEM_LIMIT=150M

      MEM_LIMIT=2G

      When there is no value (the default), the user container is allocated the memory that it requires.

      11.1.5 CULL_TIMEOUT Specifies the idle time of each container, after which the cull service will remove them (default is 3600 seconds).
      Important: After you make any changes to the config.conf file, you must follow these steps:
      1. Run the dist/scripts/unix/build.sh for Linux or the dist/scripts/windows/build.bat for Windows script to apply your changes.
      2. Run the dist/scripts/unix/startup.sh for Linux or the dist/scripts/windows/startup.bat for Windows script to see your changes.
  2. Update Cognos Configuration as follows:
    1. Start Cognos Configuration.
    2. Click Environment and set the value for the Dispatcher URI for External Applications property.
      Tip: If you set the COGNOS_HOST parameter in the config.conf file, you do not need to also set the Dispatcher URI for External Applications property in Cognos Configuration.