From 30d78f97edfe2245f021ea482ce538b4f7d35cce Mon Sep 17 00:00:00 2001 From: Yana Hontyk Date: Mon, 14 Sep 2020 16:32:04 +0200 Subject: [PATCH] Add more examples to storage documentation. --- ...storage-to-the-application-components.adoc | 60 +++++++++++++++++-- ...eloper-cli-odo-basic-odo-cli-commands.adoc | 3 - 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/modules/developer-cli-odo-adding-storage-to-the-application-components.adoc b/modules/developer-cli-odo-adding-storage-to-the-application-components.adoc index 2b468c7bff..79024a68fc 100644 --- a/modules/developer-cli-odo-adding-storage-to-the-application-components.adoc +++ b/modules/developer-cli-odo-adding-storage-to-the-application-components.adoc @@ -5,15 +5,67 @@ [id="adding-storage-to-the-application-components_{context}"] = Adding storage to the application components -Persistent storage keeps data available between restarts of {odo-title}. You can add storage to your components with the `odo storage` command. +Persistent storage keeps data available between restarts of {odo-title}. +Use the `odo storage` command to add persistent data to your application. Examples of data that must persist include database files, dependencies, and build artifacts, such as a `.m2` Maven directory. .Procedure -* Add storage to your components: +. Add the storage to your component: + [source,terminal] ---- -$ odo storage create nodestorage --path=/opt/app-root/src/storage/ --size=1Gi +$ odo storage create --path= --size= ---- -Your component now has 1 GB storage. +. Push the storage to the cluser: ++ +[source,terminal] +---- +$ odo push +---- + +. Verify that the storage is now attached to your component by listing all storage in the component: ++ +[source,terminal] +---- +$ odo storage list +---- ++ +.Example output ++ +[source,terminal] +---- +The component 'nodejs' has the following storage attached: +NAME SIZE PATH STATE +mystorage 1Gi /data Pushed +---- + +. Delete the storage from your component: ++ +[source,terminal] +---- +$ odo storage delete +---- + +. List all storage to verify that the storage state is `Locally Deleted`: ++ +[source,terminal] +---- +$ odo storage list +---- ++ +.Example output ++ +[source,terminal] +---- +The component 'nodejs' has the following storage attached: +NAME SIZE PATH STATE +mystorage 1Gi /data Locally Deleted +---- + +. Push the changes to the cluster: ++ +[source,terminal] +---- +$ odo push +---- diff --git a/modules/developer-cli-odo-basic-odo-cli-commands.adoc b/modules/developer-cli-odo-basic-odo-cli-commands.adoc index ef81546fa4..0e1d6a4a5e 100644 --- a/modules/developer-cli-odo-basic-odo-cli-commands.adoc +++ b/modules/developer-cli-odo-basic-odo-cli-commands.adoc @@ -478,9 +478,6 @@ Perform storage operations. # Delete storage mystorage from the currently active component odo storage delete mystorage - # Delete storage mystorage from component 'mongodb' - odo storage delete mystorage --component mongodb - # List all storage attached or mounted to the current component and # all unattached or unmounted storage in the current application odo storage list