Skip to content

Commit d35614f

Browse files
committed
RHIDP-7849 Added existing modules to the _Getting started with RHDH on OCP_ title
Fixed existing content to build while reused. Signed-off-by: Fabrice Flore-Thébault <[email protected]>
1 parent 8be4076 commit d35614f

File tree

22 files changed

+319
-60
lines changed

22 files changed

+319
-60
lines changed

assemblies/assembly-configuring-a-proxy.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
:previouscontext: {context}
23
:context: running-behind-a-proxy
34
[id="{context}"]
45
= Running {product} behind a corporate proxy
@@ -21,3 +22,4 @@ include::modules/configuring-a-proxy/proc-configuring-proxy-in-operator-deployme
2122

2223
include::modules/configuring-a-proxy/proc-configuring-proxy-in-helm-deployment.adoc[leveloffset=+1]
2324

25+
:context: {previouscontext}

assemblies/assembly-configuring-external-postgresql-databases.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
:previouscontext: {context}
23
:context: configuring-external-postgresql-databases
34
[id="{context}"]
45
= Configuring external PostgreSQL databases
@@ -21,3 +22,4 @@ include::modules/configuring-external-databases/proc-configuring-postgresql-inst
2122

2223
include::modules/configuring-external-databases/proc-migrating-databases-to-an-external-server.adoc[leveloffset=+1]
2324

25+
:context: {previouscontext}

assemblies/assembly-configuring-high-availability.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
:previouscontext: {context}
23
:context: HighAvailability
34
[id="{context}"]
45
= Configuring high availability in {product}
@@ -9,7 +10,7 @@ High availability (HA) is a system design approach that ensures a service remain
910
{product} supports HA deployments on the following platforms:
1011

1112
* {ocp-brand-name}
12-
* {aks-name}
13+
* {aks-name}
1314
* {eks-name}
1415
1516
The HA deployments enable more resilient and reliable service availability across supported environments.
@@ -25,4 +26,7 @@ As an administrator, you can configure high availability by adjusting replica va
2526
2627
include::modules/configuring-high-availability/proc-configuring-high-availability-in-rhdh-operator-deployment.adoc[leveloffset=+1]
2728

28-
include::modules/configuring-high-availability/proc-configuring-high-availability-in-rhdh-helm-chart-deployment.adoc[leveloffset=+1]
29+
include::modules/configuring-high-availability/proc-configuring-high-availability-in-rhdh-helm-chart-deployment.adoc[leveloffset=+1]
30+
31+
:context: {previouscontext}
32+
!:previouscontext:

assemblies/assembly-configuring-readonlyrootfilesystem.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
:previouscontext: {context}
23
:context: readonlyrootfilesystem
34
[id="{context}"]
45
= Configuring readOnlyRootFilesystem in {product}
@@ -10,4 +11,6 @@ The {product} deployment consists of two containers: an `initContainer` that ins
1011
1112
include::modules/configuring-readonlyrootfilesystem/proc-configuring-readonlyrootfilesystem-option-in-rhdh-operator-deployment.adoc[leveloffset=+1]
1213

13-
include::modules/configuring-readonlyrootfilesystem/proc-configuring-readonlyrootfilesystem-option-in-rhdh-helm-chart-deployment.adoc[leveloffset=+1]
14+
include::modules/configuring-readonlyrootfilesystem/proc-configuring-readonlyrootfilesystem-option-in-rhdh-helm-chart-deployment.adoc[leveloffset=+1]
15+
16+
:context: {previouscontext}

assemblies/assembly-provisioning-a-custom-configuration.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
:previouscontext: {context}
23
:context: provisioning-and-using-your-custom-configuration
34
[id="{context}"]
45
= Provisioning and using your custom {product} configuration
@@ -26,3 +27,4 @@ include::modules/configuring/proc-mounting-additional-files-in-your-custom-confi
2627

2728
include::modules/configuring/proc-using-the-helm-chart-to-run-rhdh-with-your-custom-configuration.adoc[leveloffset=+1]
2829

30+
:context: {previouscontext}

modules/authentication/proc-enabling-user-authentication-with-rhbk.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ catalog:
157157
schedule:
158158
initialDelay: { seconds: 15}
159159
----
160-
--
161160

162161
. To set up the {rhbk} authentication provider in your {product-short} custom configuration, edit your custom {product-short} ConfigMap such as `app-config-rhdh`, and add the following lines to the `{my-app-config-file}` content:
163162

modules/installation/proc-configuring-an-rhdh-instance-with-tls-in-kubernetes.adoc renamed to modules/configuring/proc-configuring-an-rhdh-instance-with-tls-in-kubernetes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[id="proc-configuring-an-rhdh-instance-with-tls-in-kubernetes_{context}"]
1+
[id="configuring-an-rhdh-instance-with-tls-in-kubernetes"]
22
= Configuring an {product-very-short} instance with a TLS connection in Kubernetes
33

44
You can configure a {product-very-short} instance with a Transport Layer Security (TLS) connection in a Kubernetes cluster, such as an Azure Red Hat OpenShift (ARO) cluster, any cluster from a supported cloud provider, or your own cluster with proper configuration. Transport Layer Security (TLS) ensures a secure connection for the {product-very-short} instance with other entities, such as third-party applications, or external databases. However, you must use a public Certificate Authority (CA)-signed certificate to configure your Kubernetes cluster.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[id="preparing-your-external-services"]
2+
= Preparing your external services
3+
4+
5+
.Procedure
6+
.

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

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,38 @@ Your changes on this configuration might get reverted on {product-short} restart
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.
1414

15+
include::snip-provisioning-your-custom-configuration-prerequisites-in-{context}-context.adoc[]
16+
1517
.Procedure
16-
. 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.
17-
It contains one secret per line in `KEY=value` form.
18+
. For security, store your secrets as environment variables values in an {ocp-short} secret,
19+
rather than in clear text in your configuration files.
20+
Collect all your secrets in the `secrets.txt` file, with one secret per line in `KEY=value` form.
1821
+
19-
* link:{authentication-book-url}[Enter your authentication secrets].
22+
--
23+
include::snip-provisioning-your-custom-configuration-secrets-step-in-{context}-context.adoc[]
24+
--
2025

2126
. Author your custom `{my-app-config-file}` file.
2227
This is the main {product-short} configuration file.
2328
You need a custom `{my-app-config-file}` file to avoid the {product-short} installer to revert user edits during upgrades.
2429
When your custom `{my-app-config-file}` file is empty, {product-short} is using default values.
30+
+
31+
--
32+
include::snip-provisioning-your-custom-configuration-appconfig-step-in-{context}-context.adoc[]
33+
--
2534

26-
** To prepare a deployment with the {product} Operator on {ocp-short}, you can start with an empty file.
27-
28-
** To prepare a deployment with the {product} Helm chart, or on Kubernetes, enter the {product-short} base URL in the relevant fields in your `{my-app-config-file}` file to ensure proper functionality of {product-short}.
29-
The base URL is what a {product-short} user sees in their browser when accessing {product-short}.
30-
The relevant fields are `baseUrl` in the `app` and `backend` sections, and `origin` in the `backend.cors` subsection:
35+
. Author your custom `dynamic-plugins.yaml` file to enable plugins.
36+
Plugins that require configuration are disabled by default.
3137
+
32-
.Configuring the `baseUrl` in `{my-app-config-file}`
33-
====
34-
[source,yaml,subs="+attributes,+quotes"]
38+
.`dynamic.plugins.yaml`
39+
[source,yaml]
3540
----
36-
app:
37-
title: {product}
38-
baseUrl: {my-product-url}
39-
40-
backend:
41-
auth:
42-
externalAccess:
43-
- type: legacy
44-
options:
45-
subject: legacy-default-config
46-
secret: "${BACKEND_SECRET}"
47-
baseUrl: {my-product-url}
48-
cors:
49-
origin: {my-product-url}
41+
includes:
42+
- dynamic-plugins.default.yaml
43+
plugins:
44+
- package: './dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github'
45+
disabled: false
5046
----
51-
====
52-
53-
** Optionally, enter your configuration such as:
54-
55-
*** link:{authentication-book-url}[{authentication-book-title}].
56-
*** link:{authorization-book-url}[{authorization-book-title}].
57-
*** link:{customizing-book-url}[Customization].
58-
*** xref:proc-configuring-an-rhdh-instance-with-tls-in-kubernetes_running-behind-a-proxy[Configure your {ocp-short} integration].
5947

6048
. Provision your custom configuration files to your {ocp-short} cluster.
6149

@@ -68,20 +56,22 @@ $ oc create namespace {my-product-namespace}
6856
+
6957
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].
7058

71-
.. Provision your `{my-app-config-file}` file to the `{my-app-config-config-map}` config map in the _<{my-product-namespace}>_ project.
59+
.. Provision your `{my-app-config-file}` and `dynamic-plugins.yaml` files respectively to the `{my-app-config-config-map}` and `dynamic-plugins-rhdh` config maps in the _<{my-product-namespace}>_ project.
7260
+
7361
[source,terminal,subs="+attributes,+quotes"]
7462
----
7563
$ oc create configmap {my-app-config-config-map} --from-file={my-app-config-file} --namespace={my-product-namespace}
64+
$ oc create configmap dynamic-plugins-rhdh --from-file=dynamic-plugins.yaml --namespace={my-product-namespace}
7665
----
7766
+
78-
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].
67+
Alternatively,
68+
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 maps by using the web console].
7969

80-
.. Provision your `_<my_product_secrets>_.txt` file to the `_<my_product_secrets>_` secret in the _<{my-product-namespace}>_ project.
70+
.. Provision your `secrets.txt` file to the `_<my_product_secrets>_` secret in the _<{my-product-namespace}>_ project.
8171
+
8272
[source,terminal,subs="+attributes,+quotes"]
8373
----
84-
$ oc create secret generic `_<my_product_secrets>_` --from-file=`_<my_product_secrets>_.txt` --namespace={my-product-namespace}
74+
$ oc create secret generic `_<my_product_secrets>_` --from-file=`secrets.txt` --namespace={my-product-namespace}
8575
----
8676
+
8777
Alternatively,
@@ -92,12 +82,5 @@ link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-
9282
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
9383
====
9484

95-
.Next steps
96-
Consider provisioning additional config maps and secrets:
97-
98-
* To use an external PostgreSQL database, xref:configuring-external-postgresql-databases[provision your PostgreSQL database secrets].
99-
100-
101-
* To enable dynamic plugins, link:{installing-and-viewing-plugins-book-url}[provision your dynamic plugins config map].
10285

103-
* To configure authorization by using external files, link:{authorization-book-url}#managing-authorizations-by-using-external-files[provision your RBAC policies config map].
86+
include::snip-provisioning-your-custom-configuration-next-steps-in-{context}-context.adoc[]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[id="using-the-operator-to-run-rhdh-with-your-custom-configuration"]
2+
= Using the {product} Operator to run {product-short} with your custom configuration
3+
4+
To use the {product-short} Operator to run {product} with your custom configuration, create your {product-custom-resource-type} custom resource (CR) that:
5+
6+
* Mounts files provisioned in your custom config maps.
7+
* Injects environment variables provisioned in your custom secrets.
8+
9+
.Prerequisites
10+
* 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.
11+
* xref:proc-install-operator_getting-started-with-rhdh-on-ocp-for-the-platform-engineer[]
12+
* xref:provisioning-your-custom-configuration[]
13+
14+
.Procedure
15+
16+
. Author your {product-custom-resource-type} CR in a `{my-product-cr-name}.yaml` file to use your custom config maps and secrets.
17+
+
18+
.`{my-product-cr-name}.yaml` custom resource example with dynamic plugins and RBAC policies config maps, and external PostgreSQL database secrets.
19+
[source,yaml,subs="+attributes,+quotes"]
20+
----
21+
apiVersion: rhdh.redhat.com/v1alpha3
22+
kind: Backstage
23+
metadata:
24+
name: _<{my-product-cr-name}>_
25+
spec:
26+
application:
27+
appConfig:
28+
mountPath: /opt/app-root/src
29+
configMaps:
30+
- name: {my-app-config-config-map}
31+
- name: rbac-policies
32+
dynamicPluginsConfigMapName: dynamic-plugins-rhdh
33+
extraEnvs:
34+
envs:
35+
- name: HTTP_PROXY
36+
value: 'http://10.10.10.105:3128'
37+
- name: HTTPS_PROXY
38+
value: 'http://10.10.10.106:3128'
39+
- name: NO_PROXY
40+
value: 'localhost,example.org'
41+
secrets:
42+
- name: `_<my_product_secrets>_`
43+
- name: {my-product-database-secrets}
44+
extraFiles:
45+
mountPath: /opt/app-root/src
46+
secrets:
47+
- name: {my-product-database-certificates-secrets}
48+
key: postgres-crt.pem, postgres-ca.pem, postgres-key.key
49+
replicas: 2
50+
database:
51+
enableLocalDb: false
52+
----
53+
54+
`application`::
55+
`appConfig`::: Register your `{my-app-config-config-map}` and `rbac-policies` config maps.
56+
`dynamicPluginsConfigMapName`::: Register your `dynamic-plugins-rhdh` config map.
57+
`extraEnvs`:::
58+
`env`:::: Enter your proxy environment variables.
59+
`secrets`:::: Register your `<my_product_secrets>` and `{my-product-database-secrets}` secrets.
60+
`extraFiles`:::
61+
`secrets`::::
62+
Register the `postgres-crt.pem`, `postgres-ca.pem`, and `postgres-key.key` files contained in the `{my-product-database-certificates-secrets}` secret.
63+
`replicas`::: Enable high availability (HA) by increasing the replicas count to a value higher or equal to 2.
64+
`database`::
65+
`enableLocalDb`::: Use your external PostgreSQL database rather than the internal PostgreSQL database.
66+
67+
. Apply your {product-custom-resource-type} CR to start or update your {product-short} instance.
68+
+
69+
[source,terminal,subs="+attributes,+quotes"]
70+
----
71+
$ oc apply --filename={my-product-cr-name}.yaml --namespace={my-product-namespace}
72+
----

0 commit comments

Comments
 (0)