The following steps describe how to deploy a fully integrated JupyterHub server. When JupyterHub is deployed, data scientists can create and share Jupyter notebooks.
Log in to the master console of the Access Manager, using the dcadmin user at https://hostname/auth/admin/master/console, where “hostname” is the hostname/IP of the VM where the platform is installed.
Go to Clients and click Create.
Set jupyterhub as the Client ID.
Set https://hostname/jupyter as the Root URL.
Connect to the VM where the platform is installed, and then connect to the Postgres container:Copy
kubectl exec -it postgres-67fc4f87f8-vwvsf sh
Note: The postgres container has a different name in each case, but it always starts with ‘postgres’. While entering the command, after typing ‘post’, press the Tab key to autocomplete the container name.
Connect to the PostgreSQL server:Copy
psql -U postgres
Execute the following SQL statements:Copy
CREATE ROLE jupyter_user LOGIN PASSWORD 'jupyter_password';
ALTER USER jupyter_user WITH CREATEDB;
CREATE DATABASE jupyter_db;
GRANT ALL PRIVILEGES ON DATABASE jupyter_db TO jupyter_user;
Close the PostgreSQL connection, and then exit the container:Copy
Replace <RANDOM_HEX> with a randomly generated HEX string. You can run the following command in the terminal to generate the string:Copy
openssl rand -hex 32
Replace <PLATFORM_ADDRESS> with the hostname/IP of the machine running the platform.
Replace <TENANT> with the tenant name from Access Manager, where you initially created the jupyterhub client.
Replace <CLIENT_SECRET> with the value of the secret from the jupyterhub client, initially created in Access Manager. The secret is included in the JSON file that you have downloaded.
Replace <DB_PASSWORD> with the password for the jupyter_user, created earlier in the PostgreSQL server.
In these instructions, we used jupyter_password.
Use Helm to install JupyterHub using the config.yaml file that you edited earlier:Copy
helm upgrade --cleanup-on-fail --install jupyter jupyterhub/jupyterhub --namespace jupyter --create-namespace --version=0.10.3 --values config.yaml
Apply the ingress.yaml file to Kubernetes:Copy
kubectl apply -f ingress.yaml
Access JupyterHub at https://hostname/jupyter, where “hostname” is the hostname/IP of the VM where the platform is installed.
Wait for the JupyterHub to start.