Skip to content

Commit

Permalink
Embed NB2KG into Notebook server
Browse files Browse the repository at this point in the history
This change alleviates a significant pain-point for consumers of Jupyter
Kernel and Enterprise Gateway projects by embedding the few classes defined
in the NB2KG server extension directly into the Notebook server.  All code
resides in a separate gateway directory and the 'extension' is enabled
via a new configuration option `--gateway-url`.

Renamed classes from those used in standard NB2KG code so that Notebook
servers using the existing NB2KG extension will still work.

Added test_gateway.py to exercise overridden methods.  It does this by
mocking the call that issues requests to the gateway server.

Updated the _Running a notebook server_ topic to include a description
of this feature.
  • Loading branch information
kevin-bates committed Nov 6, 2018
1 parent 04a686d commit 6055c32
Show file tree
Hide file tree
Showing 6 changed files with 1,287 additions and 10 deletions.
29 changes: 29 additions & 0 deletions docs/source/public_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,35 @@ single-tab mode:
});
Using a gateway server for kernel management
--------------------------------------------

You are now able to redirect the management of your kernels to a Gateway Server
(i.e., `Jupyter Kernel Gateway <https://jupyter-kernel-gateway.readthedocs.io/en/latest/>`_ or
`Jupyter Enterprise Gateway <https://jupyter-enterprise-gateway.readthedocs.io/en/latest/>`_)
simply by specifying a Gateway url via the following command-line option:

.. code-block:: bash
$ jupyter notebook --gateway-url=http://my-gateway-server:8888
the environment:

.. code-block:: bash
GATEWAY_URL=http://my-gateway-server:8888
or in :file:`jupyter_notebook_config.py`:

.. code-block:: python
c.NotebookApp.gateway_url = http://my-gateway-server:8888
When provided, all kernel specifications will be retrieved from the specified Gateway server and all
kernels will be managed by that server. This option enables the ability to target kernel processes
against managed clusters while allowing for the notebook's management to remain local to the Notebook
server.

Known issues
------------

Expand Down
Empty file added notebook/gateway/__init__.py
Empty file.
Loading

0 comments on commit 6055c32

Please sign in to comment.