Plasma: A learning platform powered by Jupyter

Jupyter has been a great choice for education for many years. The Jupyter Notebook has become one of the most popular tools to conduct workshops, tutorials, and teach online classes.

Recently we have seen the emergence and adoption of JupyterHub distributions to facilitate the deployment of Jupyter-based platforms, both on private servers and in the cloud.

We would like to share with you an open-source learning platform called Plasma, built with Jupyter at its core.

JupyterHub Distributions

JupyterHub is a highly customizable and modular framework. To simplify its adoption, JupyterHub distributions target specific deployment scenarios with opinionated defaults. They make it easier to deploy JupyterHub on a single server and in the cloud.

There are currently two popular JupyterHub distributions:

Although not an official distribution, jupyterhub-deploy-docker is also a good resource for a full Docker-based setup. It runs JupyterHub itself in a Docker container and orchestrates the stack with Docker Compose.

The Plasma Stack

Plasma stands for PLateforme d’e-Learning pour l’Analyse de données Scientifiques MAssives, which can be translated to “An e-learning platform for massive scientific data analysis”.

The platform is typically meant to be deployed on high-end machines with multiple cores and GB of RAM.

Some of the requirements for the Plasma project fall somewhere between the TLJH and ZTJH distributions:

Although TLJH doesn’t officially support container technology, its plugin system opens the door to many other use cases.

Because of this and to foster the TLJH plugin ecosystem, we decided to develop the Plasma stack as a plugin for TLJH and consolidate the deployment story with Ansible playbooks.

Plasma is an opinionated JupyterHub stack powered by The Littlest JupyterHub, with the following defaults:

To enable extra functionalities, the Plasma stack relies on:

The Plasma stack also contains tools to monitor the system, create and configure users, and add hub admins. It can be visualized with the diagram below:

The Plasma Overview Diagram
The Plasma Overview Diagram

The stack is defined in the following repository: https://github.com/plasmabio/plasma

There is also extensive documentation with detailed explanations on how to deploy the stack on a new server: https://docs.plasmabio.org

A repo2docker plugin for The Littlest JupyterHub

The tljh-repo2docker plugin lets JupyterHub admins create new user environments using repo2docker. This plugin starts a JupyterHub service to manage user environments from the JupyterHub UI.

For those already using Binder, the idea will sound very familiar. Under the hood, the tljh-repo2docker plugin also uses repo2docker to build the Docker images. It follows the same patterns and naming conventions as Binder, which makes it easier and more natural to test the environments on Binder before adding them to JupyterHub.

New environments can be added by clicking on the Add New button and providing a URL to the repository. Optional names, memory, and CPU limits can also be set for the environment:

Adding a new environment
Adding a new environment

The Environments page shows the list of built environments, as well as the ones currently being built:

Building a new environment
Building a new environment

The status of the environment changes once the underlying Docker image has been built:

The list of available user environments
The list of available user environments

Once ready, the environments can be selected from the JupyterHub spawn page:

Selecting an environment
Selecting an environment

Because it is separate from the Plasma stack, this plugin can also be used for other temporary TLJH deployments on a virtual machine. For example, the organizer of a workshop can prepare a list of environments before the event, just like they would with Binder.

Automating deployments with Ansible

To minimize the number of manual steps involved in the setup of the stack, Plasma also provides a list of Ansible playbooks.

Ansible is an open-source tool to automate the provisioning of servers, configuration management, and application deployment.

Playbooks define a list of tasks that should be executed and declare the desired state of the server.

The list of playbooks and instructions on how to use them are provided in the Installation section of the documentation.

Overall, the playbooks make it easier to perform upgrades, to automate the deployment process, and to replicate the setup at other institutions and universities.

Here is an example of what an upgrade looks like:

Upgrading the stack with an Ansible playbook

This playbook defines the tasks to:

Further reading

Acknowledgements

The development of the Plasma stack at QuantStack was funded as part of the Plasma project, led by Claire Vandiedonck, Pierre Poulain, and Sandrine Caburet, associate professors at Université de Paris.

Sponsors to the Plasma initiative include: