diff --git a/docs/howto/share-data.rst b/docs/howto/share-data.rst new file mode 100644 index 0000000..55b30aa --- /dev/null +++ b/docs/howto/share-data.rst @@ -0,0 +1,59 @@ +.. _howto/share-data: + +========================== +Share data with your users +========================== + +There are a few options for sharing data with your users, this page covers +a few useful patterns. + +Distributing data with `nbgitpuller` +==================================== + +For small datasets, the simplest way to share data with your users is via +``nbgitpuller`` links. In this case, users click on your link and the dataset +contained in the link's target repository is downloaded to the user's home +directory. Note that a copy of the dataset will be made for each user. + +For information on creating and sharing ``nbgitpuller`` links, see +:ref:`_tutorials/nbgitpuller`. + +Distributing data with a read-only shared folder +================================================ + +If your data is large or you don't want copies of it to exist, you can create +a read-only shared folder that users have access to. To do this, follow these +steps: + +#. Log in to your JupyterHub as an **administrator user**. +#. Create a terminal session within your JupyterHub interface. +#. Create a folder where your data will live: + + ``` + mkdir /srv/data/mydatafolder + ``` +#. Download the data into this folder. For example, using `curl` or by running + a `python` script that downloads the data. + +#. All users now have read access to the data in this folder. + +Optionally, you may also **create a symbolic link to the data folder** in each +new user's home directory. To do this, you can use the VM's "skeleton" +directory (`/etc/skel`). Anything that is placed in this directory will also +show up in a new user's home directory. To create a link to the dataset, +follow these steps: + +#. Change into the skeleton directory: + + ``` + cd /etc/skel + ``` +#. Create a symbolic link to the data folder + + ``` + ln -s /src/data/mydatafolder mydatafolder + ``` + +From now on, when a new user account is created, their home directory will +have this symbolic link (and any other files in `/etc/skel`) in their home +directory. diff --git a/docs/index.rst b/docs/index.rst index 58ebf3b..9ff8929 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -58,6 +58,7 @@ How-To guides answer the question 'How do I...?' for a lot of topics. howto/https howto/user-environment howto/admin-users + howto/share-data howto/notebook-interfaces howto/resource-estimation diff --git a/docs/install/custom.rst b/docs/install/custom.rst index 03031de..645f707 100644 --- a/docs/install/custom.rst +++ b/docs/install/custom.rst @@ -28,14 +28,13 @@ Step 1: Installing The Littlest JupyterHub #. Copy the text below, and paste it into the terminal. Replace ```` with the name of the first **admin user** for this JupyterHub. This admin user can log in after the JupyterHub is set up, and - can configure it to their needs. Remember the username! + can configure it to their needs. **Remember to add your username**! .. code-block:: bash - #!/bin/bash curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py \ | sudo python3 - \ - --admin + --admin .. note: diff --git a/docs/install/digitalocean.rst b/docs/install/digitalocean.rst index beabb94..a4724d4 100644 --- a/docs/install/digitalocean.rst +++ b/docs/install/digitalocean.rst @@ -58,7 +58,7 @@ Let's create the server on which we can run JupyterHub. #. Copy the text below, and paste it into the user data text box. Replace ```` with the name of the first **admin user** for this JupyterHub. This admin user can log in after the JupyterHub is set up, and - can configure it to their needs. Remember the username! + can configure it to their needs. **Remember to add your username**! .. code-block:: bash diff --git a/docs/install/google.rst b/docs/install/google.rst index 48c02f7..15b3f36 100644 --- a/docs/install/google.rst +++ b/docs/install/google.rst @@ -139,7 +139,7 @@ Let's create the server on which we can run JupyterHub. #. Copy the text below, and paste it into the **Starup script** text box. Replace ```` with the name of the first **admin user** for this JupyterHub. This admin user can log in after the JupyterHub is set up, and - can configure it to their needs. Remember the username! + can configure it to their needs. **Remember to add your username**! .. code-block:: bash diff --git a/docs/install/jetstream.rst b/docs/install/jetstream.rst index ebc2ef7..cfadc6e 100644 --- a/docs/install/jetstream.rst +++ b/docs/install/jetstream.rst @@ -80,7 +80,7 @@ Let's create the server on which we can run JupyterHub. Copy the text below, and paste it into the **Raw Text** text box. Replace ```` with the name of the first **admin user** for this JupyterHub. This admin user can log in after the JupyterHub is set up, and - can configure it to their needs. Remember the username! + can configure it to their needs. **Remember to add your username**! .. code-block:: bash