Skip to content

Commit bc267a6

Browse files
committed
docs: implemented suggestions
Signed-off-by: Fabrice Flore-Thébault <[email protected]>
1 parent f4eac0c commit bc267a6

22 files changed

+92
-98
lines changed

artifacts/attributes.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@
1919
:rhel: Red Hat Enterprise Linux
2020
:odf-name: OpenShift Data Foundation
2121

22+
:my-app-config-config-map: my-rhdh-app-config
23+
:my-app-config-file: app-config.yaml
24+
:my-product-cr-name: my-rhdh-custom-resource
25+
:my-product-namespace: my-rhdh-project
26+
:my-product-secrets: my-rhdh-secrets
2227
:my-product-url: https://__<my_developer_hub_url>__
23-
:my-product-namespace: rhdh
24-
:my-product-cr-name: developer-hub
2528

2629
// Red Hat Platforms
2730
:ocp-brand-name: Red Hat OpenShift Container Platform
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
:_mod-docs-content-type: ASSEMBLY
2-
:context: provisioning-and-registering-your-custom-configuration
2+
:context: provisioning-and-using-your-custom-configuration
33
[id="{context}"]
4-
= Provisioning and registering your custom {product} configuration
4+
= Provisioning and using your custom {product} configuration
5+
6+
To configure {product}, use these methods, which are widely used to configure a {ocp-brand-name} application:
7+
8+
* Use config maps to mount files and directories.
9+
* Use secrets to inject environment variables.
10+
11+
Learn to apply these methods to {product-short}:
12+
13+
. xref:provisioning-your-custom-configuration[Provision your custom config maps and secrets to {ocp-short}].
14+
. Use your selected deployment method to mount the config maps and inject the secrets:
15+
16+
** xref:using-the-operator-to-run-rhdh-with-your-custom-configuration[Use the {product} operator to deploy {product-short}].
17+
** xref:using-the-helm-chart-to-run-rhdh-with-your-custom-configuration[Use the {product} Helm chart to deploy {product-short}].
18+
519

620
include::modules/configuring/proc-provisioning-your-custom-configuration.adoc[leveloffset=+1]
721

8-
include::modules/configuring/proc-registering-your-custom-configuration-by-using-the-operator.adoc[leveloffset=+1]
22+
23+
include::modules/configuring/proc-using-the-operator-to-run-rhdh-with-your-custom-configuration.adoc[leveloffset=+1]
24+
925

1026
include::modules/configuring/proc-adding-custom-configuration-files-by-using-the-operator.adoc[leveloffset=+1]
1127

1228

13-
include::modules/configuring/proc-adding-custom-configuration-files-by-using-helm.adoc[leveloffset=+1]
29+
include::modules/configuring/proc-using-the-helm-chart-to-run-rhdh-with-your-custom-configuration.adoc[leveloffset=+1]
1430

modules/getting-started/con-servicenow-custom-actions.adoc renamed to assemblies/assembly-using-servicenow.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ The custom actions in {product-short} enable you to facilitate and automate the
1010
* Create, update, or delete a record
1111
* Retrieve information about a single record or multiple records
1212

13+
include::modules/using-service-now/proc-enable-servicenow-custom-actions-plugin.adoc[leveloffset=+1]
14+
15+
16+
include::modules/using-service-now/ref-supported-servicenow-custom-actions.adoc[leveloffset=+1]
17+

assemblies/dynamic-plugins/assembly-configuring-rhdh-plugins.adoc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ include::../modules/dynamic-plugins/proc-topology-configure.adoc[leveloffset=+2]
2525
include::../assembly-bulk-importing-from-github.adoc[leveloffset=+1]
2626

2727

28-
include::../modules/getting-started/con-servicenow-custom-actions.adoc[leveloffset=+1]
28+
include::../assembly-using-servicenow.adoc[leveloffset=+1]
2929

3030

31-
include::../modules/getting-started/proc-enable-servicenow-custom-actions-plugin.adoc[leveloffset=+2]
32-
33-
34-
include::../modules/getting-started/ref-supported-servicenow-custom-actions.adoc[leveloffset=+2]

modules/configuring/proc-adding-custom-configuration-files-by-using-the-operator.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[id="proc-add-custom-app-config-file-ocp-operator_{context}"]
2-
= Adding your custom {product} configuration to a running {product-short} by using the operator
2+
= Using the {product} operator to add your custom configuration to a running {product-short}
33

44
Reference your custom config maps and secrets in your `Backstage` custom resource
55
to redeploy your running {product} instance with your custom configuration by using the {product-short} operator.
@@ -18,7 +18,7 @@ image::{imagesdir}/rhdh/operator-install-2.png[]
1818

1919
. In the custom resource, enter the name of the custom application configuration config map as the value for the `spec.application.appConfig.configMaps` field, and enter the name of your secret as the value for the `spec.application.extraEnvs.secrets` field. For example:
2020
+
21-
[source, yaml]
21+
[source,yaml,subs="+attributes,+quotes"]
2222
----
2323
apiVersion: rhdh.redhat.com/v1alpha1
2424
kind: Backstage
@@ -29,10 +29,10 @@ spec:
2929
appConfig:
3030
mountPath: /opt/app-root/src
3131
configMaps:
32-
- name: app-config
32+
- name: {my-app-config-config-map}
3333
extraEnvs:
3434
secrets:
35-
- name: my-rhdh-secrets
35+
- name: {my-product-secrets}
3636
extraFiles:
3737
mountPath: /opt/app-root/src
3838
replicas: 1

modules/configuring/proc-provisioning-your-custom-configuration.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Your changes on this configuration might get reverted on {product-short} restart
1111

1212
.Prerequisites
1313
* By using the link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/cli_tools/index#cli-about-cli_cli-developer-commands[{openshift-cli}], you have access, with developer permissions, to the {ocp-short} cluster aimed at containing your {product-short} instance.
14+
1415
* You know your desired {product-short} external URL: pass:c,a,q[{my-product-url}].
1516
+
1617
[TIP]
@@ -24,18 +25,18 @@ To identify your {product-short} external URL:
2425

2526

2627
.Procedure
27-
. Author your custom `secrets.txt` file to provision your secrets as environment variables values in an {ocp-short} secret, rather than in clear text in your configuration files.
28+
. Author your custom `{my-product-secrets}.txt` file to provision your secrets as environment variables values in an {ocp-short} secret, rather than in clear text in your configuration files.
2829
It contains one secret per line in `KEY=value` form.
2930

3031
.. To define the {product-short} backend secret, add the `BACKEND_SECRET` environment variable with a base64 encoded string.
3132
Use a unique value for each {product-short} instance.
3233
+
3334
[source,terminal,subs="+attributes"]
3435
----
35-
$ echo > secrets.txt "BACKEND_SECRET=$(node -p 'require("crypto").randomBytes(24).toString("base64")')"
36+
$ echo > {my-product-secrets}.txt "BACKEND_SECRET=$(node -p 'require("crypto").randomBytes(24).toString("base64")')"
3637
----
3738
+
38-
.`secrets.txt` example
39+
.`{my-product-secrets}.txt` example
3940
====
4041
----
4142
BACKEND_SECRET=3E2/rIPuZNFCtYHoxVP8wjriffnN1q/z
@@ -44,10 +45,10 @@ BACKEND_SECRET=3E2/rIPuZNFCtYHoxVP8wjriffnN1q/z
4445

4546
.. Optionally, link:{authentication-book-url}[add authentication secrets].
4647

47-
. Author your custom `app-config.yaml` file.
48+
. Author your custom `{my-app-config-file}` file.
4849
This is the main {product-short} configuration file.
4950
+
50-
.Minimal `app-config.yaml` example
51+
.Minimal `{my-app-config-file}` example
5152
====
5253
[source,yaml,subs="+attributes,+quotes"]
5354
----
@@ -72,16 +73,16 @@ Enter your {product-short} general configuration in the `app` section.
7273

7374
app.title::: Enter your {product-short} instance display name, such as _<{product}>_.
7475
+
75-
.`app-config.yaml` excerpt
76-
[source,yaml,subs="attributes+"]
76+
.`{my-app-config-file}` excerpt
77+
[source,yaml,subs="+attributes,+quotes"]
7778
----
7879
app:
7980
title: {product}
8081
----
8182

8283
app.baseURL::: Enter your {product-short} external URL, such as pass:c,a,q[{my-product-url}].
8384
+
84-
.`app-config.yaml` excerpt
85+
.`{my-app-config-file}` excerpt
8586
[source,yaml,subs="+attributes,+quotes"]
8687
----
8788
app:
@@ -98,7 +99,7 @@ Enter your {product-short} backend configuration in the `backend` section.
9899
backend.auth::: Enter your authentication configuration.
99100
See link:{authentication-book-url}[{authentication-book-title}].
100101
+
101-
.`app-config.yaml` excerpt
102+
.`{my-app-config-file}` excerpt
102103
[source,yaml,subs="+attributes,+quotes"]
103104
----
104105
backend:
@@ -108,7 +109,7 @@ backend:
108109
backend.auth.externalAccess:::
109110
Enter the mandatory backend authentication key configuration.
110111
+
111-
.`app-config.yaml` excerpt
112+
.`{my-app-config-file}` excerpt
112113
[source,yaml,subs="+attributes,+quotes"]
113114
----
114115
backend:
@@ -122,7 +123,7 @@ backend:
122123

123124
backend.baseURL and backend.cors.origin::: Enter your {product-short} external URL, such as pass:c,a,q[{my-product-url}].
124125
+
125-
.`app-config.yaml` excerpt
126+
.`{my-app-config-file}` excerpt
126127
[source,yaml,subs="+attributes,+quotes"]
127128
----
128129
backend:
@@ -154,27 +155,26 @@ $ oc create namespace {my-product-namespace}
154155
+
155156
Alternatively, link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/building_applications/index#creating-a-project-using-the-web-console_projects[create the project by using the web console].
156157

157-
.. Provision your `app-config.yaml` file to the `app-config` config map.
158+
.. Provision your `{my-{my-app-config-config-map}-file}` file to the `{my-app-config-config-map}` config map in the _<{my-product-namespace}>_ project.
158159
+
159-
[source,terminal]
160+
[source,terminal,subs="+attributes,+quotes"]
160161
----
161-
$ oc create configmap app-config --from-file=app-config.yaml
162+
$ oc create configmap {my-app-config-config-map} --from-file={my-app-config-file} --namespace={my-product-namespace}
162163
----
163164
+
164165
Alternatively, link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/nodes/index#nnodes-pods-configmap-create-from-console_configmaps[create the config map by using the web console].
165166

166-
.. Provision your `secrets.txt` to the `my-rhdh-secrets` secret.
167+
.. Provision your `{my-product-secrets}.txt` file to the `{my-product-secrets}` secret in the _<{my-product-namespace}>_ project.
167168
+
168-
[source,terminal]
169+
[source,terminal,subs="+attributes,+quotes"]
169170
----
170-
$ oc create secret generic my-rhdh-secrets --from-file=secrets.txt
171+
$ oc create secret generic {my-product-secrets} --from-file={my-product-secrets}.txt --namespace={my-product-namespace}
171172
----
172173
+
173174
Alternatively,
174175
link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/nodes/index#nodes-pods-secrets-creating-web-console-secrets_nodes-pods-secrets[create the secret by using the web console].
175176

176177
.Next steps
177-
178178
Consider provisioning additional config maps and secrets:
179179

180180
* To use an external PostgreSQL database, xref:configuring-external-postgresql-databases[provision your PostgreSQL database secrets].
@@ -184,6 +184,6 @@ Consider provisioning additional config maps and secrets:
184184
On a development environment, consider skipping this step and using the internal PostgreSQL database.
185185
====
186186

187-
* To enable dynamic plugins, link:{installing-and-viewing-dynamic-plugins-url}[provision the dynamic plugins config map].
187+
* To enable dynamic plugins, link:{installing-and-viewing-dynamic-plugins-url}[provision your dynamic plugins config map].
188188

189-
* To configure authorization by using external files, link:{authorization-book-url}#managing-authorizations-by-using-external-files[provision the RBAC policies config map].
189+
* To configure authorization by using external files, link:{authorization-book-url}#managing-authorizations-by-using-external-files[provision your RBAC policies config map].

modules/configuring/proc-adding-custom-configuration-files-by-using-helm.adoc renamed to modules/configuring/proc-using-the-helm-chart-to-run-rhdh-with-your-custom-configuration.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[id='proc-add-custom-app-file-openshift-helm_{context}']
2-
= Adding custom {product} configuration files by using the Helm chart
1+
[id='using-the-helm-chart-to-run-rhdh-with-your-custom-configuration']
2+
= Using the {product} Helm chart to run {product-short} with your custom configuration
33

44
You can use the {product} Helm chart to add a custom application configuration file to your {ocp-short} instance.
55

66
.Prerequisites
77

8-
* By using the {ocp-short} web console, you have access with developer permissions, to link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/building_applications/index#working-with-projects[an {ocp-short} project] named _<{product-very-short}>_, aimed at containing your {product-short} instance.
9-
* xref:provisioning-your-custom-configuration[You have uploaded your custom configuration files and secrets in your `_<{product-very-short}>_` project].
8+
* By using the {ocp-short} web console, you have access with developer permissions, to link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/building_applications/index#working-with-projects[an {ocp-short} project] named _<{my-product-namespace}>_, aimed at containing your {product-short} instance.
9+
* xref:provisioning-your-custom-configuration[You have uploaded your custom configuration files and secrets in your `_<{my-product-namespace}>_` project].
1010

1111
.Procedure
1212

@@ -17,13 +17,13 @@ You can use the {product} Helm chart to add a custom application configuration f
1717
.. Set the value of the `upstream.backstage.extraAppConfig.configMapRef` and `upstream.backstage.extraAppConfig.filename` parameters as follows:
1818
+
1919
.Helm configuration excerpt
20-
[source,yaml]
20+
[source,yaml,subs="+attributes,+quotes"]
2121
----
2222
upstream:
2323
backstage:
2424
extraAppConfig:
25-
- configMapRef: app-config
26-
filename: app-config.yaml
25+
- configMapRef: {my-app-config-config-map}
26+
filename: {my-app-config-file}
2727
----
2828
.. Click *Upgrade*.
2929

0 commit comments

Comments
 (0)