Commit 4d2992bc authored by Graham Dumpleton's avatar Graham Dumpleton

Avoid placing anything under home directory in OpenShift deployment example so...

Avoid placing anything under home directory in OpenShift deployment example so can use it to mount volumes.
parent 65f1c4be
......@@ -133,11 +133,9 @@ You can upload notebooks and other files using the web interface of the notebook
oc set volume dc/mynotebook --add \
--type=pvc --claim-size=1Gi --claim-mode=ReadWriteOnce \
--claim-name mynotebook-data --name data \
--mount-path /home/jovyan/work
--mount-path /home/jovyan
```
When you upload any notebooks or data files, place them under the ``work`` directory.
When you have deleted the notebook instance, if using a persistent volume, you will need to delete it in a separate step.
```
......@@ -158,7 +156,7 @@ The ``data`` field of the config map contains Python code used as the ``jupyter_
If you are using a persistent volume, you can also create a configuration file at:
```
/home/jovyan/work/.jupyter/jupyter_notebook_config.py
/home/jovyan/.jupyter/jupyter_notebook_config.py
```
This will be merged at the end of the configuration from the config map.
......@@ -207,7 +205,7 @@ This will trigger a new deployment so ensure you have downloaded any work if not
If using a persistent volume, you could instead setup a password in the file:
```
/home/jovyan/work/.jupyter/jupyter_notebook_config.py
/home/jovyan/.jupyter/jupyter_notebook_config.py
```
as per guidelines in:
......
......@@ -38,7 +38,7 @@
}
},
"data": {
"jupyter_notebook_config.py": "import os\n\npassword = os.environ.get('JUPYTER_NOTEBOOK_PASSWORD')\n\nif password:\n import notebook.auth\n c.NotebookApp.password = notebook.auth.passwd(password)\n del password\n del os.environ['JUPYTER_NOTEBOOK_PASSWORD']\n\nimage_config_file = '/home/jovyan/work/.jupyter/jupyter_notebook_config.py'\n\nif os.path.exists(image_config_file):\n with open(image_config_file) as fp:\n exec(compile(fp.read(), image_config_file, 'exec'), globals())\n"
"jupyter_notebook_config.py": "import os\n\npassword = os.environ.get('JUPYTER_NOTEBOOK_PASSWORD')\n\nif password:\n import notebook.auth\n c.NotebookApp.password = notebook.auth.passwd(password)\n del password\n del os.environ['JUPYTER_NOTEBOOK_PASSWORD']\n\nimage_config_file = '/home/jovyan/.jupyter/jupyter_notebook_config.py'\n\nif os.path.exists(image_config_file):\n with open(image_config_file) as fp:\n exec(compile(fp.read(), image_config_file, 'exec'), globals())\n"
}
},
{
......@@ -81,7 +81,7 @@
"image": "${NOTEBOOK_IMAGE}",
"command": [
"start-notebook.sh",
"--config=/home/jovyan/configs/jupyter_notebook_config.py",
"--config=/etc/jupyter/openshift/jupyter_notebook_config.py",
"--no-browser",
"--ip=0.0.0.0"
],
......@@ -100,7 +100,7 @@
],
"volumeMounts": [
{
"mountPath": "/home/jovyan/configs",
"mountPath": "/etc/jupyter/openshift",
"name": "configs"
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment