Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content updated #24

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added modules/chapter1/images/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter1/images/rhdh-backstage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/rhdh-create-op-instance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter1/images/rhdh-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/rhdh-op-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/rhdh-op-installed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/rhdh-op-instance-running.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/rhdh-operator-installed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/search-devhub-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/chapter1/images/search-devhub-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/search-devhub-operator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter1/images/uninstall-rhdh-op.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 24 additions & 33 deletions modules/chapter1/pages/install-helm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ image::add-helm-chart.png[title=Add Helm Chart]
+
image::search-devhub-chart.png[title=Search for RHDH Helm Chart]

. In the `Red Hat Developer Hub` chart page, click `Create`. You will see the `Create Helm Release` page with some fields that need to be edited.
. In the `Red Hat Developer Hub` chart page, click `Create`.
+
image::search-devhub-create.png[title=Create RHDH Helm Chart]

.. Change the `Release Name` to `rhdh`. Ensure that the latest helm chart is selected in the `Chart version` drop-down (As of Jun 2024, latest RHDH version is 1.2.1).
.. Change the `Release Name` to `rhdh`. Ensure that the latest helm chart is selected in the `Chart version` drop-down (As of Jan 2025, latest RHDH version is 1.4.0).

.. Expand `Root Schema > global` and change the first field value from `apps.example.com` to the wildcard domain name of your OpenShift cluster. In RHDP, it is in the format `apps.cluster-<guid>.dynamic.redhatworkshops.io`, where `<guid>` is unique to your provisioned OpenShift cluster.

Expand All @@ -71,6 +73,9 @@ image::rhdh-installed.png[title=RHDH Topology View]
image::rhdh-homepage.png[title=RHDH Log in Page]

. Click `Enter` in the `Guest` card to log in as a guest user. You will see a warning message pop up with the text `Failed to sign in as a guest using the auth backend. Do you want to fallback to the legacy guest token?`. Click `Yes` to log in as a guest user.
+
image::rhdh-message.png[title=Warning message]

You will configure RHDH to authenticate against GitHub and other identity providers in later chapters of this course.
+
image::rhdh-guest-user.png[title=Log in as a guest user]
Expand All @@ -96,7 +101,7 @@ $ helm repo add openshift-helm-charts https://charts.openshift.io/
```bash
$ helm show values \
openshift-helm-charts/redhat-developer-hub \
--version 1.2.1 > /tmp/values.yaml
--version 1.4.0 > /tmp/values.yaml
```

. Change the value of the *global.clusterRouterBase* attribute to the wildcard OpenShift DNS name, and also edit the *upstream.nameOverride* to *rhdh*.
Expand All @@ -113,12 +118,19 @@ upstream:
...
----

. Log in to the OpenShift cluster as the cluster administrator. Ensure that you switch to the *devhub* project.
. Log in to the OpenShift cluster as the cluster administrator. For this, select 'admin' -> 'Copy login command' and select "Display Token".
+
image::login.png[title=Login Command]

.. Select the *Log in with this token* command and login into the OpenShift cluster.
+
```bash
$ oc login -u admin \
https://api.cluster-<your_guid>.dynamic.redhatworkshops.io:6443
$ oc login --token=XXXXX --server=https://api.cluster-<your_guid>.dynamic.redhatworkshops.io:6443
```

Ensure that you switch to the *devhub* project.
+
```bash
$ oc project devhub
```

Expand All @@ -130,10 +142,9 @@ $ *helm upgrade \
-i rhdh -f /tmp/values.yaml \
openshift-helm-charts/redhat-developer-hub*

Release "rhdh" does not exist. Installing it now.
...
Release "rhdh" has been upgraded. Happy Helming!
NAME: rhdh
LAST DEPLOYED: Thu Jun 27 13:59:33 2024
LAST DEPLOYED: Tue Jan 7 16:27:07 2025
NAMESPACE: devhub
STATUS: deployed
REVISION: 1
Expand All @@ -144,31 +155,11 @@ REVISION: 1
[subs=+quotes]
----
$ *oc get pods*
NAME READY STATUS RESTARTS AGE
rhdh-84fb7ddd9d-nvdcf 1/1 Running 0 2m17s
rhdh-postgresql-0 1/1 Running 0 2m16s
----

. Fetch the OpenShift route for RHDH and open the URL in a browser to navigate to the RHDH home page.
+
[subs=+quotes]
----
$ *oc get route \
rhdh-redhat-developer-hub \
--output jsonpath={.spec.host}*

rhdh-developer-hub-devhub.apps.cluster-<guid>.dynamic.redhatworkshops.io
NAME READY STATUS RESTARTS AGE
rhdh-7485cc8cd-b4dpp 1/1 Running 0 103s
rhdh-postgresql-0 1/1 Running 0 25m
----

== RHDH PostgreSQL Database

[WARNING]
====
The default installation of RHDH (for both Helm Charts and Operator based installs) deploys a single PostgreSQL 15 database pod. This is a potential single point of failure and could prevent RHDH from being highly available.

You should follow the installation instructions and install the default single instance PostgreSQL to complete the install. You can then configure the RHDH container to integrate with an external PostgreSQL database instance using the instructions provided in the product documentation at https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.2/html/administration_guide_for_red_hat_developer_hub/assembly-configuring-external-postgresql-databases#proc-configuring-postgresql-instance-using-helm_assembly-install-rhdh-ocp[Configuring an external PostgreSQL instance using the Helm Chart^].
====

== Installation Troubleshooting

The following are some problems you could see during installation, and the potential fix for them.
Expand All @@ -184,7 +175,7 @@ Backend failed to start up Error: Missing required config value at
'backend.database.client'
```
+
*Solution*: This is happening because the configuration files are not being appropriately accessed by the RHDH container. You may have edited the helm chart values before installation, and one or more attributes are missing or configured incorrectly. It is recommended to keep the default values (except for the wildcard DNS name of the OpenShift cluster) during installation.
*Solution*: This is happening because the configuration files are not being appropriately accessed by the RHDH container. You may have edited the helm chart values before installation, and one or more attributes are missing or configured incorrectly. It is recommended to keep the default values (except for the wildcard DNS name of the OpenShift cluster) during installation.
+
You can always edit and update the RHDH configuration after the installation is completed successfully.

Expand Down
24 changes: 10 additions & 14 deletions modules/chapter1/pages/install-operator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Red Hat provides a fully supported operator for RHDH in the OpenShift *OperatorH

RHDH can be installed from within the OpenShift web console just like any other operator from `OperatorHub`.

Refer to the instructions https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.2/html-single/administration_guide_for_red_hat_developer_hub/index#proc-install-rhdh-ocp-operator_assembly-install-rhdh-ocp[here^] to install the RHDH operator on OpenShift.
Refer to the instructions https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.4/html/installing_red_hat_developer_hub_on_openshift_container_platform/assembly-install-rhdh-ocp-operator[here^] to install the RHDH operator on OpenShift.

== Lab: Installation using RHDH Operator

Expand Down Expand Up @@ -41,13 +41,15 @@ image::rhdh-op-details.png[title=RHDP Operator Details]
+
image::rhdh-operator-installed.png[title=RHDH Operator Installed]

. Click `View Operator`, and then click `Create instance` to create a new RHDH instance.
. Click `Installed Operator` and select `Red Hat Developer Hub Operator`, and then click `Create instance` to create a new RHDH instance.
+
image::rhdh-create-op-instance.png[title=RHDH Create new Instance]

. In the `Create Backstage` page, change the `Name` to *rhdh*, leave all other fields at default values, and then click `Create` to deploy a new RHDH instance.
+
image::rhdh-backstage.png[title=RHDH Create Backstage]

. Switch to the `Developer` perspective in the OpenShift web console, and select the `devhub` project. Verify that a new instance called `rhdh` is seen with two pods in running state.
. Switch to the `Developer` perspective in the OpenShift web console, select `Topology` option and select the `devhub` project. Verify that a new instance called `rhdh` is seen with two pods in running state.
+
image::rhdh-op-instance-running.png[title=RHDH instance running]

Expand All @@ -60,17 +62,11 @@ image::rhdh-op-installed.png[title=RHDH Open URL]
image::rhdh-homepage.png[title=RHDH Log in Page]

. Click `Enter` in the `Guest` card to log in as a guest user. You will a warning message pop up with the text `Failed to sign in as a guest using the auth backend. Do you want to fallback to the legacy guest token?`. Click `Yes` to log in as a guest user.
You will configure RHDH to authenticate against GitHub and other identity providers in later chapters of this course.
+
image::rhdh-message.png[title=Warning message]

.. You will configure RHDH to authenticate against GitHub and other identity providers in later chapters of this course.
+
image::rhdh-guest-user.png[title=Log in as a guest user]
+
You have now successfully installed Red Hat Developer Hub on your OpenShift cluster using the RHDH operator.

== RHDH PostgreSQL Database

[WARNING]
====
The default installation of RHDH (for both Helm Charts and Operator based installs) deploys a single PostgreSQL 15 database pod. This is a potential single point of failure and could prevent RHDH from being highly available.

You should follow the installation instructions and install the default single instance PostgreSQL to complete the installation. You can then configure the RHDH container to integrate with an external PostgreSQL database instance using the instructions provided in the product documentation at https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.2/html/administration_guide_for_red_hat_developer_hub/assembly-configuring-external-postgresql-databases#proc-configuring-postgresql-instance-using-helm_assembly-install-rhdh-ocp[Configuring an external PostgreSQL instance using the Helm Chart^].
====
You have now successfully installed Red Hat Developer Hub on your OpenShift cluster using the RHDH operator.
13 changes: 11 additions & 2 deletions modules/chapter1/pages/uninstall.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,19 @@ image::helm-release-delete.png[title=Delete Helm Release]

You can uninstall RHDH using the *helm* CLI.

. Log in to the OpenShift cluster as the cluster administrator. Ensure that you switch to the *devhub* project.
. Log in to the OpenShift cluster as the cluster administrator. For this, select 'admin' -> 'Copy login command' and select "Display Token".
+
image::login.png[title=Login Command]

.. Select the *Log in with this token* command and login into the OpenShift cluster.
+
```bash
$ oc login --token=XXXXX --server=https://api.cluster-<your_guid>.dynamic.redhatworkshops.io:6443
```

Ensure that you switch to the *devhub* project.
+
```bash
$ oc login -u admin https://api.cluster-<your_guid>.dynamic.redhatworkshops.io:6443
$ oc project devhub
```

Expand Down
21 changes: 15 additions & 6 deletions modules/chapter1/pages/upgrade.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,31 @@ image::select-chart-upgrade.png[title=Select Upgrade Version]

You can update RHDH using the *helm* CLI.

. Log in to the OpenShift cluster as the cluster administrator. Ensure that you switch to the *devhub* project.
. Log in to the OpenShift cluster as the cluster administrator. For this, select 'admin' -> 'Copy login command' and select "Display Token".
+
image::login.png[title=Login Command]

.. Select the *Log in with this token* command and login into the OpenShift cluster.
+
```bash
$ oc login --token=XXXXX --server=https://api.cluster-<your_guid>.dynamic.redhatworkshops.io:6443
```

Ensure that you switch to the *devhub* project.
+
```bash
$ oc login -u admin https://api.cluster-<your_guid>.dynamic.redhatworkshops.io:6443
$ oc project devhub
```

. Assuming there is a new version of the RHDH helm chart (for example, *1.2.1*), run the following command to upgrade RHDH.
. Assuming there is a new version of the RHDH helm chart (for example, *1.4.1*), run the following command to upgrade RHDH.
+
```bash
$ helm upgrade -i rhdh \
openshift-helm-charts/redhat-developer-hub --version 1.2.1
openshift-helm-charts/redhat-developer-hub --version 1.4.1

Release "rhdh" has been upgraded. Happy Helming!
NAME: rhdh
LAST DEPLOYED: Fri Jun 28 18:06:47 2024
LAST DEPLOYED: Tue Jan 7 16:27:07 2025
NAMESPACE: devhub
STATUS: deployed
REVISION: 2
Expand All @@ -52,7 +61,7 @@ You can also supply extra values to the chart by creating a *new-values.yml* fil
+
```bash
$ helm upgrade -i rhdh -f new-values.yml \
openshift-helm-charts/redhat-developer-hub --version 1.2.1
openshift-helm-charts/redhat-developer-hub --version 1.4.1
```

== Upgrading the RHDH Operator using the OpenShift Web Console
Expand Down
Binary file modified modules/chapter2/images/edit-backstage-cr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter2/images/restart-rollout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified modules/chapter2/images/rhdh-op-resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions modules/chapter2/pages/rbac.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,3 @@ Consult the RBAC REST API product documentation to send other queries (POST, PUT
* https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.3/html-single/authorization/index[Configuring authorization in Red Had Developer Hub]
* https://backstage.io/docs/permissions/overview[Permissions Policy in Backstage^]
* https://www.youtube.com/watch?v=V8SwbSRE8CQ[Janus IDP Community Meeting - RBAC^]
* https://github.com/janus-idp/backstage-plugins/blob/main/plugins/rbac-backend/docs/apis.md[Janus IDP RBAC REST API^]
* https://github.com/janus-idp/backstage-plugins/blob/main/plugins/rbac-backend/docs/permissions.md[RBAC resource types in RHDH^]
Loading