diff --git a/docs/modules/user-guide/nav.adoc b/docs/modules/user-guide/nav.adoc index ba8d4d70..e6998fad 100644 --- a/docs/modules/user-guide/nav.adoc +++ b/docs/modules/user-guide/nav.adoc @@ -12,8 +12,9 @@ **** xref:adding-exec-commands-to-a-devfile.adoc[] **** xref:adding-composite-commands-to-a-devfile.adoc[] *** xref:adding-components-to-a-devfile.adoc[] -**** xref:adding-kubernetes-component-to-a-devfile.adoc[] -**** xref:adding-container-component-to-a-devfile.adoc[] +**** xref:adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc[] +**** xref:adding-a-container-component-to-a-devfile.adoc[] +**** xref:adding-a-volume-component-to-a-devfile.adoc[] **** xref:specifying-persistent-storage.adoc[] **** xref:limiting-resources-usage.adoc[] **** xref:defining-environment-variables.adoc[] diff --git a/docs/modules/user-guide/pages/adding-a-container-component-to-a-devfile.adoc b/docs/modules/user-guide/pages/adding-a-container-component-to-a-devfile.adoc new file mode 100644 index 00000000..d0779d35 --- /dev/null +++ b/docs/modules/user-guide/pages/adding-a-container-component-to-a-devfile.adoc @@ -0,0 +1,6 @@ +:description: Adding a container component to a devfile +:navtitle: Adding a container component +:keywords: authoring, stack, components +:page-aliases: + +include::partial$proc_adding-a-container-component-to-a-devfile.adoc[] diff --git a/docs/modules/user-guide/pages/adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc b/docs/modules/user-guide/pages/adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc new file mode 100644 index 00000000..b2954bc8 --- /dev/null +++ b/docs/modules/user-guide/pages/adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc @@ -0,0 +1,6 @@ +:description: Adding a Kubernetes or OpenShift component to a devfile +:navtitle: Adding a Kubernetes or OpenShift component +:keywords: authoring, stack, components +:page-aliases: + +include::partial$proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc[] diff --git a/docs/modules/user-guide/pages/adding-a-volume-component-to-a-devfile.adoc b/docs/modules/user-guide/pages/adding-a-volume-component-to-a-devfile.adoc new file mode 100644 index 00000000..d2612e3f --- /dev/null +++ b/docs/modules/user-guide/pages/adding-a-volume-component-to-a-devfile.adoc @@ -0,0 +1,6 @@ +:description: Adding a volume component to a devfile +:navtitle: Adding a volume component +:keywords: authoring, stack, components, volume + + +include::partial$proc_adding-a-volume-component-to-a-devfile.adoc[] diff --git a/docs/modules/user-guide/pages/adding-container-component-to-a-devfile.adoc b/docs/modules/user-guide/pages/adding-container-component-to-a-devfile.adoc deleted file mode 100644 index 883df733..00000000 --- a/docs/modules/user-guide/pages/adding-container-component-to-a-devfile.adoc +++ /dev/null @@ -1,6 +0,0 @@ -:description: Adding container component to a devfile -:navtitle: Adding container component -:keywords: authoring, stack, components -:page-aliases: - -include::partial$proc_adding-container-component-to-a-devfile.adoc[] diff --git a/docs/modules/user-guide/pages/adding-kubernetes-component-to-a-devfile.adoc b/docs/modules/user-guide/pages/adding-kubernetes-component-to-a-devfile.adoc deleted file mode 100644 index 82841be5..00000000 --- a/docs/modules/user-guide/pages/adding-kubernetes-component-to-a-devfile.adoc +++ /dev/null @@ -1,6 +0,0 @@ -:description: Adding kubernetes component to a devfile -:navtitle: Adding kubernetes component -:keywords: authoring, stack, components -:page-aliases: - -include::partial$proc_adding-kubernetes-component-to-a-devfile.adoc[] diff --git a/docs/modules/user-guide/partials/proc_adding-container-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc similarity index 96% rename from docs/modules/user-guide/partials/proc_adding-container-component-to-a-devfile.adoc rename to docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc index ba2e1868..6fe65e7d 100644 --- a/docs/modules/user-guide/partials/proc_adding-container-component-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc @@ -1,5 +1,5 @@ -[id="proc_adding-container-component-to-a-devfile_{context}"] -= Adding `container` components to a devfile +[id="proc_adding-a-container-component-to-a-devfile_{context}"] += Adding a container component to a devfile [role="_abstract"] To incorporate custom tools into the workspace, define an image-based configuration of a container in a workspace. Define this configuration by using the `container` component type. diff --git a/docs/modules/user-guide/partials/proc_adding-kubernetes-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc similarity index 71% rename from docs/modules/user-guide/partials/proc_adding-kubernetes-component-to-a-devfile.adoc rename to docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc index 35a27e7c..2fea82f0 100644 --- a/docs/modules/user-guide/partials/proc_adding-kubernetes-component-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc @@ -1,8 +1,8 @@ -[id="proc_adding-kubernetes-component-to-a-devfile_{context}"] -= Adding a `kubernetes` or `openshift` component to a devfile +[id="proc_adding-a-kubernetes-or-openshift-component-to-a-devfile_{context}"] += Adding a Kubernetes or OpenShift component to a devfile [role="_abstract"] -This section describes how to add either a `kubernetes` or `openshfit` component to a devfile. You can apply configurations to your devfile with `kubernetes` or `openshift` components. +You can add either a `kubernetes` or `openshift` component to a devfile. .Prerequisites @@ -12,11 +12,11 @@ This section describes how to add either a `kubernetes` or `openshfit` component .Procedure -. Define a component using the type `kubernetes` or `openshift`. +. Define a component using the `kubernetes` or `openshift` property. . Provide the content through the `uri` or `inlined` property. + -.Adding `openshift` component using the `uri` property +.Adding an `openshift` component using the `uri` property ==== [source,yaml] ---- diff --git a/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc new file mode 100644 index 00000000..c92fc592 --- /dev/null +++ b/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc @@ -0,0 +1,55 @@ +[id="proc_adding-a-volume-component-to-a-devfile_{context}"] += Adding a volume component to a devfile + +[role="_abstract"] +You can use a `volume` component to share files among container components and collaborate with other teams during the development process. + +.Prerequisites + +* xref:adding-schema-version-to-a-devfile.adoc[] +* xref:adding-a-name-to-a-devfile.adoc[] +* xref:adding-components-to-a-devfile.adoc[] + +.Procedure + +. Add a `volume` component and specify the size of it. ++ +.Minimal `volume` example + +[source,yaml] +---- +schemaVersion: 2.1.0 +metadata: + name: mydevfile +components: + - name: mydevfile + volume: + size: 200G +---- + +. If you do not want your `volume` component to persist across restarts, specify it as ephemeral. ++ +.Ephemeral `volume` example + +[source,yaml] +---- +schemaVersion: 2.1.0 +metadata: + name: mydevfile +components: + - name: mydevfile + volume: + ephemeral: true + size: 200G +---- + +[NOTE] +==== + Specifying the size of a `volume` component is dependent on the tools you use and might be subject to the limitations of the tools. +==== + +[role="_additional-resources"] +.Additional resources + +* xref:api-reference.adoc[] +* xref:devfile-resources.adoc[] diff --git a/docs/modules/user-guide/partials/proc_adding-components-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-components-to-a-devfile.adoc index aa1850c2..9c0a9f63 100644 --- a/docs/modules/user-guide/partials/proc_adding-components-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-components-to-a-devfile.adoc @@ -133,12 +133,13 @@ Each component in a single devfile must have a unique name and use one of the ob . Add a `components` section in the devfile, containing a list of one or more components. -. For each component, define an unique value for the mandatory `name` attribute. +. For each component, define a unique value for the mandatory `name` attribute. -. For each component, define a mandatory type of one of the following types: `kubernetes`, `container` or `volume`. +. For each component, define one of the following types for the mandatory `type` attribute: `kubernetes`, `container`, `openshift`, or `volume`. -. xref:adding-kubernetes-component-to-a-devfile.adoc[] -. xref:adding-container-component-to-a-devfile.adoc[] +. xref:adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc[] +. xref:adding-a-container-component-to-a-devfile.adoc[] +. xref:adding-a-volume-component-to-a-devfile.adoc[] . xref:specifying-persistent-storage.adoc[] . xref:limiting-resources-usage.adoc[] . xref:defining-environment-variables.adoc[]