Skip to content

Commit

Permalink
feat: Adapt doc to CheCluster API V2 (#2366)
Browse files Browse the repository at this point in the history
* feat: Adopt doc to CheCluster API V2

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>
  • Loading branch information
tolusha and themr0c committed Sep 5, 2022
1 parent ecc99d1 commit c724c2a
Show file tree
Hide file tree
Showing 22 changed files with 243 additions and 264 deletions.
4 changes: 3 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# The relative path to the folder containing linting rules (styles).
StylesPath = .vale/styles

# Packages to download with `vale sync`. See https://vale.sh/docs/topics/packages/
Packages = RedHat.zip, https://github.com/eclipse-che/che-docs-vale-style/releases/latest/download/CheDocs.zip

# Minimum alert level
# -------------------
# The minimum alert level in the output (suggestion, warning, or error).
Expand Down Expand Up @@ -54,4 +57,3 @@ RedHat.ConfigMap = NO
RedHat.Slash = NO
RedHat.Spacing = NO
RedHat.Spelling = NO

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Eclipse Che documentation project
[![Contribute](https://www.eclipse.org/che/contribute.svg)](https://workspaces.openshift.com/f?url=https://github.com/eclipse/che-docs)

[![Contribute](https://img.shields.io/static/v1?label=open%20with&message=che-code&logo=eclipseche&color=FDB940&labelColor=525C86)](https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/#https://github.com/eclipse-che/che-docs?df=devfilev2.yaml)
[![Contribute](https://img.shields.io/static/v1?label=open%20with&message=che-code&logo=eclipseche&color=FDB940&labelColor=525C86)](https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/#https://github.com/eclipse-che/che-docs)

This repository contains sources for the [documentation for Eclipse Che](https://www.eclipse.org/che/docs/). To contribute to the documentation, see the [Contribution guide](CONTRIBUTING.adoc). We love pull requests and appreciate contributions that make docs more helpful for users.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ EOF
echo "Creating the 'che-operator-cr-patch.yaml' file locally."
cat > che-operator-cr-patch.yaml << EOF
kind: CheCluster
apiVersion: org.eclipse.che/v1
apiVersion: org.eclipse.che/v2
spec:
server:
airGapContainerRegistryHostname: "$my_registry"
airGapContainerRegistryOrganization: "${my_catalog}"
containerRegistry:
hostname: "$my_registry"
organization: "${my_catalog}"
EOF

echo "Removing index image from mappings.txt to prepare mirroring."
Expand Down
283 changes: 126 additions & 157 deletions modules/administration-guide/examples/checluster-properties.adoc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,40 @@
This section describes all fields available to customize the `CheCluster` Custom Resource.

* xref:a-minimal-checluster-custom-resource-example_{context}[]
* xref:checluster-custom-resource-server-settings_{context}[]
* xref:checluster-custom-resource-database-settings_{context}[]
* xref:checluster-custom-resource-auth-settings_{context}[]
* xref:checluster-custom-resource-storage-settings_{context}[]
* xref:checluster-custom-resource-k8s-settings_{context}[]
* xref:checluster-custom-resource-metrics-settings_{context}[]
* xref:checluster-custom-resource-devEnvironments-settings_{context}[]
* xref:checluster-custom-resource-components-settings_{context}[]
* xref:checluster-custom-resource-components-properties-devWorkspace-settings_{context}[]
* xref:checluster-custom-resource-components-properties-cheServer-settings_{context}[]
* xref:checluster-custom-resource-components-properties-pluginRegistry-settings_{context}[]
* xref:checluster-custom-resource-components-properties-devfileRegistry-settings_{context}[]
* xref:checluster-custom-resource-components-properties-database-settings_{context}[]
* xref:checluster-custom-resource-components-properties-dashboard-settings_{context}[]
* xref:checluster-custom-resource-components-properties-imagePuller-settings_{context}[]
* xref:checluster-custom-resource-components-properties-metrics-settings_{context}[]
* xref:checluster-custom-resource-networking-settings_{context}[]
* xref:checluster-custom-resource-containerRegistry-settings_{context}[]
* xref:checluster-custom-resource-status-settings_{context}[]

[id="a-minimal-checluster-custom-resource-example_{context}"]
.A minimal `CheCluster` Custom Resource example.
====
[source,yaml,subs="+quotes,+attributes"]
----
apiVersion: org.eclipse.che/v1
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
name: {prod-checluster}
spec:
auth:
externalIdentityProvider: false
database:
externalDb: false
server:
selfSignedCert: false
gitSelfSignedCert: false
tlsSupport: true
storage:
pvcStrategy: 'common'
pvcClaimSize: '1Gi'
devEnvironments:
defaultNamespace:
template: '<username>-che'
storage:
pvcStrategy: 'common'
components:
database:
externalDb: false
metrics:
enable: true
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
[subs="+quotes,+attributes"]
----
spec:
server:
cheHost: <hostname> <1>
cheHostTLSSecret: <secret> <2>
networking:
hostname: <hostname> <1>
tlsSecretName: <secret> <2>
----
<1> Custom {prod} server hostname
<2> The TLS secret name
Expand Down
11 changes: 6 additions & 5 deletions modules/administration-guide/pages/configuring-ingresses.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ You can configure {orch-ingress} labels and annotations, if your organization re
[source,yaml,subs="+quotes,+attributes"]
----
spec:
server:
cheServerIngress:
components:
cheServer:
extraProperties:
CHE_INFRA_KUBERNETES_INGRESS_LABELS: __<labels>__ <1>
CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS______JSON: "__<annotations>__" <2>
networking:
labels: __<labels>__ <1>
annotations: __<annotations>__ <2>
customCheProperties:
CHE_INFRA_KUBERNETES_INGRESS_LABELS: __<labels>__ <1>
CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS______JSON: "__<annotations>__" <2>
----
<1> A comma-separated list of labels for {orch-ingress}: `key1=value1,key2=value2`.
<2> Annotations for {orch-ingress} in JSON format: `{"key1": "value1", "key2" : "value2"}`.
Expand Down
19 changes: 9 additions & 10 deletions modules/administration-guide/pages/configuring-routes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ You can configure labels, annotations, and domains for OpenShift Route to work w
[source,yaml,subs="+quotes"]
----
spec:
server:
cheServerRoute:
labels: <labels> <1>
domain: <domain> <2>
annotations: <3>
key1: value1
key2: value2
customCheProperties:
CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <labels> <1>
CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <domain> <2>
components:
cheServer:
extraProperties:
CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <labels> <1>
CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <domain> <2>
networking:
labels: __<labels>__ <1>
domain: __<domain>__ <2>
annotations: __<annotations>__ <3>
----
<1> A comma-separated list of labels that the target ingress controller uses to filter the set of Routes to service.
<2> The DNS name serviced by the target ingress controller.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ The default installation enables the administrative privileges for the `admin` u
[source,yaml,subs="+attributes,+quotes,macros"]
----
spec:
server:
customCheProperties:
pass:[CHE_SYSTEM_ADMIN__NAME]: '__<admin>__'
components:
cheServer:
extraProperties:
pass:[CHE_SYSTEM_ADMIN__NAME]: '__<admin>__'
----

.Additional resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ A valid {orch-namespace} name template follows these conventions:
[source,yaml,subs="+quotes,+attributes"]
----
spec:
server:
workspaceNamespaceDefault: __<workspace_namespace_template_>__
components:
devEnvironments:
defaultNamespace:
template: __<workspace_namespace_template_>__
----
+
.User workspaces {orch-namespace} name template examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ Set the telemetry plug-in as a default plug-in. Default plug-ins are applied on
+
----
spec:
server:
workspacesDefaultPlugins:
devEnvironments:
defaultPlugins:
- editor: eclipse/che-theia/next <1>
plugins: <2>
- 'http://apache-che.apps-crc.testing/plugin.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ $ {orch-cli} label configmap che-git-self-signed-cert \
[source,yaml,subs="+attributes"]
----
spec:
server:
gitSelfSignedCert: true
devEnvironments:
trustedCerts:
gitTrustedCertsConfigMapName: che-git-self-signed-cert
----

.Verification steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ Use CheCluster Custom Resource definition to define storage classes:
[source,yaml,subs="+quotes,+attributes"]
----
spec:
storage:
# keep blank unless you need to use a non default storage class for PostgreSQL PVC
postgresPVCStorageClassName: 'postgres-storage'
# keep blank unless you need to use a non default storage class for workspace PVC(s)
workspacePVCStorageClassName: 'workspace-storage'
components:
database:
pvc:
# keep blank unless you need to use a non default storage class for PostgreSQL PVC
storageClass: 'postgres-storage'
devEnvironments:
storage:
pvc:
# keep blank unless you need to use a non default storage class for workspace PVC(s)
storageClass: 'workspace-storage'
----

. Define the persistent volume for a PostgreSQL database in a `che-postgres-pv.yaml` file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ To enable the Woopra plug-in on the {prod} installation:
[source,yaml]
----
spec:
server:
workspacesDefaultPlugins:
devEnvironments:
defaultPlugins:
- editor: eclipse/che-theia/next <1>
plugins: <2>
- 'https://your-web-server/plugin.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

A default deployment of {prod-short} consists of a `CheCluster` Custom Resource parameterized by the {prod} Operator.

The `CheCluster` Custom Resource is a {kubernetes} object. You can configure it by editing the `CheCluster` Custom Resource YAML file. This file contains sections to configure each component: `auth`, `database`, `server`, `storage`.
The `CheCluster` Custom Resource is a {kubernetes} object. You can configure it by editing the `CheCluster` Custom Resource YAML file. This file contains sections to configure each component: `devWorkspace`, `cheServer`, `pluginRegistry`, `devfileRegistry`, `database`, `dashboard` and `imagePuller`.

The {prod} Operator translates the `CheCluster` Custom Resource into a config map usable by each component of the {prod-short} installation.

The {orch-name} platform applies the configuration to each component, and creates the necessary Pods. When {orch-name} detects changes in the configuration of a component, it restarts the Pods accordingly.

.Configuring the main properties of the {prod-short} server component
====
. Apply the `CheCluster` Custom Resource YAML file with suitable modifications in the `server` component section.
. Apply the `CheCluster` Custom Resource YAML file with suitable modifications in the `cheServer` component section.
. The Operator generates the `che` `ConfigMap`.
. {orch-name} detects changes in the `ConfigMap` and triggers a restart of the {prod-short} Pod.
====
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
[source,yaml]
----
spec:
server:
customCheProperties:
CHE_LOGGER_CONFIG: "che.infra.request-logging=TRACE"
components:
cheServer:
extraProperties:
CHE_LOGGER_CONFIG: "che.infra.request-logging=TRACE"
----

.Additional resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ map of additional environment variables to apply to the {prod-short} server comp
[source,yaml,subs="+quotes,+attributes,+macros"]
----
spec:
server:
customCheProperties:
pass:[CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB]: "2048"
components:
cheServer:
extraProperties:
pass:[CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB]: "2048"
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
[source,yaml,subs="+attributes,+quotes"]
----
spec:
server:
customCheProperties:
CHE_LOGGER_CONFIG: "__<key1=value1,key2=value2>__" <1>
components:
cheServer:
extraProperties:
CHE_LOGGER_CONFIG: "__<key1=value1,key2=value2>__" <1>
----
<1> Comma-separated list of key-value pairs, where keys are the names of the loggers as seen
in the {prod-short} server log output and values are the required log levels.
Expand All @@ -22,9 +23,10 @@ in the {prod-short} server log output and values are the required log levels.
[source,yaml]
----
spec:
server:
customCheProperties:
CHE_LOGGER_CONFIG: "org.eclipse.che.api.workspace.server.WorkspaceManager=DEBUG"
components:
cheServer:
extraProperties:
CHE_LOGGER_CONFIG: "org.eclipse.che.api.workspace.server.WorkspaceManager=DEBUG"
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ You can configure this behaviour.
[source,yaml,subs="+attributes,+quotes"]
----
spec:
metrics:
enable: __<boolean>__ <1>
components:
metrics:
enable: __<boolean>__ <1>
----
<1> `true` to enable, `false` to disable.
2 changes: 1 addition & 1 deletion modules/hosted-che/partials/proc_providing-a-devfile.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
Providing a link:https://devfile.io/[devfile] in the root directory of the repository is recommended to define the development environment of the workspace created by the factory URL.
In this way, the workspace contains everything users need to review pull requests, such as plug-ins, development commands, and other environment setup.

The link:https://github.com/eclipse/che-docs/blob/main/devfilev2.yaml[Che documentation repository devfile] is an example of a well-defined and effective devfile.
The link:https://github.com/eclipse/che-docs/blob/main/devfile.yaml[Che documentation repository devfile] is an example of a well-defined and effective devfile.
Loading

0 comments on commit c724c2a

Please sign in to comment.