-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from grycap/change-doc
Improved mount docs
- Loading branch information
Showing
4 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,46 @@ | ||
# Mounting external storage on service volumes | ||
|
||
This feature enables the mounting of a folder from a storage provider, such as MinIO or dCache, into the service container. As illustrated in the following diagram, the folder is placed inside the /mnt directory on the container volume, thereby making it accessible to the service. This functionality can be utilized with exposed services, such as those using a Jupyter Notebook, to make the content of the storage bucket accessible directly within the Notebook. | ||
This feature enables the mounting of a folder from a storage provider, such as MinIO or dCache, into the service container. As illustrated in the following diagram, the folder is placed inside the /mnt directory on the container volume, thereby making it accessible to the service. | ||
|
||
![mount-diagram](images/mount.png) | ||
|
||
As OSCAR has the credentials of the default MinIO instance internally, if you want to use a different one or a different storage provider, you need to set these credentials on the service [FDL](/fdl). Currently, the storage providers supported on this functionality are: | ||
|
||
- [MinIO provider](/fdl/#minioprovider) | ||
- [WebDav provider](/fdl/#webdavprovider) | ||
This functionality can be useful with exposed services, such as those using a Jupyter Notebook, to make the content of the storage bucket accessible directly within the Notebook. For instance, if you have a MinIO bucket called `notebook` you want to access, you would need to add the following parameters to the service definition: | ||
|
||
Let's explore these with an FDL example: | ||
|
||
``` | ||
``` yaml | ||
mount: | ||
storage_provider: minio.default | ||
path: /body-pose-detection-async | ||
path: /notebook | ||
``` | ||
The example above means that OSCAR mounts the `body-pose-detection-async` bucket of the default MinIO inside the OSCAR services. So, the content of the `body-pose-detection-async` bucket will be found in `/mnt/body-pose-detection-async` folder inside the execution of OSCAR services. | ||
The complete definition of this use case that integrates the expose of a Jupyter Notebook with the access to a mounted bucket would look like the following: | ||
``` yaml | ||
functions: | ||
oscar: | ||
- oscar-cluster: | ||
name: jupyter | ||
memory: 2Gi | ||
cpu: '1.0' | ||
image: jupyter/base-notebook | ||
script: jupyterscript2.sh | ||
environment: | ||
Variables: | ||
JUPYTER_TOKEN: "root" | ||
JHUB_BASE_URL: "/system/services/jupyter/exposed" | ||
JUPYTER_DIRECTORY: "/mnt" | ||
mount: | ||
storage_provider: minio.default | ||
path: /notebook | ||
expose: | ||
min_scale: 1 | ||
max_scale: 1 | ||
api_port: 8888 | ||
cpu_threshold: 90 | ||
rewrite_target: true | ||
``` | ||
**Note**: You can find the files of this example on [OSCAR's repository examples](https://github.com/grycap/oscar/tree/master/examples/expose_services/jupyter) | ||
As OSCAR has the credentials of the default MinIO instance internally, if you want to use a different one or a different storage provider, you need to set these credentials on the service [FDL](/fdl). Currently, the storage providers supported on this functionality are: | ||
- [MinIO provider](/fdl/#minioprovider) | ||
- [WebDav provider](/fdl/#webdavprovider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters