Skip to content

Commit a4913ae

Browse files
RHIDP-7849 Added existing modules to _Setting up and configuring your first instance_ (#1267)
Co-authored-by: Jana Vrbkova <[email protected]>
1 parent 8e224e1 commit a4913ae

File tree

24 files changed

+501
-50
lines changed

24 files changed

+501
-50
lines changed

assemblies/assembly-configuring-a-proxy.adoc

Lines changed: 3 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

45
[id="{context}"]
@@ -22,3 +23,5 @@ include::modules/configuring-a-proxy/proc-configuring-proxy-in-operator-deployme
2223

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

26+
:context: {previouscontext}
27+
!:previouscontext:

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

Lines changed: 3 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

45
[id="{context}"]
@@ -22,3 +23,5 @@ include::modules/configuring-external-databases/proc-configuring-postgresql-inst
2223

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

26+
:context: {previouscontext}
27+
!:previouscontext:

assemblies/assembly-configuring-high-availability.adoc

Lines changed: 4 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: HighAvailability
34

45
[id="{context}"]
@@ -28,3 +29,6 @@ As an administrator, you can configure high availability by adjusting replica va
2829
include::modules/configuring-high-availability/proc-configuring-high-availability-in-rhdh-operator-deployment.adoc[leveloffset=+1]
2930

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

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

Lines changed: 3 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

45
[id="{context}"]
@@ -27,3 +28,5 @@ include::modules/configuring/proc-mounting-additional-files-in-your-custom-confi
2728

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

31+
:context: {previouscontext}
32+
!:previouscontext:

modules/authentication/proc-enabling-user-authentication-with-microsoft-azure.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ auth:
385385
`additionalScopes`::
386386
Optional for additional scopes.
387387
To add scopes for the application registration, uncomment and enter the list of scopes that you want to add.
388-
The default and mandatory value lists following scopes:
388+
The default and mandatory value lists following scopes:
389389
* `openid`
390390
* `offline_access`
391391
* `profile`
@@ -463,6 +463,7 @@ This resolver looks up the user by matching their Microsoft email to the user en
463463
Configure the sign-in resolver to bypass the user provisioning requirement in the {product-short} software catalog.
464464
+
465465
WARNING: Use `dangerouslyAllowSignInWithoutUserInCatalog` to explore {product-short} features, but do not use it in production.
466+
endif::[]
466467

467468
.Verification
468469
. To verify user and group provisioning, check the console logs for `MicrosoftGraphOrgEntityProvider` events.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id="checklist-to-run-your-first-rhdh-instance-in-production_{context}"]
4+
= Checklist to run your first {product} ({product-very-short}) instance in production.
5+
6+
With the default configuration, {product-short} runs with a minimal feature set that does not require secure connection to external services such as an identity provider, a Git provider, and external PostgreSQL and Redis databases.
7+
8+
Using critical features therefore requires following additional configuration:
9+
10+
For resiliency::
11+
* Use an external PostgreSQL database.
12+
* Enable high-availability.
13+
14+
For performance::
15+
* Enable assets caching to an external Redis database.
16+
17+
For security::
18+
* Use secure connections to your external services.
19+
* Provision users and enable authentication.
20+
* Enable role-based access control, and configure the permission policy by using the Web UI.
21+
22+
For adapting to your environment::
23+
* Enable GitHub repository discovery.
24+
* Customize {product-short} appearance with your logo.

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,6 +1,6 @@
11
:_mod-docs-content-type: PROCEDURE
22

3-
[id="proc-configuring-an-rhdh-instance-with-tls-in-kubernetes_{context}"]
3+
[id="configuring-an-rhdh-instance-with-tls-in-kubernetes_{context}"]
44
= Configuring an {product-very-short} instance with a TLS connection in Kubernetes
55

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

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

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,48 @@ Your changes on this configuration might get reverted on {product-short} restart
1414
.Prerequisites
1515
* By using the {platform-cli-link}, you have access, with developer permissions, to the {platform-generic} cluster aimed at containing your {product-short} instance.
1616

17+
ifeval::["{context}" == "setting-up-and-configuring-your-first-rhdh-instance"]
18+
include::snip-provisioning-your-custom-configuration-prerequisites-in-setting-up-and-configuring-your-first-rhdh-instance-context.adoc[]
19+
endif::[]
20+
1721
.Procedure
18-
. Author your custom `_<my_product_secrets>_.txt` file to provision your secrets as environment variables values in {a-platform-generic} secret,
19-
rather than in clear text in your configuration files.
20-
It contains one secret per line in `KEY=value` form.
22+
. For security, store your secrets as environment variables values in an {ocp-short} secret, rather than in clear text in your configuration files.
23+
Collect all your secrets in the `secrets.txt` file, with one secret per line in `KEY=value` form.
2124
+
22-
* {authentication-book-link}[Enter your authentication secrets].
25+
--
26+
ifeval::["{context}" == "setting-up-and-configuring-your-first-rhdh-instance"]
27+
include::snip-provisioning-your-custom-configuration-secrets-steps-in-setting-up-and-configuring-your-first-rhdh-instance-context.adoc[]
28+
endif::[]
29+
ifeval::["{context}" != "setting-up-and-configuring-your-first-rhdh-instance"]
30+
include::snip-provisioning-your-custom-configuration-secrets-steps-in-default-context.adoc[]
31+
endif::[]
32+
--
2333

2434
. Author your custom `{my-app-config-file}` file.
2535
This is the main {product-short} configuration file.
2636
You need a custom `{my-app-config-file}` file to avoid the {product-short} installer to revert user edits during upgrades.
2737
When your custom `{my-app-config-file}` file is empty, {product-short} is using default values.
38+
+
39+
--
40+
include::snip-provisioning-your-custom-configuration-appconfig-step-with-optional-steps-{optional-steps}d.adoc[]
41+
--
2842

29-
** To prepare a deployment with the {product} Operator on {platform}, you can start with an empty file.
30-
31-
** 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}.
32-
The base URL is what a {product-short} user sees in their browser when accessing {product-short}.
33-
The relevant fields are `baseUrl` in the `app` and `backend` sections, and `origin` in the `backend.cors` subsection:
43+
. Author your custom `dynamic-plugins.yaml` file to enable plugins.
44+
By default, {product-short} enables a minimal plugin set, and disables plugins that require configuration or secrets, such as the GitHub repository discovery plugin and the Role-based access control (RBAC) plugin.
3445
+
35-
.Configuring the `baseUrl` in `{my-app-config-file}`
36-
====
37-
[source,yaml,subs="+attributes,+quotes"]
46+
Enable the GitHub repository discovery and the RBAC features:
47+
+
48+
.`dynamic.plugins.yaml`
49+
[source,yaml]
3850
----
39-
app:
40-
title: {product}
41-
baseUrl: {my-product-url}
42-
43-
backend:
44-
auth:
45-
externalAccess:
46-
- type: legacy
47-
options:
48-
subject: legacy-default-config
49-
secret: "${BACKEND_SECRET}"
50-
baseUrl: {my-product-url}
51-
cors:
52-
origin: {my-product-url}
51+
includes:
52+
- dynamic-plugins.default.yaml
53+
plugins:
54+
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github
55+
disabled: false
56+
- package: ./dynamic-plugins/dist/backstage-community-plugin-rbac
57+
disabled: false
5358
----
54-
====
55-
56-
** Optionally, enter your configuration such as:
57-
58-
*** {authentication-book-link}[{authentication-book-title}].
59-
*** {authorization-book-link}[{authorization-book-title}].
60-
*** {customizing-book-link}[Customization].
6159

6260
. Provision your custom configuration files to your {platform} cluster.
6361

@@ -68,21 +66,30 @@ backend:
6866
$ oc create namespace {my-product-namespace}
6967
----
7068

71-
.. Provision your `{my-app-config-file}` file to the `{my-app-config-config-map}` config map in the _<{my-product-namespace}>_ project.
69+
.. 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.
7270
+
7371
[source,terminal,subs="+attributes,+quotes"]
7472
----
7573
$ oc create configmap {my-app-config-config-map} --from-file={my-app-config-file} --namespace={my-product-namespace}
74+
$ oc create configmap dynamic-plugins-rhdh --from-file=dynamic-plugins.yaml --namespace={my-product-namespace}
7675
----
76+
+
77+
Alternatively,
78+
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].
7779

78-
.. Provision your `_<my_product_secrets>_.txt` file to the `_<my_product_secrets>_` secret in the _<{my-product-namespace}>_ project.
80+
.. Provision your `secrets.txt` file to the `{my-product-secrets}` secret in the _<{my-product-namespace}>_ project.
7981
+
8082
[source,terminal,subs="+attributes,+quotes"]
8183
----
82-
$ oc create secret generic `_<my_product_secrets>_` --from-file=`_<my_product_secrets>_.txt` --namespace={my-product-namespace}
84+
$ oc create secret generic {my-product-secrets} --from-file=secrets.txt --namespace={my-product-namespace}
8385
----
84-
85-
.Next steps
86-
* To use an external PostgreSQL database, {configuring-book-link}configuring-external-postgresql-databases[provision your PostgreSQL database secrets].
87-
* To enable dynamic plugins, {installing-and-viewing-plugins-book-link}[provision your dynamic plugins config map].
88-
* To configure authorization by using external files, {authorization-book-link}#managing-authorizations-by-using-external-files[provision your RBAC policies config map].
86+
+
87+
Alternatively,
88+
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].
89+
90+
ifeval::["{context}" == "setting-up-and-configuring-your-first-rhdh-instance"]
91+
include::snip-provisioning-your-custom-configuration-next-steps-in-setting-up-and-configuring-your-first-rhdh-instance-context.adoc[]
92+
endif::[]
93+
ifeval::["{context}" != "setting-up-and-configuring-your-first-rhdh-instance"]
94+
include::snip-provisioning-your-custom-configuration-next-steps-in-default-context.adoc[]
95+
endif::[]

0 commit comments

Comments
 (0)