Connecting your Shiny application to a persistent storage volume
Use deployed Shiny applications to read and write files to persistent storage volumes.
To connect your Shiny application to a storage volume, follow these steps:
-
Create a new storage volume connection.
- In your Cloud Pak for Data deployment space, click Add to space and then choose
Connection
. - Search for storage volume and select Storage volume. Give your storage volume connection a name.
- In your Cloud Pak for Data deployment space, click Add to space and then choose
-
If you don't have an available storage volume, click New volume.
-
Give your new storage volume a name.
- If you have an existing persistent volume claim (PVC) or external connection that you would like to connect, select that. Otherwise, select New PVC. Complete the fields as required.
- If you do not have a storage space that is associated with your project, ask your Cloud Pak for Data admin to create one.
-
Check Cloud Pak for Data authentication.
-
Click Create.
-
If your Shiny app was already running when you were creating the volume connection, deploy your Shiny app again.
-
If your Shiny app was not running when you were creating the volume connection, save your Shiny app to the same deployment space (see previous instructions). Click Deploy.
-
Optional: By default, auto-mounting is enabled. A few settings are available for tuning with API only. See the following API POST to: Disable auto-mount:
{ "r_shiny": { "authentication": "anyone_with_url", "parameters": { "auto_mount": false } } }
Set individual mounts for more security in access. Only volumes that match mount paths will be mounted:
{ "r_shiny": { "authentication": "anyone_with_url", "parameters": { "mounts": [ "/mnts/same_dir" ] } } }
Provide the parameter
serving name
:{ "r_shiny": { "authentication": "anyone_with_url", "parameters": { "serving_name": "myapp" } } }
For more information, refer to the Watson Machine Learning API documentation.
Parent topic: Deploying Shiny apps from a deployment space