From fe62b3ff9903b78dd33b8f8d761421ad2b70b83c Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Thu, 1 Dec 2022 16:25:29 +0000 Subject: [PATCH 01/50] docs: manage workspaces with kubectl Signed-off-by: dkwon17 --- .../pages/managing-workspaces-with-apis.adoc | 19 +- .../partials/proc_creating-workspaces.adoc | 216 +++++++++++++++++- .../partials/proc_listing-workspaces.adoc | 24 +- .../partials/proc_removing-workspaces.adoc | 9 +- .../partials/proc_restarting-workspaces.adoc | 5 - .../proc_starting-stopped-workspaces.adoc | 12 +- .../partials/proc_stopping-workspaces.adoc | 12 +- 7 files changed, 276 insertions(+), 21 deletions(-) delete mode 100644 modules/end-user-guide/partials/proc_restarting-workspaces.adoc diff --git a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc index 8dc7a7ee1d..4a35141bce 100644 --- a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc +++ b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc @@ -1,22 +1,27 @@ :_content-type: ASSEMBLY -:navtitle: Managing workspaces with OpenShift APIs -:description: Managing workspaces with OpenShift APIs +:navtitle: Managing workspaces with {orch-name} APIs +:description: Managing workspaces with {orch-name} APIs :keywords: api, list workspaces, create workspace, restart workspace, stop workspace, start workspace, remove workspace // :page-aliases: [id="managing-workspaces-with-apis"] -= Managing workspaces with OpenShift APIs += Managing workspaces with {orch-name} APIs -... +On a {platforms-name} cluster, {prod-short} workspaces are represented as `DevWorkspace` custom resources of the same name. +As a result, if there is a workspace named `my-workspace` in the {prod-short} dashboard, there is a `DevWorkspace` named `my-workspace` in the user's {orch-namespace} on the {orch-name} cluster. -Consider writing this entire page as a reference. (If so, then rename all the files in `/partials/` and in the `include::` statements below from `proc_` to `ref_`.) +Since `DevWorkspaces` on the cluster represent {prod-short} workspaces, this allows managing {prod-short} workspaces using {orch-name} APIs with clients such as {orch-cli}. + +Each `DevWorkspace` contains details derived from the workspace project's devfile, such as workspace container configurations and devfile commands. + +Each `DevWorkspace` also references a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which contains details about the editor for the workspace. + +To manage a workspace with {orch-name} APIs, you must determine the workspace `NAME` and the `NAMESPACE` it is located in. include::partial$proc_listing-workspaces.adoc[leveloffset=+1] include::partial$proc_creating-workspaces.adoc[leveloffset=+1] -include::partial$proc_restarting-workspaces.adoc[leveloffset=+1] - include::partial$proc_stopping-workspaces.adoc[leveloffset=+1] include::partial$proc_starting-stopped-workspaces.adoc[leveloffset=+1] diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 6ec486ba7f..732a1a13d9 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -2,4 +2,218 @@ [id="creating-workspaces"] = Creating workspaces -Rough technical info to be dumped here by the assigned SME. +It is recommended to create workspaces using the {prod-short} Dashboard instead of using {orch-name} APIs to directly create the `DevWorkspace` and `DevWorkspaceTemplate` custom resources. + +This is because creating workspaces using the {prod-short} Dashboard helps {prod-short} and its components convert the workspace project's devfile to `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. + +Creating workspaces using the {prod-short} dashboard allows {prod-short} to make the following additions to the newly created `DevWorkspaces`: + +* Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: +** persistent storage strategy specified with `devEnvironments.storage` +** default editor specified with `devEnvironments.defaultEditor` +** default plugins specified with `devEnvironments.defaultPlugins` +** container build configuration specified with `devEnvironments.containerBuildConfiguration` +* Recognition of the `DevWorkspaceOperatorConfig` configuration managed by {prod-short} + +.Prerequisites + +* An active `{orch-cli}` session with permissions to create `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the {orch-name} cluster. See {orch-cli-link}. + +.Procedure + +. Create a `DevWorkspaceTemplate` for the editor. The example below creates a `DevWorkspaceTemplate` named `che-code` for the Che-Code Visual Studio Code editor. ++ +[subs="+quotes,attributes"] +---- +$ cat <__ +apiVersion: workspace.devfile.io/v1alpha2 +kind: DevWorkspaceTemplate +metadata: + name: che-code +spec: + commands: + - apply: + component: vscode-injector + id: init-container-command + components: + - container: + command: + - /entrypoint-init-container.sh + cpuLimit: 500m + cpuRequest: 30m + image: 'quay.io/che-incubator/che-code:insiders' + memoryLimit: 128Mi + memoryRequest: 32Mi + sourceMapping: /projects + volumeMounts: + - name: checode + path: /checode + name: vscode-injector + - attributes: + app.kubernetes.io/component: vscode-runtime + app.kubernetes.io/part-of: vscode.eclipse.org + controller.devfile.io/container-contribution: true + container: + cpuRequest: 30m + command: + - /checode/entrypoint-volume.sh + env: + - name: CODE_HOST + value: 0.0.0.0 + memoryRequest: 256Mi + sourceMapping: /projects + cpuLimit: 500m + volumeMounts: + - name: checode + path: /checode + memoryLimit: 1024Mi + image: 'quay.io/che-incubator/che-code:insiders' # no-op ignored image + endpoints: + - attributes: + cookiesAuthEnabled: true + discoverable: false + type: main + urlRewriteSupported: true + exposure: public + name: che-code + protocol: https + secure: false + targetPort: 3100 + - attributes: + discoverable: false + urlRewriteSupported: true + exposure: public + name: code-redirect-1 + protocol: http + targetPort: 13131 + - attributes: + discoverable: false + urlRewriteSupported: true + exposure: public + name: code-redirect-2 + protocol: http + targetPort: 13132 + - attributes: + discoverable: false + urlRewriteSupported: true + exposure: public + name: code-redirect-3 + protocol: http + targetPort: 13133 + name: vscode-runtime-description + - name: checode + volume: + ephemeral: true + events: + preStart: + - init-container-command +EOF +---- +. To prepare the `DevWorkspace` custom resource, copy the contents of a project Devfile. The example used for this procedure is the following Devfile: ++ +[subs="+quotes,attributes"] +---- +schemaVersion: 2.1.0 +components: + - name: tooling-container + container: + image: quay.io/devfile/universal-developer-image:ubi8-latest +---- +. Use the devfile to create a `DevWorkspace` definition by adding its contents to the `spec.template` field of the `DevWorkspace`. In the following example, `spec.started` is set to `true`, meaning that the workspace will start automatically when the `DevWorkspace` is applied on the {orch-name} cluster. ++ +[subs="+quotes,attributes"] +---- +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: my-devworkspace +spec: + started: true + template: + components: + - name: tooling-container + container: + image: quay.io/devfile/universal-developer-image:ubi8-latest +---- +. Add details about the project using the `spec.template.projects` field. ++ +[subs="+quotes,attributes"] +---- +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: my-devworkspace +spec: + started: true + template: + projects: + - name: my-project-name + git: + remotes: + origin: ____ + components: + - name: tooling-container + container: + image: quay.io/devfile/universal-developer-image:ubi8-latest +---- +. Reference the editor using the `DevWorkspaceTemplate` created from step 1 using the `spec.contributions` field. ++ +[subs="+quotes,attributes"] +---- +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: my-devworkspace +spec: + started: true + contributions: + - name: editor + kubernetes: + name: che-code + template: + projects: + - name: my-project-name + git: + remotes: + origin: ____ + components: + - name: tooling-container + container: + image: quay.io/devfile/universal-developer-image:ubi8-latest +---- +. Apply the `DevWorkspace` from the previous step onto the {orch-name} cluster. ++ +[subs="+quotes,attributes"] +---- +$ cat <__ +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: my-devworkspace +spec: + started: true + contributions: + - name: editor + kubernetes: + name: che-code + template: + projects: + - name: my-project-name + git: + remotes: + origin: ____ + components: + - name: tooling-container + container: + image: quay.io/devfile/universal-developer-image:ubi8-latest +EOF +---- +. Confirm that the workspace is starting. ++ +[subs="+quotes,attributes"] +---- +$ {orch-cli} get devworkspaces ____ + +NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +____ my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment +---- diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index b284f39e33..01db9842db 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -1,15 +1,29 @@ [id="listing-workspaces"] -= Listing workspaces += Listing all workspaces -Explain why `--all-namespaces`. +Run the following command to list all workspaces for all users. [source,subs="+attributes"] ---- -$ {orch-cli} get devworkspace --all-namespaces +$ {orch-cli} get devworkspaces + +NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +user1-dev golang-example workspacedf64e4a492cd4701 Stopped Stopped +user1-dev php-symfony workspace5a8f37a0a0d94ea3 Stopped Stopped ---- -TIP: You can add the `--watch` flag. +TIP: You can add the `--watch` flag to view updates when the workspace's `PHASE` changes. -To be confirmed by the assigned SME. +Admins can add the `--all-namespaces` flag to list all workspaces from all users. +[source,subs="+attributes"] +---- +$ {orch-cli} get devworkspaces --all-namespaces + +NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +user1-dev golang-example workspacedf64e4a492cd4701 Stopped Stopped +user1-dev php-symfony workspace5a8f37a0a0d94ea3 Stopped Stopped +user2-dev python-hello-world workspace69c26884bbc141f2 Failed Container tooling has state CrashLoopBackOff +user3-dev spring-petclinic workspace6d99e9ffb9784491 Running https://url-to-workspace.com +---- diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index b9eea94b97..267832696e 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -2,4 +2,11 @@ [id="removing-workspaces"] = Removing workspaces -Rough technical info to be dumped here by the assigned SME. +Removing a workspace only requires deleting the `DevWorkspace` custom resource. + +Deleting the `DevWorkspace` custom resource will also delete other workspace resources if they were created by {prod-short} such as the referenced `DevWorkspaceTemplate` and per-workspace `PersistentVolumeClaims`. + +[source,subs="+attributes"] +---- +$ {orch-cli} delete devworkspace NAME -n NAMESPACE +---- diff --git a/modules/end-user-guide/partials/proc_restarting-workspaces.adoc b/modules/end-user-guide/partials/proc_restarting-workspaces.adoc deleted file mode 100644 index f8cb99310e..0000000000 --- a/modules/end-user-guide/partials/proc_restarting-workspaces.adoc +++ /dev/null @@ -1,5 +0,0 @@ - -[id="restarting-workspaces"] -= Restarting workspaces - -Rough technical info to be dumped here by the assigned SME. diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index eeeb12037a..068c5f2442 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -2,4 +2,14 @@ [id="starting-stopped-workspaces"] = Starting stopped workspaces -Rough technical info to be dumped here by the assigned SME. +A stopped workspace can be started by setting the `Devworkspace` 's `spec.started` field to `true`. + +To use the `wait` command to wait for the status change, a minimum version of `1.23` for `kubectl`, or a minimum version of `4.10` for `oc` is required. + +After determining the `NAME` and `NAMESPACE` of the workspace to start, run: + +[source,subs="+attributes"] +---- +$ {orch-cli} patch devworkspace NAME -p '{"spec":{"started":true}}' --type=merge -n NAMESPACE && \ + {orch-cli} wait --for=jsonpath='{.status.phase}'=Running dw/NAME -n NAMESPACE +---- diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index f89176068e..2dc276c6a5 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -2,4 +2,14 @@ [id="stopping-workspaces"] = Stopping workspaces -Rough technical info to be dumped here by the assigned SME. +A workspace can be stopped by setting the `Devworkspace` 's `spec.started` field to `false`. + +To use the `wait` command to wait for the status change, a minimum version of `1.23` for `kubectl`, or a minimum version of `4.10` for `oc` is required. + +After determining the `NAME` and `NAMESPACE` of the workspace to stop, run: + +[source,subs="+attributes"] +---- +$ {orch-cli} patch devworkspace NAME -p '{"spec":{"started":false}}' --type=merge -n NAMESPACE && \ + {orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/NAME -n NAMESPACE +---- From d276149ccf66429159cb6e22e3aa67d75db84ee8 Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Tue, 3 Jan 2023 22:08:00 +0000 Subject: [PATCH 02/50] Add more clarity to "Creating workspaces" section Signed-off-by: dkwon17 --- .../partials/proc_creating-workspaces.adoc | 121 ++++++------------ 1 file changed, 40 insertions(+), 81 deletions(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 732a1a13d9..6a5e2963ce 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -2,11 +2,13 @@ [id="creating-workspaces"] = Creating workspaces -It is recommended to create workspaces using the {prod-short} Dashboard instead of using {orch-name} APIs to directly create the `DevWorkspace` and `DevWorkspaceTemplate` custom resources. +Since workspaces on the {orch-name} cluster are represented by custom resources, it is possible to create workspaces with {orch-name} APIs by applying custom resources to the cluster. + +It is recommended however, for users to create workspaces using the {prod-short} Dashboard instead of using {orch-name} APIs to manually create `DevWorkspace` and `DevWorkspaceTemplate` custom resources. This is because creating workspaces using the {prod-short} Dashboard helps {prod-short} and its components convert the workspace project's devfile to `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. -Creating workspaces using the {prod-short} dashboard allows {prod-short} to make the following additions to the newly created `DevWorkspaces`: +Creating workspaces using the {prod-short} Dashboard allows {prod-short} to make the following additions to the newly created `DevWorkspaces`: * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** persistent storage strategy specified with `devEnvironments.storage` @@ -19,17 +21,19 @@ Creating workspaces using the {prod-short} dashboard allows {prod-short} to make * An active `{orch-cli}` session with permissions to create `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the {orch-name} cluster. See {orch-cli-link}. +NOTE: For admins creating workspaces for users, the `DevWorkspace` and `DevWorkspaceTemplate` custom resources should be created in a user namespace that is provisioned by {prod-short} or provisioned by the admin. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. + .Procedure . Create a `DevWorkspaceTemplate` for the editor. The example below creates a `DevWorkspaceTemplate` named `che-code` for the Che-Code Visual Studio Code editor. + -[subs="+quotes,attributes"] +[source,yaml,subs="+quotes,+attributes"] ---- -$ cat <__ apiVersion: workspace.devfile.io/v1alpha2 kind: DevWorkspaceTemplate metadata: - name: che-code + name: che-code <1> + namespace: ____ <2> spec: commands: - apply: @@ -47,7 +51,6 @@ spec: sourceMapping: /projects volumeMounts: - name: checode - path: /checode name: vscode-injector - attributes: app.kubernetes.io/component: vscode-runtime @@ -107,11 +110,12 @@ spec: events: preStart: - init-container-command -EOF ---- +<1> Name of the `DevWorkspaceTemplate`. This name will be used to reference the `DevWorkspaceTemplate` within the `DevWorkspace`. +<2> Target {orch-namespace} for the new workspace. . To prepare the `DevWorkspace` custom resource, copy the contents of a project Devfile. The example used for this procedure is the following Devfile: + -[subs="+quotes,attributes"] +[source,yaml,subs="+quotes,+attributes"] ---- schemaVersion: 2.1.0 components: @@ -119,101 +123,56 @@ components: container: image: quay.io/devfile/universal-developer-image:ubi8-latest ---- -. Use the devfile to create a `DevWorkspace` definition by adding its contents to the `spec.template` field of the `DevWorkspace`. In the following example, `spec.started` is set to `true`, meaning that the workspace will start automatically when the `DevWorkspace` is applied on the {orch-name} cluster. -+ -[subs="+quotes,attributes"] ----- -kind: DevWorkspace -apiVersion: workspace.devfile.io/v1alpha2 -metadata: - name: my-devworkspace -spec: - started: true - template: - components: - - name: tooling-container - container: - image: quay.io/devfile/universal-developer-image:ubi8-latest ----- -. Add details about the project using the `spec.template.projects` field. + -[subs="+quotes,attributes"] ----- -kind: DevWorkspace -apiVersion: workspace.devfile.io/v1alpha2 -metadata: - name: my-devworkspace -spec: - started: true - template: - projects: - - name: my-project-name - git: - remotes: - origin: ____ - components: - - name: tooling-container - container: - image: quay.io/devfile/universal-developer-image:ubi8-latest ----- -. Reference the editor using the `DevWorkspaceTemplate` created from step 1 using the `spec.contributions` field. +For more details about Devfiles, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[Devfile v2 documentation]. + +. Use the Devfile to create a `DevWorkspace` definition. + -[subs="+quotes,attributes"] +[source,yaml,subs="+quotes,+attributes"] ---- kind: DevWorkspace apiVersion: workspace.devfile.io/v1alpha2 metadata: - name: my-devworkspace + name: my-devworkspace <1> + namespace: ____ <2> spec: - started: true - contributions: + started: true <3> + contributions: <4> - name: editor kubernetes: - name: che-code + name: che-code <5> template: - projects: + projects: <6> - name: my-project-name git: remotes: - origin: ____ - components: + origin: https://github.com/eclipse-che/che-docs + components: <7> - name: tooling-container container: image: quay.io/devfile/universal-developer-image:ubi8-latest ---- -. Apply the `DevWorkspace` from the previous step onto the {orch-name} cluster. +<1> Name of `DevWorkspace` resource. This is will be the name of the new workspace. +<2> Target {orch-namespace} for the new workspace. +<3> Determines whether the workspace should be started upon creating the `DevWorkspace` resource. +<4> Reference to the editor's `DevWorkspaceTemplate`. +<5> Name of the editor's `DevWorkspaceTemplate` from the previous step. +<6> Details about the Git project to clone upon workspace startup. The Git project that will be cloned for this example is https://github.com/eclipse-che/che-docs. +<7> List of components such as workspace containers and volume components. +. Apply the `DevWorkspace` to the cluster. +. Confirm that the workspace is starting by referring to the `PHASE` status of the `DevWorkspace`. + [subs="+quotes,attributes"] ---- -$ cat <__ -kind: DevWorkspace -apiVersion: workspace.devfile.io/v1alpha2 -metadata: - name: my-devworkspace -spec: - started: true - contributions: - - name: editor - kubernetes: - name: che-code - template: - projects: - - name: my-project-name - git: - remotes: - origin: ____ - components: - - name: tooling-container - container: - image: quay.io/devfile/universal-developer-image:ubi8-latest -EOF +$ {orch-cli} get devworkspaces -n ____ --watch + +NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +____ my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment ---- -. Confirm that the workspace is starting. +. Once the workspace starts, the workspace can be opened by accessing the URL provided in the `INFO` section of the output from `{orch-cli} get devworkspaces`, or by accessing the workspace from the {prod-short} Dashboard. + [subs="+quotes,attributes"] ---- -$ {orch-cli} get devworkspaces ____ - -NAMESPACE NAME DEVWORKSPACE ID PHASE INFO -____ my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment +NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +____ my-devworkspace workspacedf64e4a492cd4701 Running https://url-to-workspace.com ---- From 388d8a8017ac0007b8c8c778585c3f56234d378c Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Tue, 17 Jan 2023 19:32:00 +0200 Subject: [PATCH 03/50] first edit --- .../pages/managing-workspaces-with-apis.adoc | 10 +-- .../partials/proc_creating-workspaces.adoc | 68 +++++++++++++------ .../partials/proc_listing-workspaces.adoc | 37 +++++----- 3 files changed, 72 insertions(+), 43 deletions(-) diff --git a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc index 4a35141bce..fc9ef74862 100644 --- a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc +++ b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc @@ -7,14 +7,14 @@ [id="managing-workspaces-with-apis"] = Managing workspaces with {orch-name} APIs -On a {platforms-name} cluster, {prod-short} workspaces are represented as `DevWorkspace` custom resources of the same name. -As a result, if there is a workspace named `my-workspace` in the {prod-short} dashboard, there is a `DevWorkspace` named `my-workspace` in the user's {orch-namespace} on the {orch-name} cluster. +On the {platforms-name} cluster, {prod-short} workspaces are represented as `DevWorkspace` custom resources of the same name. +As a result, if there is a workspace named `my-workspace` in the {prod-short} dashboard, there is a corresponding `DevWorkspace` named `my-workspace` in the user's {orch-namespace} on the cluster. -Since `DevWorkspaces` on the cluster represent {prod-short} workspaces, this allows managing {prod-short} workspaces using {orch-name} APIs with clients such as {orch-cli}. +Because each `DevWorkspace` custom resource on the cluster represents a {prod-short} workspace, you can manage {prod-short} workspaces by using {orch-name} APIs with clients such as the command-line {orch-cli}. -Each `DevWorkspace` contains details derived from the workspace project's devfile, such as workspace container configurations and devfile commands. +Each `DevWorkspace` contains details derived from the devfile of the Git repository cloned in the workspace. For example, a devfile might provide devfile commands and workspace container configurations. -Each `DevWorkspace` also references a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which contains details about the editor for the workspace. +Each `DevWorkspace` also references a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which contains details about the editor to be loaded in the workspace. To manage a workspace with {orch-name} APIs, you must determine the workspace `NAME` and the `NAMESPACE` it is located in. diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 6a5e2963ce..7dffd50f62 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -2,13 +2,11 @@ [id="creating-workspaces"] = Creating workspaces -Since workspaces on the {orch-name} cluster are represented by custom resources, it is possible to create workspaces with {orch-name} APIs by applying custom resources to the cluster. - It is recommended however, for users to create workspaces using the {prod-short} Dashboard instead of using {orch-name} APIs to manually create `DevWorkspace` and `DevWorkspaceTemplate` custom resources. This is because creating workspaces using the {prod-short} Dashboard helps {prod-short} and its components convert the workspace project's devfile to `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. -Creating workspaces using the {prod-short} Dashboard allows {prod-short} to make the following additions to the newly created `DevWorkspaces`: +Creating workspaces using the {prod-short} dashboard allows {prod-short} to make the following additions to the newly created `DevWorkspaces`: * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** persistent storage strategy specified with `devEnvironments.storage` @@ -17,6 +15,8 @@ Creating workspaces using the {prod-short} Dashboard allows {prod-short} to make ** container build configuration specified with `devEnvironments.containerBuildConfiguration` * Recognition of the `DevWorkspaceOperatorConfig` configuration managed by {prod-short} +Because workspaces on the {orch-name} cluster are represented by custom resources, you can create workspaces with {orch-name} APIs by applying custom resources to the cluster. + .Prerequisites * An active `{orch-cli}` session with permissions to create `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the {orch-name} cluster. See {orch-cli-link}. @@ -25,15 +25,17 @@ NOTE: For admins creating workspaces for users, the `DevWorkspace` and `DevWorks .Procedure -. Create a `DevWorkspaceTemplate` for the editor. The example below creates a `DevWorkspaceTemplate` named `che-code` for the Che-Code Visual Studio Code editor. +. Create a `DevWorkspaceTemplate` for the editor. + +.Creating a `DevWorkspaceTemplate` named `che-code` for the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE +==== [source,yaml,subs="+quotes,+attributes"] ---- apiVersion: workspace.devfile.io/v1alpha2 kind: DevWorkspaceTemplate metadata: - name: che-code <1> - namespace: ____ <2> + name: che-code#<1> + namespace: ____#<2> spec: commands: - apply: @@ -113,8 +115,12 @@ spec: ---- <1> Name of the `DevWorkspaceTemplate`. This name will be used to reference the `DevWorkspaceTemplate` within the `DevWorkspace`. <2> Target {orch-namespace} for the new workspace. -. To prepare the `DevWorkspace` custom resource, copy the contents of a project Devfile. The example used for this procedure is the following Devfile: +==== + +. To prepare the `DevWorkspace` custom resource, copy the contents of a project Devfile. + +.Copied devfile contents +==== [source,yaml,subs="+quotes,+attributes"] ---- schemaVersion: 2.1.0 @@ -123,31 +129,34 @@ components: container: image: quay.io/devfile/universal-developer-image:ubi8-latest ---- +==== + -For more details about Devfiles, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[Devfile v2 documentation]. +TIP: For more details, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[devfile v2 documentation]. -. Use the Devfile to create a `DevWorkspace` definition. +. Use the devfile to create a `DevWorkspace` definition. + +.Example title +==== [source,yaml,subs="+quotes,+attributes"] ---- kind: DevWorkspace apiVersion: workspace.devfile.io/v1alpha2 metadata: - name: my-devworkspace <1> - namespace: ____ <2> + name: my-devworkspace#<1> + namespace: ____#<2> spec: - started: true <3> - contributions: <4> + started: true#<3> + contributions:#<4> - name: editor kubernetes: - name: che-code <5> + name: che-code#<5> template: - projects: <6> + projects:#<6> - name: my-project-name git: remotes: origin: https://github.com/eclipse-che/che-docs - components: <7> + components:#<7> - name: tooling-container container: image: quay.io/devfile/universal-developer-image:ubi8-latest @@ -159,20 +168,35 @@ spec: <5> Name of the editor's `DevWorkspaceTemplate` from the previous step. <6> Details about the Git project to clone upon workspace startup. The Git project that will be cloned for this example is https://github.com/eclipse-che/che-docs. <7> List of components such as workspace containers and volume components. -. Apply the `DevWorkspace` to the cluster. -. Confirm that the workspace is starting by referring to the `PHASE` status of the `DevWorkspace`. +==== + +. Apply the `DevWorkspace` custom resource to the cluster. + +. Verify that the workspace is starting by checking the `PHASE` status of the `DevWorkspace`. + [subs="+quotes,attributes"] ---- $ {orch-cli} get devworkspaces -n ____ --watch - +---- ++ +.Output +==== +[subs="+quotes,attributes"] +---- NAMESPACE NAME DEVWORKSPACE ID PHASE INFO -____ my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment +user1-dev my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment ---- -. Once the workspace starts, the workspace can be opened by accessing the URL provided in the `INFO` section of the output from `{orch-cli} get devworkspaces`, or by accessing the workspace from the {prod-short} Dashboard. +==== + +. When the workspace starts with the *PHASE* status *Running*, open the workspace by either way: +** Visit the URL provided in the `INFO` section of the output from `{orch-cli} get devworkspaces`. +** Open the workspace from the {prod-short} dashboard. + +.Output +==== [subs="+quotes,attributes"] ---- NAMESPACE NAME DEVWORKSPACE ID PHASE INFO -____ my-devworkspace workspacedf64e4a492cd4701 Running https://url-to-workspace.com +user1-dev my-devworkspace workspacedf64e4a492cd4701 Running https://url-to-workspace.com ---- +==== diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index 01db9842db..bf92fe70f8 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -2,28 +2,33 @@ [id="listing-workspaces"] = Listing all workspaces -Run the following command to list all workspaces for all users. +You can list your workspaces on a command line. +.Procedure + +* To list your workspaces, enter the following on a command line: ++ [source,subs="+attributes"] ---- $ {orch-cli} get devworkspaces - -NAMESPACE NAME DEVWORKSPACE ID PHASE INFO -user1-dev golang-example workspacedf64e4a492cd4701 Stopped Stopped -user1-dev php-symfony workspace5a8f37a0a0d94ea3 Stopped Stopped ---- - -TIP: You can add the `--watch` flag to view updates when the workspace's `PHASE` changes. - -Admins can add the `--all-namespaces` flag to list all workspaces from all users. - -[source,subs="+attributes"] ++ +.Output +==== ---- -$ {orch-cli} get devworkspaces --all-namespaces - NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +user1-dev spring-petclinic workspace6d99e9ffb9784491 Running https://url-to-workspace.com user1-dev golang-example workspacedf64e4a492cd4701 Stopped Stopped -user1-dev php-symfony workspace5a8f37a0a0d94ea3 Stopped Stopped -user2-dev python-hello-world workspace69c26884bbc141f2 Failed Container tooling has state CrashLoopBackOff -user3-dev spring-petclinic workspace6d99e9ffb9784491 Running https://url-to-workspace.com +user1-dev python-hello-world workspace69c26884bbc141f2 Failed Container tooling has state CrashLoopBackOff ---- +==== + +[TIP] +==== +You can view `PHASE` changes live by adding the `--watch` flag to this command. +==== + +[NOTE] +==== +Users with administrative permissions on the cluster can list all workspaces from all {prod-short} users by including the `--all-namespaces` flag. +==== \ No newline at end of file From 4f002b77ca3c8aa8510f8c5cef2f8a7950003bdf Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Tue, 17 Jan 2023 19:32:00 +0200 Subject: [PATCH 04/50] first edit --- .../partials/proc_removing-workspaces.adoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 267832696e..5fa6d6313f 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -4,9 +4,14 @@ Removing a workspace only requires deleting the `DevWorkspace` custom resource. -Deleting the `DevWorkspace` custom resource will also delete other workspace resources if they were created by {prod-short} such as the referenced `DevWorkspaceTemplate` and per-workspace `PersistentVolumeClaims`. +TIP: Remove workspaces by using the {prod-short} dashboard whenever possible. +WARNING: Deleting the `DevWorkspace` custom resource will also delete other workspace resources if they were created by {prod-short} such as the referenced `DevWorkspaceTemplate` and per-workspace `PersistentVolumeClaims`. + +.Procedure + +* To remove a workspace, run the following command [source,subs="+attributes"] ---- -$ {orch-cli} delete devworkspace NAME -n NAMESPACE +$ {orch-cli} delete devworkspace ____ -n ____ ---- From 04918a71261c218ffb9df8cbac406f80b27cdb4e Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Thu, 19 Jan 2023 15:22:35 +0200 Subject: [PATCH 05/50] edits --- .../partials/proc_removing-workspaces.adoc | 13 ++++++++----- .../partials/proc_starting-stopped-workspaces.adoc | 12 +++++++----- .../partials/proc_stopping-workspaces.adoc | 12 +++++++----- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 5fa6d6313f..54ec773726 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -2,16 +2,19 @@ [id="removing-workspaces"] = Removing workspaces -Removing a workspace only requires deleting the `DevWorkspace` custom resource. +You can remove a workspace by simply deleting the `DevWorkspace` custom resource. -TIP: Remove workspaces by using the {prod-short} dashboard whenever possible. +WARNING: Deleting the `DevWorkspace` custom resource will also delete other workspace resources if they were created by {prod-short}: for example, the referenced `DevWorkspaceTemplate` and per-workspace `PersistentVolumeClaims`. -WARNING: Deleting the `DevWorkspace` custom resource will also delete other workspace resources if they were created by {prod-short} such as the referenced `DevWorkspaceTemplate` and per-workspace `PersistentVolumeClaims`. +TIP: Remove workspaces by using the {prod-short} dashboard whenever possible. .Procedure -* To remove a workspace, run the following command -[source,subs="+attributes"] +. Get the `____` of the workspace to remove and the `____`. + +* Run the following command to remove the workspace: ++ +[subs="+quotes,attributes"] ---- $ {orch-cli} delete devworkspace ____ -n ____ ---- diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index 068c5f2442..4ac11495ea 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -2,14 +2,16 @@ [id="starting-stopped-workspaces"] = Starting stopped workspaces -A stopped workspace can be started by setting the `Devworkspace` 's `spec.started` field to `true`. +You can start a stopped workspace by setting the `spec.started` field in the `Devworkspace` to `true`. -To use the `wait` command to wait for the status change, a minimum version of `1.23` for `kubectl`, or a minimum version of `4.10` for `oc` is required. +.Procedure -After determining the `NAME` and `NAMESPACE` of the workspace to start, run: +. Get the `____` of the stopped workspace and the `____`. +. Run the following command to start the stopped workspace: ++ [source,subs="+attributes"] ---- -$ {orch-cli} patch devworkspace NAME -p '{"spec":{"started":true}}' --type=merge -n NAMESPACE && \ - {orch-cli} wait --for=jsonpath='{.status.phase}'=Running dw/NAME -n NAMESPACE +$ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":true}}' --type=merge -n ____ && \ + {orch-cli} wait --for=jsonpath='{.status.phase}'=Running dw/____ -n ____ ---- diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index 2dc276c6a5..f54ddb45d4 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -2,14 +2,16 @@ [id="stopping-workspaces"] = Stopping workspaces -A workspace can be stopped by setting the `Devworkspace` 's `spec.started` field to `false`. +You can stop a workspace by setting the `spec.started` field in the `Devworkspace` to `false`. -To use the `wait` command to wait for the status change, a minimum version of `1.23` for `kubectl`, or a minimum version of `4.10` for `oc` is required. +.Procedure -After determining the `NAME` and `NAMESPACE` of the workspace to stop, run: +. Get the `____` of the workspace to stop and the `____`. +. Run the following command to stop that workspace: ++ [source,subs="+attributes"] ---- -$ {orch-cli} patch devworkspace NAME -p '{"spec":{"started":false}}' --type=merge -n NAMESPACE && \ - {orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/NAME -n NAMESPACE +$ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":false}}' --type=merge -n ____ && \ + {orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/____ -n ____ ---- From b7c07b4d5f2522e7e4df571f30bfc7743761b3d7 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Thu, 19 Jan 2023 20:30:47 +0200 Subject: [PATCH 06/50] edits --- .../pages/managing-workspaces-with-apis.adoc | 12 ++- .../partials/proc_creating-workspaces.adoc | 86 ++++++++++++------- .../partials/proc_listing-workspaces.adoc | 25 +++++- .../partials/proc_removing-workspaces.adoc | 34 +++++++- .../proc_starting-stopped-workspaces.adoc | 40 +++++++-- .../partials/proc_stopping-workspaces.adoc | 40 +++++++-- 6 files changed, 185 insertions(+), 52 deletions(-) diff --git a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc index fc9ef74862..d96d0715b8 100644 --- a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc +++ b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc @@ -7,16 +7,14 @@ [id="managing-workspaces-with-apis"] = Managing workspaces with {orch-name} APIs -On the {platforms-name} cluster, {prod-short} workspaces are represented as `DevWorkspace` custom resources of the same name. -As a result, if there is a workspace named `my-workspace` in the {prod-short} dashboard, there is a corresponding `DevWorkspace` named `my-workspace` in the user's {orch-namespace} on the cluster. +On your organization's {orch-name} cluster, {prod-short} workspaces are represented as `DevWorkspace` custom resources of the same name. +As a result, if there is a workspace named `my-workspace` in the {prod-short} dashboard, there is a corresponding `DevWorkspace` custom resource named `my-workspace` in the user's {orch-namespace} on the cluster. -Because each `DevWorkspace` custom resource on the cluster represents a {prod-short} workspace, you can manage {prod-short} workspaces by using {orch-name} APIs with clients such as the command-line {orch-cli}. +Because each `DevWorkspace` custom resource on the cluster represents a {prod-short} workspace, you can manage {prod-short} workspaces by using {orch-name} APIs with clients such as the command-line `{orch-cli}`. -Each `DevWorkspace` contains details derived from the devfile of the Git repository cloned in the workspace. For example, a devfile might provide devfile commands and workspace container configurations. +Each `DevWorkspace` contains details derived from the devfile of the Git repository cloned for the workspace. For example, a devfile might provide devfile commands and workspace container configurations. -Each `DevWorkspace` also references a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which contains details about the editor to be loaded in the workspace. - -To manage a workspace with {orch-name} APIs, you must determine the workspace `NAME` and the `NAMESPACE` it is located in. +Each `DevWorkspace` custom resource also references a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which provides details about the IDE for the workspace. include::partial$proc_listing-workspaces.adoc[leveloffset=+1] diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 7dffd50f62..cf4f277802 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -2,30 +2,50 @@ [id="creating-workspaces"] = Creating workspaces -It is recommended however, for users to create workspaces using the {prod-short} Dashboard instead of using {orch-name} APIs to manually create `DevWorkspace` and `DevWorkspaceTemplate` custom resources. +Because workspaces on the {orch-name} cluster are represented by custom resources, and if your use case does not permit use of the {prod-short} dashboard, you can instead create workspaces with {orch-name} APIs by applying custom resources to the cluster. -This is because creating workspaces using the {prod-short} Dashboard helps {prod-short} and its components convert the workspace project's devfile to `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. +[NOTE] +==== -Creating workspaces using the {prod-short} dashboard allows {prod-short} to make the following additions to the newly created `DevWorkspaces`: +Using the {prod-short} dashboard is the default way to create workspaces because {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster with the following configuration benefits: * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: -** persistent storage strategy specified with `devEnvironments.storage` -** default editor specified with `devEnvironments.defaultEditor` -** default plugins specified with `devEnvironments.defaultPlugins` -** container build configuration specified with `devEnvironments.containerBuildConfiguration` +** Persistent storage strategy specified with `devEnvironments.storage` +** Default IDE specified with `devEnvironments.defaultEditor` +** Default plugins specified with `devEnvironments.defaultPlugins` +** Container build configuration specified with `devEnvironments.containerBuildConfiguration` * Recognition of the `DevWorkspaceOperatorConfig` configuration managed by {prod-short} -Because workspaces on the {orch-name} cluster are represented by custom resources, you can create workspaces with {orch-name} APIs by applying custom resources to the cluster. +==== .Prerequisites -* An active `{orch-cli}` session with permissions to create `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the {orch-name} cluster. See {orch-cli-link}. +* An active `{orch-cli}` session with permissions to create `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. -NOTE: For admins creating workspaces for users, the `DevWorkspace` and `DevWorkspaceTemplate` custom resources should be created in a user namespace that is provisioned by {prod-short} or provisioned by the admin. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. +* You know the relevant {prod-short} user namespace on the cluster. ++ +TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. + +* You are on the {prod-short} user namespace on the cluster. ++ +[TIP] +==== +On OpenShift: + +* You can use the `oc` command-line tool to check your current namespace: ++ +`$ oc project` + +* You can switch to your {prod-short} user namespace on a command line if needed: ++ +`$ oc project ____` +==== ++ +NOTE: {prod-short} administrators who intend to create workspaces for other users must create the `DevWorkspace` and `DevWorkspaceTemplate` custom resources in a user namespace that is provisioned by {prod-short} or by the administrator. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. .Procedure -. Create a `DevWorkspaceTemplate` for the editor. +. Create a `DevWorkspaceTemplate` custom resource for the selected IDE. + .Creating a `DevWorkspaceTemplate` named `che-code` for the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE ==== @@ -35,7 +55,7 @@ apiVersion: workspace.devfile.io/v1alpha2 kind: DevWorkspaceTemplate metadata: name: che-code#<1> - namespace: ____#<2> + namespace: user1-dev#<2> spec: commands: - apply: @@ -72,7 +92,7 @@ spec: - name: checode path: /checode memoryLimit: 1024Mi - image: 'quay.io/che-incubator/che-code:insiders' # no-op ignored image + image: 'quay.io/che-incubator/che-code:insiders' endpoints: - attributes: cookiesAuthEnabled: true @@ -113,17 +133,16 @@ spec: preStart: - init-container-command ---- -<1> Name of the `DevWorkspaceTemplate`. This name will be used to reference the `DevWorkspaceTemplate` within the `DevWorkspace`. -<2> Target {orch-namespace} for the new workspace. +<1> Name of the `DevWorkspaceTemplate` custom resource. This name will be used to reference the `DevWorkspaceTemplate` custom resource within the `DevWorkspace` custom resource. +<2> User namespace, which is the target {orch-namespace} for the new workspace. ==== -. To prepare the `DevWorkspace` custom resource, copy the contents of a project Devfile. +. To prepare the `DevWorkspace` custom resource, copy the contents of the target Git repository's devfile. + -.Copied devfile contents +.Copied devfile contents with `schemaVersion: 2.1.0` ==== [source,yaml,subs="+quotes,+attributes"] ---- -schemaVersion: 2.1.0 components: - name: tooling-container container: @@ -133,9 +152,9 @@ components: + TIP: For more details, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[devfile v2 documentation]. -. Use the devfile to create a `DevWorkspace` definition. +. Create a `DevWorkspace` custom resource definition that incorporates the copied devfile contents from the previous step. + -.Example title +.A `DevWorkspace` custom resource definition ==== [source,yaml,subs="+quotes,+attributes"] ---- @@ -143,11 +162,11 @@ kind: DevWorkspace apiVersion: workspace.devfile.io/v1alpha2 metadata: name: my-devworkspace#<1> - namespace: ____#<2> + namespace: user1-dev#<2> spec: started: true#<3> contributions:#<4> - - name: editor + - name: IDE kubernetes: name: che-code#<5> template: @@ -161,18 +180,18 @@ spec: container: image: quay.io/devfile/universal-developer-image:ubi8-latest ---- -<1> Name of `DevWorkspace` resource. This is will be the name of the new workspace. -<2> Target {orch-namespace} for the new workspace. -<3> Determines whether the workspace should be started upon creating the `DevWorkspace` resource. -<4> Reference to the editor's `DevWorkspaceTemplate`. -<5> Name of the editor's `DevWorkspaceTemplate` from the previous step. -<6> Details about the Git project to clone upon workspace startup. The Git project that will be cloned for this example is https://github.com/eclipse-che/che-docs. +<1> Name of the `DevWorkspace` custom resource. This is will be the name of the new workspace. +<2> User namespace, which is the target {orch-namespace} for the new workspace. +<3> Determines whether the workspace must be started when the `DevWorkspace` custom resource is created. +<4> Reference to the `DevWorkspaceTemplate` custom resource of the selected IDE. +<5> Name of the `DevWorkspaceTemplate` custom resource from the previous step. +<6> Details about the Git repository to clone into the workspace when it starts. <7> List of components such as workspace containers and volume components. ==== . Apply the `DevWorkspace` custom resource to the cluster. -. Verify that the workspace is starting by checking the `PHASE` status of the `DevWorkspace`. +. Verify that the workspace is starting by checking the *PHASE* status of the `DevWorkspace`. + [subs="+quotes,attributes"] ---- @@ -188,9 +207,7 @@ user1-dev my-devworkspace workspacedf64e4a492cd4701 Starting Wait ---- ==== -. When the workspace starts with the *PHASE* status *Running*, open the workspace by either way: -** Visit the URL provided in the `INFO` section of the output from `{orch-cli} get devworkspaces`. -** Open the workspace from the {prod-short} dashboard. +. When the workspace has successfully started, its *PHASE* status changes to *Running* in the output of the `{orch-cli} get devworkspaces` command. + .Output ==== @@ -200,3 +217,8 @@ NAMESPACE NAME DEVWORKSPACE ID PHASE user1-dev my-devworkspace workspacedf64e4a492cd4701 Running https://url-to-workspace.com ---- ==== ++ +You can then open the workspace by using one of these options: ++ +** Visit the URL provided in the `INFO` section of the output of the `{orch-cli} get devworkspaces` command. +** Open the workspace from the {prod-short} dashboard. diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index bf92fe70f8..70617950b3 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -4,6 +4,29 @@ You can list your workspaces on a command line. +.Prerequisites + +* An active `{orch-cli}` session on the cluster. See {orch-cli-link}. + +* You know the relevant {prod-short} user namespace on the cluster. ++ +TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. + +* You are on the {prod-short} user namespace on the cluster. ++ +[TIP] +==== +On OpenShift: + +* You can use the `oc` command-line tool to check your current namespace: ++ +`$ oc project` + +* You can switch to your {prod-short} user namespace on a command line if needed: ++ +`$ oc project ____` +==== + .Procedure * To list your workspaces, enter the following on a command line: @@ -25,7 +48,7 @@ user1-dev python-hello-world workspace69c26884bbc141f2 Failed Container [TIP] ==== -You can view `PHASE` changes live by adding the `--watch` flag to this command. +You can view *PHASE* changes live by adding the `--watch` flag to this command. ==== [NOTE] diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 54ec773726..cb4589125c 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -8,9 +8,39 @@ WARNING: Deleting the `DevWorkspace` custom resource will also delete other work TIP: Remove workspaces by using the {prod-short} dashboard whenever possible. -.Procedure +.Prerequisites + +* An active `{orch-cli}` session on the cluster. See {orch-cli-link}. + +* You know the workspace name. ++ +[TIP] +==== +You can find the relevant workspace name in the output of the following command: + +`$ {orch-cli} get devworkspaces` +==== + +* You know the relevant {prod-short} user namespace on the cluster. ++ +TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -. Get the `____` of the workspace to remove and the `____`. +* You are on the {prod-short} user namespace on the cluster. ++ +[TIP] +==== +On OpenShift: + +* You can use the `oc` command-line tool to check your current namespace: ++ +`$ oc project` + +* You can switch to your {prod-short} user namespace on a command line if needed: ++ +`$ oc project ____` +==== + +.Procedure * Run the following command to remove the workspace: + diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index 4ac11495ea..7ee03f9959 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -2,15 +2,45 @@ [id="starting-stopped-workspaces"] = Starting stopped workspaces -You can start a stopped workspace by setting the `spec.started` field in the `Devworkspace` to `true`. +You can start a stopped workspace by setting the `spec.started` field in the `Devworkspace` custom resource to `true`. -.Procedure +.Prerequisites + +* An active `{orch-cli}` session on the cluster. See {orch-cli-link}. + +* You know the workspace name. ++ +[TIP] +==== +You can find the relevant workspace name in the output of the following command: + +`$ {orch-cli} get devworkspaces` +==== + +* You know the relevant {prod-short} user namespace on the cluster. ++ +TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -. Get the `____` of the stopped workspace and the `____`. +* You are on the {prod-short} user namespace on the cluster. ++ +[TIP] +==== +On OpenShift: + +* You can use the `oc` command-line tool to check your current namespace: ++ +`$ oc project` + +* You can switch to your {prod-short} user namespace on a command line if needed: ++ +`$ oc project ____` +==== + +.Procedure -. Run the following command to start the stopped workspace: +* Run the following command to start the stopped workspace: + -[source,subs="+attributes"] +[subs="+quotes,attributes"] ---- $ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":true}}' --type=merge -n ____ && \ {orch-cli} wait --for=jsonpath='{.status.phase}'=Running dw/____ -n ____ diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index f54ddb45d4..27cbeeb263 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -2,15 +2,45 @@ [id="stopping-workspaces"] = Stopping workspaces -You can stop a workspace by setting the `spec.started` field in the `Devworkspace` to `false`. +You can stop a workspace by setting the `spec.started` field in the `Devworkspace` custom resource to `false`. -.Procedure +.Prerequisites + +* An active `{orch-cli}` session on the cluster. See {orch-cli-link}. + +* You know the workspace name. ++ +[TIP] +==== +You can find the relevant workspace name in the output of the following command: + +`$ {orch-cli} get devworkspaces` +==== + +* You know the relevant {prod-short} user namespace on the cluster. ++ +TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -. Get the `____` of the workspace to stop and the `____`. +* You are on the {prod-short} user namespace on the cluster. ++ +[TIP] +==== +On OpenShift: + +* You can use the `oc` command-line tool to check your current namespace: ++ +`$ oc project` + +* You can switch to your {prod-short} user namespace on a command line if needed: ++ +`$ oc project ____` +==== + +.Procedure -. Run the following command to stop that workspace: +* Run the following command to stop that workspace: + -[source,subs="+attributes"] +[subs="+quotes,attributes"] ---- $ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":false}}' --type=merge -n ____ && \ {orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/____ -n ____ From 69357cff48e805a785a0d5ad202e4e603fa04d70 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Mon, 23 Jan 2023 10:59:27 -0500 Subject: [PATCH 07/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index cf4f277802..8fb3cf0667 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -152,7 +152,7 @@ components: + TIP: For more details, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[devfile v2 documentation]. -. Create a `DevWorkspace` custom resource definition that incorporates the copied devfile contents from the previous step. +. Create a `DevWorkspace` custom resource definition, pasting the devfile contents from the previous step under the `spec.template` field. + .A `DevWorkspace` custom resource definition ==== From 26d921c69a3aee5eb4d3f2b77c7ff4200044eecd Mon Sep 17 00:00:00 2001 From: David Kwon Date: Mon, 23 Jan 2023 10:59:50 -0500 Subject: [PATCH 08/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 8fb3cf0667..f67fbefe40 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -2,7 +2,7 @@ [id="creating-workspaces"] = Creating workspaces -Because workspaces on the {orch-name} cluster are represented by custom resources, and if your use case does not permit use of the {prod-short} dashboard, you can instead create workspaces with {orch-name} APIs by applying custom resources to the cluster. +If your use case does not permit use of the {prod-short} dashboard, you can create workspaces with {orch-name} APIs by applying custom resources to the cluster. [NOTE] ==== From 423486e188fc75243d172505fe9d915c38633078 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Mon, 23 Jan 2023 18:14:23 +0100 Subject: [PATCH 09/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Mario Loriedo --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index f67fbefe40..dc3d1308c2 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -139,7 +139,7 @@ spec: . To prepare the `DevWorkspace` custom resource, copy the contents of the target Git repository's devfile. + -.Copied devfile contents with `schemaVersion: 2.1.0` +.Copied devfile contents with `schemaVersion: 2.2.0` ==== [source,yaml,subs="+quotes,+attributes"] ---- From 66142955b5603197b6144af9103e15d77b19ce5d Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Mon, 23 Jan 2023 18:36:29 +0100 Subject: [PATCH 10/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- .../partials/proc_creating-workspaces.adoc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index dc3d1308c2..68b522511b 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -28,19 +28,6 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your * You are on the {prod-short} user namespace on the cluster. + -[TIP] -==== -On OpenShift: - -* You can use the `oc` command-line tool to check your current namespace: -+ -`$ oc project` - -* You can switch to your {prod-short} user namespace on a command line if needed: -+ -`$ oc project ____` -==== -+ NOTE: {prod-short} administrators who intend to create workspaces for other users must create the `DevWorkspace` and `DevWorkspaceTemplate` custom resources in a user namespace that is provisioned by {prod-short} or by the administrator. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. .Procedure From 5e55b2bf346a1ebed3f47d65bf958d1da960ce78 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Tue, 24 Jan 2023 09:10:18 +0100 Subject: [PATCH 11/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Mario Loriedo --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 68b522511b..2d0ecc00b1 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -139,7 +139,7 @@ components: + TIP: For more details, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[devfile v2 documentation]. -. Create a `DevWorkspace` custom resource definition, pasting the devfile contents from the previous step under the `spec.template` field. +. Create a `DevWorkspace` custom resource, pasting the devfile contents from the previous step under the `spec.template` field. + .A `DevWorkspace` custom resource definition ==== From 3fb9761510f586fde3452c10e0a6b17c2b18e283 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Tue, 24 Jan 2023 09:12:29 +0100 Subject: [PATCH 12/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Mario Loriedo --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 2d0ecc00b1..40b6d3ba56 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -141,7 +141,7 @@ TIP: For more details, see the link:https://devfile.io/docs/2.1.0/what-is-a-devf . Create a `DevWorkspace` custom resource, pasting the devfile contents from the previous step under the `spec.template` field. + -.A `DevWorkspace` custom resource definition +.A `DevWorkspace` custom resource ==== [source,yaml,subs="+quotes,+attributes"] ---- From fbe1c679e85d0ecc69e79c56f98da8f3daea76c4 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 10:45:45 -0500 Subject: [PATCH 13/50] Add new bullet points for benefits of using dashboard Signed-off-by: David Kwon --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 40b6d3ba56..ad7248be3a 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -9,12 +9,14 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea Using the {prod-short} dashboard is the default way to create workspaces because {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster with the following configuration benefits: +* User is already logged into the cluster when accessing the {prod-short} dashboard, allowing workspace resources to be created and accessed in the user's {orch-namespace} * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy specified with `devEnvironments.storage` ** Default IDE specified with `devEnvironments.defaultEditor` ** Default plugins specified with `devEnvironments.defaultPlugins` ** Container build configuration specified with `devEnvironments.containerBuildConfiguration` * Recognition of the `DevWorkspaceOperatorConfig` configuration managed by {prod-short} +* Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace`. ==== @@ -176,7 +178,7 @@ spec: <7> List of components such as workspace containers and volume components. ==== -. Apply the `DevWorkspace` custom resource to the cluster. +. Apply the `DevWorkspace` custom resource to the cluster. . Verify that the workspace is starting by checking the *PHASE* status of the `DevWorkspace`. + From eeaa9cb932489574e1a2c8c68111ba180d3632e7 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 10:53:53 -0500 Subject: [PATCH 14/50] name to lowercase (otherwise the devworkspace cannot be created) Signed-off-by: David Kwon --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index ad7248be3a..a583cd1231 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -155,7 +155,7 @@ metadata: spec: started: true#<3> contributions:#<4> - - name: IDE + - name: ide kubernetes: name: che-code#<5> template: From 8a0d5e8bf2c9cce4bc685fd9e9075b057566ccac Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 10:54:28 -0500 Subject: [PATCH 15/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index a583cd1231..3b39a72d59 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -153,6 +153,7 @@ metadata: name: my-devworkspace#<1> namespace: user1-dev#<2> spec: + routingClass: che started: true#<3> contributions:#<4> - name: ide From 52cad9a61395447f8a475b79b9db26c3a34d3718 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 10:57:37 -0500 Subject: [PATCH 16/50] Make bullet concise Signed-off-by: David Kwon --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 3b39a72d59..6a542a9e89 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -9,7 +9,7 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea Using the {prod-short} dashboard is the default way to create workspaces because {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster with the following configuration benefits: -* User is already logged into the cluster when accessing the {prod-short} dashboard, allowing workspace resources to be created and accessed in the user's {orch-namespace} +* The developer is automatically logged into the {orch-name} cluster * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy specified with `devEnvironments.storage` ** Default IDE specified with `devEnvironments.defaultEditor` From 4657f67231e9e2cfc9f6c269f827182853c9e4b8 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 11:00:00 -0500 Subject: [PATCH 17/50] Small rearranging Signed-off-by: David Kwon --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 6a542a9e89..072163b3f3 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -10,13 +10,13 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea Using the {prod-short} dashboard is the default way to create workspaces because {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster with the following configuration benefits: * The developer is automatically logged into the {orch-name} cluster +* Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace`. * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy specified with `devEnvironments.storage` ** Default IDE specified with `devEnvironments.defaultEditor` ** Default plugins specified with `devEnvironments.defaultPlugins` ** Container build configuration specified with `devEnvironments.containerBuildConfiguration` * Recognition of the `DevWorkspaceOperatorConfig` configuration managed by {prod-short} -* Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace`. ==== From 9175f3a1d074fe6948632cb152ac7db098373883 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 11:03:38 -0500 Subject: [PATCH 18/50] Remove . Signed-off-by: David Kwon --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 072163b3f3..d5da4794db 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -10,7 +10,7 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea Using the {prod-short} dashboard is the default way to create workspaces because {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster with the following configuration benefits: * The developer is automatically logged into the {orch-name} cluster -* Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace`. +* Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace` * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy specified with `devEnvironments.storage` ** Default IDE specified with `devEnvironments.defaultEditor` From 341855563b12296482ab2dbc0fb4f2ee547f0823 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 11:27:19 -0500 Subject: [PATCH 19/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index d5da4794db..9df268fc2e 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -7,7 +7,7 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea [NOTE] ==== -Using the {prod-short} dashboard is the default way to create workspaces because {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster with the following configuration benefits: +Creating new workspaces through the {prod-short} dashboard provides better user experience and configuration benefits compared to using the command line: * The developer is automatically logged into the {orch-name} cluster * Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace` From 8fcd65ba83891e1d441b078b514685c0e22028ed Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 11:27:27 -0500 Subject: [PATCH 20/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 9df268fc2e..c5afd4bee8 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -9,7 +9,9 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea Creating new workspaces through the {prod-short} dashboard provides better user experience and configuration benefits compared to using the command line: -* The developer is automatically logged into the {orch-name} cluster +* As a user, you are automatically logged in to the {orch-name} cluster. +* {platforms-name} clients work automatically. +* {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. * Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace` * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy specified with `devEnvironments.storage` From 831e4ee42c79d7c1508d2292b60352825ced1422 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 12:03:37 -0500 Subject: [PATCH 21/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index c5afd4bee8..f59d3cc720 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -12,7 +12,7 @@ Creating new workspaces through the {prod-short} dashboard provides better user * As a user, you are automatically logged in to the {orch-name} cluster. * {platforms-name} clients work automatically. * {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. -* Secures workspace access by default, using the `routingClass: che` in the workspace's `DevWorkspace` +* Access to the workspace is secured by default with the `routingClass: che` in the `DevWorkspace` of the workspace. * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy specified with `devEnvironments.storage` ** Default IDE specified with `devEnvironments.defaultEditor` From 35459ac3d917281183ff082c456a2c809159ed43 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 12:17:45 -0500 Subject: [PATCH 22/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Angel Misevski --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index f59d3cc720..ec6161e739 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -141,7 +141,7 @@ components: ---- ==== + -TIP: For more details, see the link:https://devfile.io/docs/2.1.0/what-is-a-devfile[devfile v2 documentation]. +TIP: For more details, see the link:https://devfile.io/docs/2.2.0/what-is-a-devfile[devfile v2 documentation]. . Create a `DevWorkspace` custom resource, pasting the devfile contents from the previous step under the `spec.template` field. + From 9aead4c87b5483131cef1e6aa0c9c171d5e46c64 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Tue, 24 Jan 2023 18:26:36 +0100 Subject: [PATCH 23/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Angel Misevski --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index ec6161e739..61672c20c9 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -194,8 +194,8 @@ $ {orch-cli} get devworkspaces -n ____ --watch ==== [subs="+quotes,attributes"] ---- -NAMESPACE NAME DEVWORKSPACE ID PHASE INFO -user1-dev my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment +NAMESPACE NAME DEVWORKSPACE ID PHASE INFO +user1-dev my-devworkspace workspacedf64e4a492cd4701 Starting Waiting for workspace deployment ---- ==== From 5258e15433575f74d0056961c224221d3f4abce3 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Tue, 24 Jan 2023 18:28:19 +0100 Subject: [PATCH 24/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 61672c20c9..f6afd70051 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -206,7 +206,7 @@ user1-dev my-devworkspace workspacedf64e4a492cd4701 Starting Wa [subs="+quotes,attributes"] ---- NAMESPACE NAME DEVWORKSPACE ID PHASE INFO -user1-dev my-devworkspace workspacedf64e4a492cd4701 Running https://url-to-workspace.com +user1-dev my-devworkspace workspacedf64e4a492cd4701 Running https://url-to-workspace.com ---- ==== + From 1f06266efe53c9f8ea17be185ec3dcc032104389 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Tue, 24 Jan 2023 16:29:27 -0500 Subject: [PATCH 25/50] PR feedback update Signed-off-by: David Kwon --- .../partials/proc_creating-workspaces.adoc | 11 +++++++++++ .../partials/proc_listing-workspaces.adoc | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index f6afd70051..a07abf408b 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -180,6 +180,17 @@ spec: <6> Details about the Git repository to clone into the workspace when it starts. <7> List of components such as workspace containers and volume components. ==== ++ +[TIP] +==== +Instead of creating a `DevWorkspaceTemplate` and referencing it in the `spec.contributions` field of the `DevWorkspace`, if the `DevWorkspaceTemplate` is hosted online, you can reference it using a URL. +[source,subs="+quotes,+attributes,+macros"] +---- + contributions: + - name: ide + uri: ____ +---- +==== . Apply the `DevWorkspace` custom resource to the cluster. diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index 70617950b3..b80e394d1f 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -6,7 +6,7 @@ You can list your workspaces on a command line. .Prerequisites -* An active `{orch-cli}` session on the cluster. See {orch-cli-link}. +* An active `{orch-cli}` session with permissions to `get` and `list` `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. * You know the relevant {prod-short} user namespace on the cluster. + From 40cb75c3b816398e9e5f69f21e6d4fba185d7585 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Wed, 25 Jan 2023 11:30:10 -0500 Subject: [PATCH 26/50] Add tip about referencing using IDE devfile Signed-off-by: David Kwon --- .../partials/proc_creating-workspaces.adoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index a07abf408b..80995cabc1 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -36,7 +36,7 @@ NOTE: {prod-short} administrators who intend to create workspaces for other user .Procedure -. Create a `DevWorkspaceTemplate` custom resource for the selected IDE. +. Create a `DevWorkspaceTemplate` custom resource for the selected IDE. The `DevWorkspaceTemplate` is based on the IDE's devfile. + .Creating a `DevWorkspaceTemplate` named `che-code` for the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE ==== @@ -47,7 +47,7 @@ kind: DevWorkspaceTemplate metadata: name: che-code#<1> namespace: user1-dev#<2> -spec: +spec:#<3> commands: - apply: component: vscode-injector @@ -126,6 +126,7 @@ spec: ---- <1> Name of the `DevWorkspaceTemplate` custom resource. This name will be used to reference the `DevWorkspaceTemplate` custom resource within the `DevWorkspace` custom resource. <2> User namespace, which is the target {orch-namespace} for the new workspace. +<3> The `spec` is derived from the `che-code` editor devfile located in `pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml` ==== . To prepare the `DevWorkspace` custom resource, copy the contents of the target Git repository's devfile. @@ -183,12 +184,12 @@ spec: + [TIP] ==== -Instead of creating a `DevWorkspaceTemplate` and referencing it in the `spec.contributions` field of the `DevWorkspace`, if the `DevWorkspaceTemplate` is hosted online, you can reference it using a URL. +Instead of creating a `DevWorkspaceTemplate` and referencing it in the `spec.contributions` field of the `DevWorkspace`, you can reference the IDE devfile in the `DevWorkspace` using a URL. [source,subs="+quotes,+attributes,+macros"] ---- contributions: - name: ide - uri: ____ + uri: pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml ---- ==== From fbf85ac7ece78a192438a4d26a1b8553d0c0b10c Mon Sep 17 00:00:00 2001 From: David Kwon Date: Wed, 25 Jan 2023 12:21:57 -0500 Subject: [PATCH 27/50] Add another tip Signed-off-by: David Kwon --- .../end-user-guide/partials/proc_creating-workspaces.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 80995cabc1..b95356d139 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -184,6 +184,11 @@ spec: + [TIP] ==== +Multiple `DevWorkspace` resources can reference the same `DevWorkspaceTemplate` resource. +==== ++ +[TIP] +==== Instead of creating a `DevWorkspaceTemplate` and referencing it in the `spec.contributions` field of the `DevWorkspace`, you can reference the IDE devfile in the `DevWorkspace` using a URL. [source,subs="+quotes,+attributes,+macros"] ---- @@ -191,6 +196,7 @@ Instead of creating a `DevWorkspaceTemplate` and referencing it in the `spec.con - name: ide uri: pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml ---- +Referencing the IDE using the `pass:c,a,q[{prod-url}]/*` URL automatically updates the IDE when {prod} is updated to a newer version. ==== . Apply the `DevWorkspace` custom resource to the cluster. From 6848da403748d2e36174aaafb7438739af833252 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Wed, 25 Jan 2023 12:25:36 -0500 Subject: [PATCH 28/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Valeriy Svydenko --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index b95356d139..2c9d564e46 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -173,7 +173,7 @@ spec: container: image: quay.io/devfile/universal-developer-image:ubi8-latest ---- -<1> Name of the `DevWorkspace` custom resource. This is will be the name of the new workspace. +<1> Name of the `DevWorkspace` custom resource. This will be the name of the new workspace. <2> User namespace, which is the target {orch-namespace} for the new workspace. <3> Determines whether the workspace must be started when the `DevWorkspace` custom resource is created. <4> Reference to the `DevWorkspaceTemplate` custom resource of the selected IDE. From 4400df3f484ad1cb4c24efc18896fc60bb348dcc Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Thu, 26 Jan 2023 10:19:51 +0100 Subject: [PATCH 29/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- .../partials/proc_creating-workspaces.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 2c9d564e46..3806ea0dbe 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -13,12 +13,12 @@ Creating new workspaces through the {prod-short} dashboard provides better user * {platforms-name} clients work automatically. * {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. * Access to the workspace is secured by default with the `routingClass: che` in the `DevWorkspace` of the workspace. -* Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: -** Persistent storage strategy specified with `devEnvironments.storage` -** Default IDE specified with `devEnvironments.defaultEditor` -** Default plugins specified with `devEnvironments.defaultPlugins` -** Container build configuration specified with `devEnvironments.containerBuildConfiguration` -* Recognition of the `DevWorkspaceOperatorConfig` configuration managed by {prod-short} +* Recognition of the `DevWorkspaceOperatorConfig` configuration is managed by {prod-short}. +* Recognition of configurations in `spec.devEnvironments`is specified in the `CheCluster` custom resource including: +** Persistent storage strategy is specified with `devEnvironments.storage` +** Default IDE is specified with `devEnvironments.defaultEditor` +** Default plugins are specified with `devEnvironments.defaultPlugins` +** Container build configuration is specified with `devEnvironments.containerBuildConfiguration` ==== From 8bb570f661db9621bf4202956b36f7919bbd4611 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Thu, 26 Jan 2023 11:02:44 -0500 Subject: [PATCH 30/50] Reference IDE using devfile url Signed-off-by: David Kwon --- .../pages/managing-workspaces-with-apis.adoc | 2 +- .../partials/proc_creating-workspaces.adoc | 132 ++---------------- 2 files changed, 11 insertions(+), 123 deletions(-) diff --git a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc index d96d0715b8..0d6cb548cc 100644 --- a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc +++ b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc @@ -14,7 +14,7 @@ Because each `DevWorkspace` custom resource on the cluster represents a {prod-sh Each `DevWorkspace` contains details derived from the devfile of the Git repository cloned for the workspace. For example, a devfile might provide devfile commands and workspace container configurations. -Each `DevWorkspace` custom resource also references a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which provides details about the IDE for the workspace. +Each `DevWorkspace` custom resource can reference a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which provides details about the IDE for the workspace. include::partial$proc_listing-workspaces.adoc[leveloffset=+1] diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 3806ea0dbe..6233bd6ca0 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -14,7 +14,7 @@ Creating new workspaces through the {prod-short} dashboard provides better user * {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. * Access to the workspace is secured by default with the `routingClass: che` in the `DevWorkspace` of the workspace. * Recognition of the `DevWorkspaceOperatorConfig` configuration is managed by {prod-short}. -* Recognition of configurations in `spec.devEnvironments`is specified in the `CheCluster` custom resource including: +* Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: ** Persistent storage strategy is specified with `devEnvironments.storage` ** Default IDE is specified with `devEnvironments.defaultEditor` ** Default plugins are specified with `devEnvironments.defaultPlugins` @@ -24,7 +24,7 @@ Creating new workspaces through the {prod-short} dashboard provides better user .Prerequisites -* An active `{orch-cli}` session with permissions to create `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. +* An active `{orch-cli}` session with permissions to create `DevWorkspace` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. * You know the relevant {prod-short} user namespace on the cluster. + @@ -32,103 +32,10 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your * You are on the {prod-short} user namespace on the cluster. + -NOTE: {prod-short} administrators who intend to create workspaces for other users must create the `DevWorkspace` and `DevWorkspaceTemplate` custom resources in a user namespace that is provisioned by {prod-short} or by the administrator. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. +NOTE: {prod-short} administrators who intend to create workspaces for other users must create the `DevWorkspace` custom resource in a user namespace that is provisioned by {prod-short} or by the administrator. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. .Procedure -. Create a `DevWorkspaceTemplate` custom resource for the selected IDE. The `DevWorkspaceTemplate` is based on the IDE's devfile. -+ -.Creating a `DevWorkspaceTemplate` named `che-code` for the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE -==== -[source,yaml,subs="+quotes,+attributes"] ----- -apiVersion: workspace.devfile.io/v1alpha2 -kind: DevWorkspaceTemplate -metadata: - name: che-code#<1> - namespace: user1-dev#<2> -spec:#<3> - commands: - - apply: - component: vscode-injector - id: init-container-command - components: - - container: - command: - - /entrypoint-init-container.sh - cpuLimit: 500m - cpuRequest: 30m - image: 'quay.io/che-incubator/che-code:insiders' - memoryLimit: 128Mi - memoryRequest: 32Mi - sourceMapping: /projects - volumeMounts: - - name: checode - name: vscode-injector - - attributes: - app.kubernetes.io/component: vscode-runtime - app.kubernetes.io/part-of: vscode.eclipse.org - controller.devfile.io/container-contribution: true - container: - cpuRequest: 30m - command: - - /checode/entrypoint-volume.sh - env: - - name: CODE_HOST - value: 0.0.0.0 - memoryRequest: 256Mi - sourceMapping: /projects - cpuLimit: 500m - volumeMounts: - - name: checode - path: /checode - memoryLimit: 1024Mi - image: 'quay.io/che-incubator/che-code:insiders' - endpoints: - - attributes: - cookiesAuthEnabled: true - discoverable: false - type: main - urlRewriteSupported: true - exposure: public - name: che-code - protocol: https - secure: false - targetPort: 3100 - - attributes: - discoverable: false - urlRewriteSupported: true - exposure: public - name: code-redirect-1 - protocol: http - targetPort: 13131 - - attributes: - discoverable: false - urlRewriteSupported: true - exposure: public - name: code-redirect-2 - protocol: http - targetPort: 13132 - - attributes: - discoverable: false - urlRewriteSupported: true - exposure: public - name: code-redirect-3 - protocol: http - targetPort: 13133 - name: vscode-runtime-description - - name: checode - volume: - ephemeral: true - events: - preStart: - - init-container-command ----- -<1> Name of the `DevWorkspaceTemplate` custom resource. This name will be used to reference the `DevWorkspaceTemplate` custom resource within the `DevWorkspace` custom resource. -<2> User namespace, which is the target {orch-namespace} for the new workspace. -<3> The `spec` is derived from the `che-code` editor devfile located in `pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml` -==== - . To prepare the `DevWorkspace` custom resource, copy the contents of the target Git repository's devfile. + .Copied devfile contents with `schemaVersion: 2.2.0` @@ -148,7 +55,7 @@ TIP: For more details, see the link:https://devfile.io/docs/2.2.0/what-is-a-devf + .A `DevWorkspace` custom resource ==== -[source,yaml,subs="+quotes,+attributes"] +[source,yaml,subs="+quotes,+attributes,+macros"] ---- kind: DevWorkspace apiVersion: workspace.devfile.io/v1alpha2 @@ -160,15 +67,14 @@ spec: started: true#<3> contributions:#<4> - name: ide - kubernetes: - name: che-code#<5> + uri: pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml template: - projects:#<6> + projects:#<5> - name: my-project-name git: remotes: origin: https://github.com/eclipse-che/che-docs - components:#<7> + components:#<6> - name: tooling-container container: image: quay.io/devfile/universal-developer-image:ubi8-latest @@ -176,27 +82,9 @@ spec: <1> Name of the `DevWorkspace` custom resource. This will be the name of the new workspace. <2> User namespace, which is the target {orch-namespace} for the new workspace. <3> Determines whether the workspace must be started when the `DevWorkspace` custom resource is created. -<4> Reference to the `DevWorkspaceTemplate` custom resource of the selected IDE. -<5> Name of the `DevWorkspaceTemplate` custom resource from the previous step. -<6> Details about the Git repository to clone into the workspace when it starts. -<7> List of components such as workspace containers and volume components. -==== -+ -[TIP] -==== -Multiple `DevWorkspace` resources can reference the same `DevWorkspaceTemplate` resource. -==== -+ -[TIP] -==== -Instead of creating a `DevWorkspaceTemplate` and referencing it in the `spec.contributions` field of the `DevWorkspace`, you can reference the IDE devfile in the `DevWorkspace` using a URL. -[source,subs="+quotes,+attributes,+macros"] ----- - contributions: - - name: ide - uri: pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml ----- -Referencing the IDE using the `pass:c,a,q[{prod-url}]/*` URL automatically updates the IDE when {prod} is updated to a newer version. +<4> URL reference to the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE devfile from the plugin registry. +<5> Details about the Git repository to clone into the workspace when it starts. +<6> List of components such as workspace containers and volume components. ==== . Apply the `DevWorkspace` custom resource to the cluster. From a2a80fa3fee72530704d018563069763000b0956 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Thu, 26 Jan 2023 14:23:20 -0500 Subject: [PATCH 31/50] Remove DWT details Signed-off-by: David Kwon --- modules/end-user-guide/pages/managing-workspaces-with-apis.adoc | 2 -- modules/end-user-guide/partials/proc_listing-workspaces.adoc | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc index 0d6cb548cc..ba987d97b1 100644 --- a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc +++ b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc @@ -14,8 +14,6 @@ Because each `DevWorkspace` custom resource on the cluster represents a {prod-sh Each `DevWorkspace` contains details derived from the devfile of the Git repository cloned for the workspace. For example, a devfile might provide devfile commands and workspace container configurations. -Each `DevWorkspace` custom resource can reference a `DevWorkspaceTemplate` custom resource using the `spec.contributions` field, which provides details about the IDE for the workspace. - include::partial$proc_listing-workspaces.adoc[leveloffset=+1] include::partial$proc_creating-workspaces.adoc[leveloffset=+1] diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index b80e394d1f..136689cee2 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -6,7 +6,7 @@ You can list your workspaces on a command line. .Prerequisites -* An active `{orch-cli}` session with permissions to `get` and `list` `DevWorkspace` and `DevWorkspaceTemplate` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. +* An active `{orch-cli}` session with permissions to `get` and `list` `DevWorkspace` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. * You know the relevant {prod-short} user namespace on the cluster. + From c372ac7943553ca605913c8dcb4fec208454cd8c Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 10:05:47 +0100 Subject: [PATCH 32/50] Update modules/end-user-guide/partials/proc_listing-workspaces.adoc --- modules/end-user-guide/partials/proc_listing-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index 136689cee2..e4f6a328fb 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -2,7 +2,7 @@ [id="listing-workspaces"] = Listing all workspaces -You can list your workspaces on a command line. +You can list your workspaces by using the command line. .Prerequisites From 8d934d7883498e4c2c3b5cd905a25054be815ebd Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 10:11:48 +0100 Subject: [PATCH 33/50] Update modules/end-user-guide/partials/proc_listing-workspaces.adoc --- modules/end-user-guide/partials/proc_listing-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index e4f6a328fb..9c581a346b 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -6,7 +6,7 @@ You can list your workspaces by using the command line. .Prerequisites -* An active `{orch-cli}` session with permissions to `get` and `list` `DevWorkspace` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. +* An active `{orch-cli}` session with permissions to `get` the `DevWorkspace` resources in your {orch-namespace} on the cluster. See {orch-cli-link}. * You know the relevant {prod-short} user namespace on the cluster. + From 1f90379ada75628483cd43bc4df8d485bbceb927 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 10:26:04 +0100 Subject: [PATCH 34/50] Replace TIP content with a link to OCP docs --- .../partials/proc_listing-workspaces.adoc | 10 +--------- .../partials/proc_removing-workspaces.adoc | 10 +--------- .../partials/proc_starting-stopped-workspaces.adoc | 10 +--------- .../partials/proc_stopping-workspaces.adoc | 9 --------- 4 files changed, 3 insertions(+), 36 deletions(-) diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index 9c581a346b..071a0c5339 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -16,15 +16,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift: - -* You can use the `oc` command-line tool to check your current namespace: -+ -`$ oc project` - -* You can switch to your {prod-short} user namespace on a command line if needed: -+ -`$ oc project ____` +On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. ==== .Procedure diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index cb4589125c..5ab2429e54 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -29,15 +29,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift: - -* You can use the `oc` command-line tool to check your current namespace: -+ -`$ oc project` - -* You can switch to your {prod-short} user namespace on a command line if needed: -+ -`$ oc project ____` +On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. ==== .Procedure diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index 7ee03f9959..b7b8abd2df 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -25,15 +25,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift: - -* You can use the `oc` command-line tool to check your current namespace: -+ -`$ oc project` - -* You can switch to your {prod-short} user namespace on a command line if needed: -+ -`$ oc project ____` +On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. ==== .Procedure diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index 27cbeeb263..82032c2c22 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -25,15 +25,6 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift: - -* You can use the `oc` command-line tool to check your current namespace: -+ -`$ oc project` - -* You can switch to your {prod-short} user namespace on a command line if needed: -+ -`$ oc project ____` ==== .Procedure From 8b3cfb82fb4a1f0c0bfe6e39f18e3e3c25dfc655 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 11:20:58 +0100 Subject: [PATCH 35/50] Update modules/end-user-guide/partials/proc_stopping-workspaces.adoc --- modules/end-user-guide/partials/proc_stopping-workspaces.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index 82032c2c22..88cdd0974d 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -25,6 +25,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== +On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. ==== .Procedure From 7e0a6474fc6c1979243c4c87cdee4d0e7be8a04c Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 11:22:58 +0100 Subject: [PATCH 36/50] Update modules/end-user-guide/partials/proc_stopping-workspaces.adoc --- modules/end-user-guide/partials/proc_stopping-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index 88cdd0974d..e324cb926d 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -35,5 +35,5 @@ On OpenShift, you can use link:https://docs.openshift.com/container-platform/lat [subs="+quotes,attributes"] ---- $ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":false}}' --type=merge -n ____ && \ - {orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/____ -n ____ +{orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/____ -n ____ ---- From d3da857777620e6a8da1f7638691cbd90edcec9e Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 14:16:59 +0100 Subject: [PATCH 37/50] Update modules/end-user-guide/pages/managing-workspaces-with-apis.adoc --- modules/end-user-guide/pages/managing-workspaces-with-apis.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc index ba987d97b1..8e610dd4b5 100644 --- a/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc +++ b/modules/end-user-guide/pages/managing-workspaces-with-apis.adoc @@ -12,7 +12,7 @@ As a result, if there is a workspace named `my-workspace` in the {prod-short} da Because each `DevWorkspace` custom resource on the cluster represents a {prod-short} workspace, you can manage {prod-short} workspaces by using {orch-name} APIs with clients such as the command-line `{orch-cli}`. -Each `DevWorkspace` contains details derived from the devfile of the Git repository cloned for the workspace. For example, a devfile might provide devfile commands and workspace container configurations. +Each `DevWorkspace` custom resource contains details derived from the devfile of the Git repository cloned for the workspace. For example, a devfile might provide devfile commands and workspace container configurations. include::partial$proc_listing-workspaces.adoc[leveloffset=+1] From e8b709196dbd36928ef7d80e8a114d45eca1c9bb Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 14:21:58 +0100 Subject: [PATCH 38/50] Replace TIP content with a link to OCP docs --- modules/end-user-guide/partials/proc_removing-workspaces.adoc | 4 +--- .../partials/proc_starting-stopped-workspaces.adoc | 4 +--- modules/end-user-guide/partials/proc_stopping-workspaces.adoc | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 5ab2429e54..53e56e48e2 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -16,9 +16,7 @@ TIP: Remove workspaces by using the {prod-short} dashboard whenever possible. + [TIP] ==== -You can find the relevant workspace name in the output of the following command: - -`$ {orch-cli} get devworkspaces` +You can find the relevant workspace name in the output of `$ {orch-cli} get devworkspaces`. ==== * You know the relevant {prod-short} user namespace on the cluster. diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index b7b8abd2df..e8477c58ee 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -12,9 +12,7 @@ You can start a stopped workspace by setting the `spec.started` field in the `De + [TIP] ==== -You can find the relevant workspace name in the output of the following command: - -`$ {orch-cli} get devworkspaces` +You can find the relevant workspace name in the output of `$ {orch-cli} get devworkspaces`. ==== * You know the relevant {prod-short} user namespace on the cluster. diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index e324cb926d..c218573d93 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -12,9 +12,7 @@ You can stop a workspace by setting the `spec.started` field in the `Devworkspac + [TIP] ==== -You can find the relevant workspace name in the output of the following command: - -`$ {orch-cli} get devworkspaces` +You can find the relevant workspace name in the output of `$ {orch-cli} get devworkspaces`. ==== * You know the relevant {prod-short} user namespace on the cluster. From da53534a357d7ea09a5cc02a421665edd690c72d Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 14:49:10 +0100 Subject: [PATCH 39/50] Apply suggestions from code review --- .../partials/proc_starting-stopped-workspaces.adoc | 7 +++++-- .../end-user-guide/partials/proc_stopping-workspaces.adoc | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index e8477c58ee..df0e52a80a 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -32,6 +32,9 @@ On OpenShift, you can use link:https://docs.openshift.com/container-platform/lat + [subs="+quotes,attributes"] ---- -$ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":true}}' --type=merge -n ____ && \ - {orch-cli} wait --for=jsonpath='{.status.phase}'=Running dw/____ -n ____ +$ {orch-cli} patch devworkspace ____ \ +-p '{"spec":{"started":true}}' \ +--type=merge -n ____ && \ +{orch-cli} wait --for=jsonpath='{.status.phase}'=Running \ +dw/____ -n ____ ---- diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index c218573d93..aa0c351433 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -32,6 +32,9 @@ On OpenShift, you can use link:https://docs.openshift.com/container-platform/lat + [subs="+quotes,attributes"] ---- -$ {orch-cli} patch devworkspace ____ -p '{"spec":{"started":false}}' --type=merge -n ____ && \ -{orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped dw/____ -n ____ +$ {orch-cli} patch devworkspace ____ \ +-p '{"spec":{"started":false}}' \ +--type=merge -n ____ && \ +{orch-cli} wait --for=jsonpath='{.status.phase}'=Stopped \ +dw/____ -n ____ ---- From ed23189ebc28f7034ea12d01c23017286ca3540c Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 14:59:10 +0100 Subject: [PATCH 40/50] Update modules/end-user-guide/partials/proc_listing-workspaces.adoc --- modules/end-user-guide/partials/proc_listing-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index 071a0c5339..a65f574293 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -2,7 +2,7 @@ [id="listing-workspaces"] = Listing all workspaces -You can list your workspaces by using the command line. +As a user, you can list your workspaces by using the command line. .Prerequisites From 2f2e7b151523eee941822cd7ac6dbbed65e26f93 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 15:10:59 +0100 Subject: [PATCH 41/50] Replace TIP content with a link to OCP docs --- .../partials/proc_creating-workspaces.adoc | 10 +++++----- .../partials/proc_listing-workspaces.adoc | 2 +- .../partials/proc_removing-workspaces.adoc | 2 +- .../partials/proc_starting-stopped-workspaces.adoc | 2 +- .../partials/proc_stopping-workspaces.adoc | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 6233bd6ca0..c23022702e 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -15,10 +15,10 @@ Creating new workspaces through the {prod-short} dashboard provides better user * Access to the workspace is secured by default with the `routingClass: che` in the `DevWorkspace` of the workspace. * Recognition of the `DevWorkspaceOperatorConfig` configuration is managed by {prod-short}. * Recognition of configurations in `spec.devEnvironments` specified in the `CheCluster` custom resource including: -** Persistent storage strategy is specified with `devEnvironments.storage` -** Default IDE is specified with `devEnvironments.defaultEditor` -** Default plugins are specified with `devEnvironments.defaultPlugins` -** Container build configuration is specified with `devEnvironments.containerBuildConfiguration` +** Persistent storage strategy is specified with `devEnvironments.storage`. +** Default IDE is specified with `devEnvironments.defaultEditor`. +** Default plugins are specified with `devEnvironments.defaultPlugins`. +** Container build configuration is specified with `devEnvironments.containerBuildConfiguration`. ==== @@ -30,7 +30,7 @@ Creating new workspaces through the {prod-short} dashboard provides better user + TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -* You are on the {prod-short} user namespace on the cluster. +* You are in the {prod-short} user namespace on the cluster. + NOTE: {prod-short} administrators who intend to create workspaces for other users must create the `DevWorkspace` custom resource in a user namespace that is provisioned by {prod-short} or by the administrator. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index a65f574293..3ad696b545 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -12,7 +12,7 @@ As a user, you can list your workspaces by using the command line. + TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -* You are on the {prod-short} user namespace on the cluster. +* You are in the {prod-short} user namespace on the cluster. + [TIP] ==== diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 53e56e48e2..3cd9e685b1 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -23,7 +23,7 @@ You can find the relevant workspace name in the output of `$ {orch-cli} get devw + TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -* You are on the {prod-short} user namespace on the cluster. +* You are in the {prod-short} user namespace on the cluster. + [TIP] ==== diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index df0e52a80a..032f177107 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -19,7 +19,7 @@ You can find the relevant workspace name in the output of `$ {orch-cli} get devw + TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -* You are on the {prod-short} user namespace on the cluster. +* You are in the {prod-short} user namespace on the cluster. + [TIP] ==== diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index aa0c351433..fb2dca72e6 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -19,7 +19,7 @@ You can find the relevant workspace name in the output of `$ {orch-cli} get devw + TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`. -* You are on the {prod-short} user namespace on the cluster. +* You are in the {prod-short} user namespace on the cluster. + [TIP] ==== From c72a802e8bb7cc969ef41685a4d32a4fba605009 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Fri, 27 Jan 2023 09:37:56 -0500 Subject: [PATCH 42/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc Co-authored-by: Max Leonov --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index c23022702e..952b62842c 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -7,7 +7,7 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea [NOTE] ==== -Creating new workspaces through the {prod-short} dashboard provides better user experience and configuration benefits compared to using the command line: +Creating workspaces through the {prod-short} dashboard provides better user experience and configuration benefits compared to using the command line: * As a user, you are automatically logged in to the {orch-name} cluster. * {platforms-name} clients work automatically. From 7e75ff8d75dd638280eb4d5ffafb7ce556c7c301 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 16:14:41 +0100 Subject: [PATCH 43/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 952b62842c..1226a3ea3a 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -93,7 +93,7 @@ spec: + [subs="+quotes,attributes"] ---- -$ {orch-cli} get devworkspaces -n ____ --watch +$ {orch-cli} get devworkspaces -n ____ --watch ---- + .Output From f70fa09677b3d8d66141cf0524590a0e962c711f Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 16:15:52 +0100 Subject: [PATCH 44/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 1226a3ea3a..b1d3bf5db4 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -118,5 +118,5 @@ user1-dev my-devworkspace workspacedf64e4a492cd4701 Running + You can then open the workspace by using one of these options: + -** Visit the URL provided in the `INFO` section of the output of the `{orch-cli} get devworkspaces` command. +** Visit the URL provided in the *INFO* section of the output of the `{orch-cli} get devworkspaces` command. ** Open the workspace from the {prod-short} dashboard. From a8f2f9f9d527a4fe8e738fcdbcf6a518e9799ca8 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 16:18:48 +0100 Subject: [PATCH 45/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index b1d3bf5db4..372d6a304e 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -9,7 +9,7 @@ If your use case does not permit use of the {prod-short} dashboard, you can crea Creating workspaces through the {prod-short} dashboard provides better user experience and configuration benefits compared to using the command line: -* As a user, you are automatically logged in to the {orch-name} cluster. +* As a user, you are automatically logged in to the cluster. * {platforms-name} clients work automatically. * {prod-short} and its components automatically convert the target Git repository's devfile into the `DevWorkspace` and `DevWorkspaceTemplate` custom resources on the cluster. * Access to the workspace is secured by default with the `routingClass: che` in the `DevWorkspace` of the workspace. From 083152da68a8844ba51f43fe04bb0a6ab333f1c3 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 16:26:24 +0100 Subject: [PATCH 46/50] Apply suggestions from code review --- modules/end-user-guide/partials/proc_listing-workspaces.adoc | 2 +- modules/end-user-guide/partials/proc_removing-workspaces.adoc | 2 +- .../partials/proc_starting-stopped-workspaces.adoc | 2 +- modules/end-user-guide/partials/proc_stopping-workspaces.adoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/end-user-guide/partials/proc_listing-workspaces.adoc b/modules/end-user-guide/partials/proc_listing-workspaces.adoc index 3ad696b545..5057e7e860 100644 --- a/modules/end-user-guide/partials/proc_listing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_listing-workspaces.adoc @@ -16,7 +16,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. +On OpenShift, you can use the command-line `oc` tool to link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[display your current namespace or switch to a namespace]. ==== .Procedure diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 3cd9e685b1..2967b87c43 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -27,7 +27,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. +On OpenShift, you can use the command-line `oc` tool to link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[display your current namespace or switch to a namespace]. ==== .Procedure diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index 032f177107..61de9f0f96 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -23,7 +23,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. +On OpenShift, you can use the command-line `oc` tool to link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[display your current namespace or switch to a namespace]. ==== .Procedure diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index fb2dca72e6..377039c9da 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -23,7 +23,7 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your + [TIP] ==== -On OpenShift, you can use link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[the `oc` command-line tool] to display your current namespace or switch to a namespace. +On OpenShift, you can use the command-line `oc` tool to link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[display your current namespace or switch to a namespace]. ==== .Procedure From 348267696b4009756836bee42c5c18a9f9c29753 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 16:38:48 +0100 Subject: [PATCH 47/50] Apply suggestions from code review --- modules/end-user-guide/partials/proc_removing-workspaces.adoc | 2 +- .../partials/proc_starting-stopped-workspaces.adoc | 2 +- modules/end-user-guide/partials/proc_stopping-workspaces.adoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/end-user-guide/partials/proc_removing-workspaces.adoc b/modules/end-user-guide/partials/proc_removing-workspaces.adoc index 2967b87c43..07494db078 100644 --- a/modules/end-user-guide/partials/proc_removing-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_removing-workspaces.adoc @@ -32,7 +32,7 @@ On OpenShift, you can use the command-line `oc` tool to link:https://docs.opensh .Procedure -* Run the following command to remove the workspace: +* Run the following command to remove a workspace: + [subs="+quotes,attributes"] ---- diff --git a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc index 61de9f0f96..2472b238c4 100644 --- a/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_starting-stopped-workspaces.adoc @@ -28,7 +28,7 @@ On OpenShift, you can use the command-line `oc` tool to link:https://docs.opensh .Procedure -* Run the following command to start the stopped workspace: +* Run the following command to start a stopped workspace: + [subs="+quotes,attributes"] ---- diff --git a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc index 377039c9da..13798ae00c 100644 --- a/modules/end-user-guide/partials/proc_stopping-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_stopping-workspaces.adoc @@ -28,7 +28,7 @@ On OpenShift, you can use the command-line `oc` tool to link:https://docs.opensh .Procedure -* Run the following command to stop that workspace: +* Run the following command to stop a workspace: + [subs="+quotes,attributes"] ---- From 4b8680aa8391168d2e58dd999ef6c32054e1c660 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 17:57:11 +0100 Subject: [PATCH 48/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 372d6a304e..18a188ef9b 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -89,6 +89,7 @@ spec: . Apply the `DevWorkspace` custom resource to the cluster. +.Verification . Verify that the workspace is starting by checking the *PHASE* status of the `DevWorkspace`. + [subs="+quotes,attributes"] From 608de9313fc0a0fb2f18cd19b5e28d7fa8e2d747 Mon Sep 17 00:00:00 2001 From: Max Leonov Date: Fri, 27 Jan 2023 18:04:15 +0100 Subject: [PATCH 49/50] Update modules/end-user-guide/partials/proc_creating-workspaces.adoc --- .../end-user-guide/partials/proc_creating-workspaces.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 18a188ef9b..76652778f6 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -32,6 +32,11 @@ TIP: You can visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your * You are in the {prod-short} user namespace on the cluster. + +[TIP] +==== +On OpenShift, you can use the command-line `oc` tool to link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-project[display your current namespace or switch to a namespace]. +==== ++ NOTE: {prod-short} administrators who intend to create workspaces for other users must create the `DevWorkspace` custom resource in a user namespace that is provisioned by {prod-short} or by the administrator. See xref:administration-guide:configuring-namespace-provisioning.adoc[]. .Procedure From 8dcd2bc2cc176e31c189bc32c9c3be537367d449 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Fri, 27 Jan 2023 16:53:20 -0500 Subject: [PATCH 50/50] Remove /main from url path Signed-off-by: David Kwon --- modules/end-user-guide/partials/proc_creating-workspaces.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/end-user-guide/partials/proc_creating-workspaces.adoc b/modules/end-user-guide/partials/proc_creating-workspaces.adoc index 76652778f6..09747814dc 100644 --- a/modules/end-user-guide/partials/proc_creating-workspaces.adoc +++ b/modules/end-user-guide/partials/proc_creating-workspaces.adoc @@ -72,7 +72,7 @@ spec: started: true#<3> contributions:#<4> - name: ide - uri: pass:c,a,q[{prod-url}]/plugin-registry/main/v3/plugins/che-incubator/che-code/insiders/devfile.yaml + uri: pass:c,a,q[{prod-url}]/plugin-registry/v3/plugins/che-incubator/che-code/insiders/devfile.yaml template: projects:#<5> - name: my-project-name