Skip to content

Commit 827b4d0

Browse files
authored
removed references to che from devfile docs (#29)
omitted eclipse references fixed typo and omitted unneeded lines added needed context ascii changes Co-authored-by: jc-berger <>
1 parent adac3e8 commit 827b4d0

9 files changed

+39
-68
lines changed

docs/modules/user-guide/partials/proc_adding-a-name-to-a-devfile.adoc

+6-12
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,33 @@ Adding a name to a devfile is mandatory. Both `name` and `generateName` are opti
1010

1111
.Procedure
1212

13-
. To specify a static name for the workspace, define the `name` attribute.
13+
. To specify a static name for the workspace, define the `name` attribute.
1414
+
1515
.Adding a static name to a devfile
16-
====
16+
1717
[source,yaml]
1818
----
1919
schemaVersion: 2.0.0
2020
metadata:
2121
name: devfile-sample
2222
----
23-
====
2423

25-
. To specify a prefix for automatically generated workspace names, define the `generateName` attribute and don't define the `name` attribute. The workspace name will be in the `<generateName>YYYYY` format (for example, `che-2y7kp`). `Y` is random `[a-z0-9]` character.
24+
. To specify a prefix for automatically generated workspace names, define the `generateName` attribute and don't define the `name` attribute. The workspace name will be in the `<generateName>YYYYY` format (for example, `devfile-sample-2y7kp`). `Y` is random `[a-z0-9]` character.
2625
+
2726
.Adding a generated name to a devfile
28-
====
27+
2928
[source,yaml]
3029
----
3130
schemaVersion: 2.0.0
3231
metadata:
33-
generateName: che-
32+
generateName: devfile-sample-
3433
----
35-
====
36-
3734

3835
[NOTE]
39-
====
40-
For workspaces created using a factory, defining `name` or `generateName` has the same effect. The defined value is used as the name prefix: `<name>YYYYY` or `<generateName>YYYYY`. When both `generateName` and `name` are defined, `generateName` takes precedence.
41-
====
4236

37+
For workspaces created using a factory, defining `name` or `generateName` has the same effect. The defined value is used as the name prefix: `<name>YYYYY` or `<generateName>YYYYY`. When both `generateName` and `name` are defined, `generateName` takes precedence.
4338

4439
[role="_additional-resources"]
4540
.Additional resources
4641

4742
* xref:api-reference.adoc[]
48-

docs/modules/user-guide/partials/proc_adding-commands-to-a-devfile.adoc

+12-26
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ A devfile allows to specify commands to be available for execution in a workspac
2020
. For each command, define a mandatory type of one of the following types: `exec` or `vscode-tasks`.
2121
+
2222
.Sample command
23-
====
2423
[source,yaml]
2524
----
2625
commands:
@@ -30,14 +29,12 @@ A devfile allows to specify commands to be available for execution in a workspac
3029
commandLine: mvn clean
3130
workingDir: /projects/spring-petclinic
3231
----
33-
====
3432

3533
. Define attributes for the `exec` command to run using the default shell in the container.
3634
+
3735
* A `commandLine` attribute that is a command to execute.
3836
* A `component` attribute that specifies the container in which to execute the command.
3937
+
40-
====
4138
[source,yaml]
4239
----
4340
schemaVersion: 2.0.0
@@ -58,31 +55,28 @@ components:
5855
command: ['sleep', 'infinity']
5956
env:
6057
- name: GOPATH
61-
value: $(CHE_PROJECTS_ROOT)/go
58+
value: $(PROJECTS_ROOT)/go
6259
- name: GOCACHE
6360
value: /tmp/go-cache
6461
commands:
6562
- id: compile and run
6663
exec:
6764
component: go-cli
68-
commandLine: go get -d && go run main.go
69-
workingDir: “${CHE_PROJECTS_ROOT}/src/github.com/acme/my-go-project
65+
commandLine: "go get -d && go run main.go"
66+
workingDir: "${PROJECTS_ROOT}/src/github.com/acme/my-go-project"
7067
runAsUser: root
7168
----
72-
====
7369
+
7470
[NOTE]
75-
====
76-
* Any component on which commands are executed must define a `name` attribute. This name is used to reference the component in the command definition. Example: `name: go-cli` in the component definition and `component: go-cli` in the command definition. This ensures that {che-prod} can find the correct container to run the command in.
71+
72+
* Any component on which commands are executed must define a `name` attribute. This name is used to reference the component in the command definition. Example: `name: go-cli` in the component definition and `component: go-cli` in the command definition.
7773

7874
* A command can have only one action, though you can use `composite` commands to execute several commands either sequentially or in parallel.
79-
====
8075

8176
. Define attributes for the `vscode-task` or `vscode-launch` command to run using the Editor.
8277
+
83-
If the editor in the workspace supports it, the devfile can specify additional configuration in the editor-specific format. This is dependent on the integration code present in the workspace editor itself and so is not a generic mechanism. However, the default Che-Theia editor within {che-prod} is equipped to understand the `tasks.json` and `launch.json` files provided in the devfile.
78+
If the editor in the workspace supports it, the devfile can specify additional configuration in the editor-specific format. This is dependent on the integration code present in the workspace editor itself and so is not a generic mechanism.
8479
+
85-
====
8680
[source,yaml]
8781
----
8882
schemaVersion: 2.0.0
@@ -111,14 +105,12 @@ commands:
111105
}
112106
----
113107

114-
This example shows association of a `tasks.json` file with a devfile. Notice the `vscode-task` type that instructs the Che-Theia editor to interpret this command as a tasks definition and `referenceContent` attribute that contains the contents of the file itself. You can also save this file separately from the devfile and use `reference` attribute to specify a relative or absolute URL to it.
115-
====
108+
This example shows association of a `tasks.json` file with a devfile. Notice the `vscode-task` type that instructs the editor to interpret this command as a tasks definition and `referenceContent` attribute that contains the contents of the file itself. You can also save this file separately from the devfile and use `reference` attribute to specify a relative or absolute URL to it.
116109

117110
. Command group
118111
+
119112
A given command can be assigned to one or more groups that represents the nature of the command. The support groups are: `build`, `run`, `test` and `debug`. For each of the groups, one default command can be defined in each group by specifying the `isDefault` value.
120113
+
121-
====
122114
[source,yaml]
123115
----
124116
schemaVersion: 2.0.0
@@ -140,24 +132,22 @@ commands:
140132
- id: package
141133
exec:
142134
component: maven
143-
commandLine: mvn package
135+
commandLine: "mvn package"
144136
group:
145137
kind: build
146138
- id: install
147139
exec:
148140
component: maven
149-
commandLine: mvn install
141+
commandLine: "mvn install"
150142
group:
151143
kind: build
152144
isDefault: true
153145
----
154-
====
155146

156147
. Composite command
157148
+
158149
A composite command can be defined to chain multiple commands together. The individual commands that are called from a composite command can be referenced by the `name` of the command. A `parallel` boolean can be specified to determine if the commands within a composite command are being executed sequentially or in parallel.
159150
+
160-
====
161151
[source,yaml]
162152
----
163153
schemaVersion: 2.0.0
@@ -179,13 +169,13 @@ commands:
179169
- id: package
180170
exec:
181171
component: maven
182-
commandLine: mvn package
172+
commandLine: "mvn package"
183173
group:
184174
kind: build
185175
- id: install
186176
exec:
187177
component: maven
188-
commandLine: mvn install
178+
commandLine: "mvn install"
189179
group:
190180
kind: build
191181
isDefault: true
@@ -196,13 +186,11 @@ commands:
196186
- package
197187
parallel: false
198188
----
199-
====
200189

201190
. Command preview URL
202191
+
203192
It is possible to specify a preview URL for commands that expose web UI. This URL is offered for opening when the command is executed.
204193
+
205-
====
206194
[source,yaml]
207195
----
208196
commands:
@@ -213,14 +201,12 @@ commands:
213201
path: /myweb <2>
214202
component: go-cli
215203
commandLine: "go run webserver.go"
216-
workingDir: ${CHE_PROJECTS_ROOT}/webserver
204+
workingDir: ${PROJECTS_ROOT}/webserver
217205
----
218206
<1> TCP port where the application listens. Mandatory parameter.
219207
<2> The path part of the URL to the UI. Optional parameter. The default is root (`/`).
220208

221209
The example above opens `++http://__<server-domain>__/myweb++`, where `_<server-domain>_` is the URL to the dynamically created Kubernetes Ingress or OpenShift Route.
222-
====
223-
224210

225211
[role="_additional-resources"]
226212
.Additional resources

docs/modules/user-guide/partials/proc_adding-container-component-to-a-devfile.adoc

+1-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ A component type that allows to define a container image-based configuration of
1515
. Define a component using the type `container`.
1616
+
1717
.A `container` component
18-
====
1918
[source,yaml]
2019
----
2120
components:
@@ -41,10 +40,8 @@ A component type that allows to define a container image-based configuration of
4140
command: ['tail']
4241
args: ['-f', '/dev/null']
4342
----
44-
====
4543
+
4644
.A minimal `container` component*
47-
====
4845
[source,yaml]
4946
----
5047
schemaVersion: 2.0.0
@@ -57,7 +54,6 @@ components:
5754
memoryLimit: 512Mi
5855
command: ['sleep', 'infinity']
5956
----
60-
====
6157
+
6258
It specifies the type of the component, `container` and the `image` attribute names the image to be used for the component using the usual Docker naming conventions, that is, the above `image` attribute is equal to `docker.io/library/golang:latest`.
6359
+
@@ -67,7 +63,6 @@ A `container` component has many features that enable augmenting the image with
6763
+
6864
For the `container` component to have access to the project sources, you must set the `mountSources` attribute to `true`.
6965
+
70-
====
7166
[source,yaml]
7267
----
7368
schemaVersion: 2.0.0
@@ -81,9 +76,8 @@ components:
8176
mountSources: true
8277
command: ['sleep', 'infinity']
8378
----
84-
====
8579
+
86-
The sources is mounted on a location stored in the `CHE_PROJECTS_ROOT` environment variable that is made available in the running container of the image. This location defaults to `/projects`. If `sourceMapping` is defined in the container, it overrides the 'CHE_PROJECT_ROOT' value if present and mounts the source to the path defined by `sourceMapping`.
80+
The sources is mounted on a location stored in the `PROJECTS_ROOT` environment variable that is made available in the running container of the image. This location defaults to `/projects`. If `sourceMapping` is defined in the container, it overrides the 'PROJECT_ROOT' value if present and mounts the source to the path defined by `sourceMapping`.
8781

8882
. Container Entrypoint
8983
+

docs/modules/user-guide/partials/proc_adding-plugin-component-to-a-devfile.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This section describes how to add a `plugin` component to a devfile.
2323
components:
2424
- name: exec-plugin
2525
plugin:
26-
id: eclipse/che-machine-exec-plugin/0.0.1
26+
id: machine-exec-plugin/0.0.1
2727
----
2828
====
2929

@@ -36,7 +36,7 @@ This section describes how to add a `plugin` component to a devfile.
3636
components:
3737
- name: exec-plugin
3838
plugin:
39-
id: eclipse/che-machine-exec-plugin/0.0.1
39+
id: machine-exec-plugin/0.0.1
4040
registryUrl: https://my-customregistry.com
4141
----
4242
====

docs/modules/user-guide/partials/proc_defining-endpoints.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ components:
3030
command: ['sleep', 'infinity']
3131
env:
3232
- name: GOPATH
33-
value: $(CHE_PROJECTS_ROOT)/go
33+
value: $(PROJECTS_ROOT)/go
3434
- name: GOCACHE
3535
value: /tmp/go-cache
3636
endpoints:

docs/modules/user-guide/partials/proc_defining-environment-variables.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ components:
2525
command: ['sleep', 'infinity']
2626
env:
2727
- name: GOPATH
28-
value: $(CHE_PROJECTS_ROOT)/go
28+
value: $(PROJECTS_ROOT)/go
2929
----
3030
====
3131

@@ -55,4 +55,3 @@ metadata:
5555
5656
* The predefined variables are available for use in custom definitions.
5757
====
58-

docs/modules/user-guide/partials/proc_limiting-resources-usage.adoc

+11-12
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To specify a container(s) memory limit for `container`, `plugin`, use the `memor
1717
components:
1818
- name: exec-plugin
1919
plugin:
20-
id: eclipse/che-machine-exec-plugin/0.0.1
20+
id: eclipse/machine-exec-plugin/0.0.1
2121
memoryLimit: 1Gi
2222
- name: maven
2323
container:
@@ -30,8 +30,6 @@ This limit will be applied to every container of the given component.
3030
+
3131
For `plugin` components, RAM limits can be described in the plug-in descriptor file, typically named `meta.yaml`.
3232
+
33-
If none of them are specified, system-wide defaults will be applied (see description of `pass:[CHE_WORKSPACE_SIDECAR_DEFAULT__MEMORY__LIMIT__MB]` system property).
34-
3533

3634
. Specify container memory request for components
3735
+
@@ -44,7 +42,7 @@ To specify a container(s) memory request for `plugin` use the `memoryRequest` pa
4442
components:
4543
- name: exec-plugin
4644
plugin:
47-
id: eclipse/che-machine-exec-plugin/0.0.1
45+
id: eclipse/machine-exec-plugin/0.0.1
4846
memoryLimit: 1Gi
4947
memoryRequest: 512M
5048
- name: maven
@@ -59,8 +57,8 @@ This limit will be applied to every container of the given component.
5957
+
6058
For `plugin` components, RAM requests can be described in the plug-in descriptor file, typically named `meta.yaml`.
6159
+
62-
If none of them are specified, system-wide defaults are applied (see description of `pass:[CHE_WORKSPACE_SIDECAR_DEFAULT__MEMORY__REQUEST__MB]` system property).
63-
60+
If they are not specified, the values are undetermined: they may or may not be inferred from the application that consumes the devfile or from Kubernetes.
61+
+
6462

6563
. Specify container CPU limit for components
6664
+
@@ -73,7 +71,7 @@ To specify a container(s) CPU limit for `plugin` or `container` use the `cpuLimi
7371
components:
7472
- name: exec-plugin
7573
plugin:
76-
id: eclipse/che-machine-exec-plugin/0.0.1
74+
id: eclipse/machine-exec-plugin/0.0.1
7775
cpuLimit: 1.5
7876
- name: maven
7977
container:
@@ -86,8 +84,8 @@ This limit will be applied to every container of the given component.
8684
+
8785
For the `plugin` components, CPU limits can be described in the plug-in descriptor file, typically named `meta.yaml`.
8886
+
89-
If none of them are specified, system-wide defaults are applied (see description of `pass:[CHE_WORKSPACE_SIDECAR_DEFAULT__CPU__LIMIT__CORES]` system property).
90-
87+
If they are not specified, the values are undetermined: they may or may not be inferred from the application that consumes the devfile or from Kubernetes.
88+
+
9189

9290
. Specify container CPU request for components
9391
+
@@ -100,7 +98,7 @@ To specify a container(s) CPU request for `plugin` or `container` use the `cpuRe
10098
components:
10199
- name: exec-plugin
102100
plugin:
103-
id: eclipse/che-machine-exec-plugin/0.0.1
101+
id: eclipse/machine-exec-plugin/0.0.1
104102
cpuLimit: 1.5
105103
cpuRequest: 0.225
106104
- name: maven
@@ -113,6 +111,7 @@ To specify a container(s) CPU request for `plugin` or `container` use the `cpuRe
113111
+
114112
This limit will be applied to every container of the given component.
115113
+
116-
For the `pugin` component type, CPU requests can be described in the plug-in descriptor file, typically named `meta.yaml`.
114+
For the `plugin` component type, CPU requests can be described in the plug-in descriptor file, typically named `meta.yaml`.
115+
+
116+
If they are not specified, the values are undetermined: they may or may not be inferred from the application that consumes the devfile or from Kubernetes.
117117
+
118-
If none of them are specified, system-wide defaults are applied (see description of `pass:[CHE_WORKSPACE_SIDECAR_DEFAULT__CPU__REQUEST__CORES]` system property).

docs/modules/user-guide/partials/proc_migrating-schema-version.adoc

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ This section describes how to migrate schema version.
1010

1111
[cols="1a,1a"]
1212
|====
13-
|
13+
|
1414
[source,yaml]
1515
----
1616
v1.0
1717
---
1818
apiVersion: 1.0.0
1919
metadata:
20-
name: che-in-che-out
20+
name: devfile-sample
2121
----
2222
|
2323
[source,yaml]
@@ -26,7 +26,7 @@ v2.0
2626
---
2727
schemaVersion: 2.0.0
2828
metadata:
29-
name: che-in-che-out
29+
name: devfile-sample
3030
----
3131
|====
3232

@@ -35,4 +35,3 @@ metadata:
3535
[role="_additional-resources"]
3636
.Additional resources
3737
* See link:https://github.com/che-incubator/devworkspace-api/issues/7[corresponding issue]
38-

0 commit comments

Comments
 (0)