Skip to content

Commit 295627a

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 295627a

File tree

22 files changed

+456
-67
lines changed

22 files changed

+456
-67
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: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
[id="preparing-your-external-services"]
2+
= Preparing your external services
3+
4+
{product} relies on external services:
5+
6+
PostgreSQL database::
7+
{product-short} stores data in a PostgreSQL database.
8+
For resiliency, use an external database and include it in your disaster recovery plan.
9+
10+
Redis cache::
11+
For efficiency, {product-short} caches plugin and Techdocs assets when your provide a Redis cache server.
12+
13+
GitHub API access::
14+
Provide credentials to a GitHub app to enable access to the GitHub API for repository discovery.
15+
16+
Connection to your identity provider::
17+
Provide credentials to your identity provider to enable user provisioning and authentication.
18+
19+
.Procedure
20+
. Get your Redis cache server connection string, such as `redis://user:[email protected]:6379`.
21+
22+
23+
. To allow {product-short} to access the GitHub API for repository, create a GitHub App.
24+
Opt for a GitHub App instead of an OAuth app to use fine-grained permissions, gain more control over which repositories the application can access, and use short-lived tokens.
25+
26+
.. link:https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app[Register a GitHub App] with the following configuration:
27+
28+
GitHub App name::
29+
Enter a unique name identifying your GitHub App, such as `integrating-with-rhdh-__<GUID>__`.
30+
31+
Homepage URL::
32+
Enter your {product-short} URL: `pass:c,a,q[{my-product-url}]`.
33+
34+
Authorization callback URL::
35+
Enter your {product-short} authentication backend URL: `pass:c,a,q[{my-product-url}/api/auth/github/handler/frame]`.
36+
37+
Webhook::
38+
Clear "Active", as this is not needed for authentication and catalog providers.
39+
40+
App permissions::
41+
Select permissions to define the level of access for the app.
42+
Adapt permissions to your needs:
43+
44+
Reading software components:::
45+
46+
Contents::::
47+
`Read-only`
48+
49+
Commit statuses::::
50+
`Read-only`
51+
52+
Reading organization data:::
53+
54+
Members::::
55+
`Read-only`
56+
57+
Publishing software templates:::
58+
Set permissions if you intend to use the same GitHub App for software templates.
59+
60+
Administration::::
61+
`Read & write` (for creating repositories)
62+
63+
Contents::::
64+
`Read & write`
65+
66+
Metadata::::
67+
`Read-only`
68+
69+
Pull requests::::
70+
`Read & write`
71+
72+
Issues::::
73+
`Read & write`
74+
75+
Workflows::::
76+
`Read & write` (if templates include GitHub workflows)
77+
78+
Variables::::
79+
`Read & write` (if templates include GitHub Action Repository Variables)
80+
81+
Secrets::::
82+
`Read & write` (if templates include GitHub Action Repository Secrets)
83+
84+
Environments::::
85+
`Read & write` (if templates include GitHub Environments)
86+
87+
Organization permissions::
88+
Members:::
89+
`Read-only`
90+
91+
Where can this GitHub App be installed?::
92+
Select `Only on this account`.
93+
94+
.. In the *General* -> *Clients secrets* section, click *Generate a new client secret*.
95+
96+
.. In the *General* -> *Private keys* section, click *Generate a private key*.
97+
98+
.. In the *Install App* tab, choose an account to install your GitHub App on.
99+
100+
.. Save the following values for the next step:
101+
102+
* **App ID**
103+
* **Client ID**
104+
* **Client secret**
105+
* **Private key**

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

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,41 @@ 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.
37+
Enable the GitHub repository discovery and the Role bases access control (RBAC) features:
3138
+
32-
.Configuring the `baseUrl` in `{my-app-config-file}`
33-
====
34-
[source,yaml,subs="+attributes,+quotes"]
39+
.`dynamic.plugins.yaml`
40+
[source,yaml]
3541
----
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}
42+
includes:
43+
- dynamic-plugins.default.yaml
44+
plugins:
45+
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github
46+
disabled: false
47+
- package: ./dynamic-plugins/dist/backstage-community-plugin-rbac
48+
disabled: false
5049
----
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].
5950

6051
. Provision your custom configuration files to your {ocp-short} cluster.
6152

@@ -68,36 +59,25 @@ $ oc create namespace {my-product-namespace}
6859
+
6960
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].
7061

71-
.. Provision your `{my-app-config-file}` file to the `{my-app-config-config-map}` config map in the _<{my-product-namespace}>_ project.
62+
.. 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.
7263
+
7364
[source,terminal,subs="+attributes,+quotes"]
7465
----
7566
$ oc create configmap {my-app-config-config-map} --from-file={my-app-config-file} --namespace={my-product-namespace}
67+
$ oc create configmap dynamic-plugins-rhdh --from-file=dynamic-plugins.yaml --namespace={my-product-namespace}
7668
----
7769
+
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].
70+
Alternatively,
71+
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].
7972

80-
.. Provision your `_<my_product_secrets>_.txt` file to the `_<my_product_secrets>_` secret in the _<{my-product-namespace}>_ project.
73+
.. Provision your `secrets.txt` file to the `{my-product-secrets}` secret in the _<{my-product-namespace}>_ project.
8174
+
8275
[source,terminal,subs="+attributes,+quotes"]
8376
----
84-
$ oc create secret generic `_<my_product_secrets>_` --from-file=`_<my_product_secrets>_.txt` --namespace={my-product-namespace}
77+
$ oc create secret generic {my-product-secrets} --from-file=secrets.txt --namespace={my-product-namespace}
8578
----
8679
+
8780
Alternatively,
8881
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].
8982

90-
[NOTE]
91-
====
92-
`_<my_product_secrets>_` is your preferred {product-short} secret name, specifying the identifier for your secret configuration within {product-short}.
93-
====
94-
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].
102-
103-
* To configure authorization by using external files, link:{authorization-book-url}#managing-authorizations-by-using-external-files[provision your RBAC policies config map].
83+
include::snip-provisioning-your-custom-configuration-next-steps-in-{context}-context.adoc[]
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
extraFiles:
44+
mountPath: /opt/app-root/src
45+
secrets:
46+
- name: {my-product-database-certificates-secrets}
47+
key: postgres-crt.pem, postgres-ca.pem, postgres-key.key
48+
replicas: 2
49+
database:
50+
enableLocalDb: false
51+
----
52+
53+
`application`::
54+
`appConfig`::: Register your `{my-app-config-config-map}` and `rbac-policies` config maps.
55+
`dynamicPluginsConfigMapName`::: Register your `dynamic-plugins-rhdh` config map.
56+
`extraEnvs`:::
57+
`env`:::: Enter your proxy environment variables.
58+
`secrets`:::: Register your `<my_product_secrets>` and `{my-product-database-secrets}` secrets.
59+
`extraFiles`:::
60+
`secrets`::::
61+
Register the `postgres-crt.pem`, `postgres-ca.pem`, and `postgres-key.key` files contained in the `{my-product-database-certificates-secrets}` secret.
62+
`replicas`::: Enable high availability (HA) by increasing the replicas count to a value higher or equal to 2.
63+
`database`::
64+
`enableLocalDb`::: Use your external PostgreSQL database rather than the internal PostgreSQL database.
65+
66+
. Apply your {product-custom-resource-type} CR to start or update your {product-short} instance.
67+
+
68+
[source,terminal,subs="+attributes,+quotes"]
69+
----
70+
$ oc apply --filename={my-product-cr-name}.yaml --namespace={my-product-namespace}
71+
----

0 commit comments

Comments
 (0)