diff --git a/modules/chapter1/images/login.png b/modules/chapter1/images/login.png new file mode 100644 index 0000000..46d9ae8 Binary files /dev/null and b/modules/chapter1/images/login.png differ diff --git a/modules/chapter1/images/rhdh-backstage.png b/modules/chapter1/images/rhdh-backstage.png new file mode 100644 index 0000000..219b142 Binary files /dev/null and b/modules/chapter1/images/rhdh-backstage.png differ diff --git a/modules/chapter1/images/rhdh-create-op-instance.png b/modules/chapter1/images/rhdh-create-op-instance.png index fa80b34..c7c393b 100644 Binary files a/modules/chapter1/images/rhdh-create-op-instance.png and b/modules/chapter1/images/rhdh-create-op-instance.png differ diff --git a/modules/chapter1/images/rhdh-message.png b/modules/chapter1/images/rhdh-message.png new file mode 100644 index 0000000..f1363ba Binary files /dev/null and b/modules/chapter1/images/rhdh-message.png differ diff --git a/modules/chapter1/images/rhdh-op-details.png b/modules/chapter1/images/rhdh-op-details.png index 3136e18..9b66c32 100644 Binary files a/modules/chapter1/images/rhdh-op-details.png and b/modules/chapter1/images/rhdh-op-details.png differ diff --git a/modules/chapter1/images/rhdh-op-installed.png b/modules/chapter1/images/rhdh-op-installed.png index 73d68ac..a1aa84d 100644 Binary files a/modules/chapter1/images/rhdh-op-installed.png and b/modules/chapter1/images/rhdh-op-installed.png differ diff --git a/modules/chapter1/images/rhdh-op-instance-running.png b/modules/chapter1/images/rhdh-op-instance-running.png index ff17cb8..e3c3bc5 100644 Binary files a/modules/chapter1/images/rhdh-op-instance-running.png and b/modules/chapter1/images/rhdh-op-instance-running.png differ diff --git a/modules/chapter1/images/rhdh-operator-installed.png b/modules/chapter1/images/rhdh-operator-installed.png index 5ce24e0..aa23eed 100644 Binary files a/modules/chapter1/images/rhdh-operator-installed.png and b/modules/chapter1/images/rhdh-operator-installed.png differ diff --git a/modules/chapter1/images/search-devhub-chart.png b/modules/chapter1/images/search-devhub-chart.png index 8ff3114..b62ce46 100644 Binary files a/modules/chapter1/images/search-devhub-chart.png and b/modules/chapter1/images/search-devhub-chart.png differ diff --git a/modules/chapter1/images/search-devhub-create.png b/modules/chapter1/images/search-devhub-create.png new file mode 100644 index 0000000..99c6a54 Binary files /dev/null and b/modules/chapter1/images/search-devhub-create.png differ diff --git a/modules/chapter1/images/search-devhub-operator.png b/modules/chapter1/images/search-devhub-operator.png index bfdf6f6..9c9c9cb 100644 Binary files a/modules/chapter1/images/search-devhub-operator.png and b/modules/chapter1/images/search-devhub-operator.png differ diff --git a/modules/chapter1/images/uninstall-rhdh-op.png b/modules/chapter1/images/uninstall-rhdh-op.png index a271e9c..0e7daf0 100644 Binary files a/modules/chapter1/images/uninstall-rhdh-op.png and b/modules/chapter1/images/uninstall-rhdh-op.png differ diff --git a/modules/chapter1/pages/install-helm.adoc b/modules/chapter1/pages/install-helm.adoc index 789c36c..f770b65 100644 --- a/modules/chapter1/pages/install-helm.adoc +++ b/modules/chapter1/pages/install-helm.adoc @@ -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-.dynamic.redhatworkshops.io`, where `` is unique to your provisioned OpenShift cluster. @@ -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] @@ -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*. @@ -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-.dynamic.redhatworkshops.io:6443 +$ oc login --token=XXXXX --server=https://api.cluster-.dynamic.redhatworkshops.io:6443 +``` +Ensure that you switch to the *devhub* project. ++ +```bash $ oc project devhub ``` @@ -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 @@ -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-.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. @@ -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. diff --git a/modules/chapter1/pages/install-operator.adoc b/modules/chapter1/pages/install-operator.adoc index 28ff722..57f7ae4 100644 --- a/modules/chapter1/pages/install-operator.adoc +++ b/modules/chapter1/pages/install-operator.adoc @@ -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 @@ -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] @@ -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. \ No newline at end of file diff --git a/modules/chapter1/pages/uninstall.adoc b/modules/chapter1/pages/uninstall.adoc index 02b6687..86d263e 100644 --- a/modules/chapter1/pages/uninstall.adoc +++ b/modules/chapter1/pages/uninstall.adoc @@ -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-.dynamic.redhatworkshops.io:6443 +``` + +Ensure that you switch to the *devhub* project. + ```bash -$ oc login -u admin https://api.cluster-.dynamic.redhatworkshops.io:6443 $ oc project devhub ``` diff --git a/modules/chapter1/pages/upgrade.adoc b/modules/chapter1/pages/upgrade.adoc index 3d0dbee..4c7ba14 100644 --- a/modules/chapter1/pages/upgrade.adoc +++ b/modules/chapter1/pages/upgrade.adoc @@ -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-.dynamic.redhatworkshops.io:6443 +``` + +Ensure that you switch to the *devhub* project. + ```bash -$ oc login -u admin https://api.cluster-.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 @@ -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 diff --git a/modules/chapter2/images/edit-backstage-cr.png b/modules/chapter2/images/edit-backstage-cr.png index 955787c..e99689a 100644 Binary files a/modules/chapter2/images/edit-backstage-cr.png and b/modules/chapter2/images/edit-backstage-cr.png differ diff --git a/modules/chapter2/images/restart-rollout.png b/modules/chapter2/images/restart-rollout.png index 420c2de..807451f 100644 Binary files a/modules/chapter2/images/restart-rollout.png and b/modules/chapter2/images/restart-rollout.png differ diff --git a/modules/chapter2/images/rhdh-op-resources.png b/modules/chapter2/images/rhdh-op-resources.png index a476456..56e438d 100644 Binary files a/modules/chapter2/images/rhdh-op-resources.png and b/modules/chapter2/images/rhdh-op-resources.png differ diff --git a/modules/chapter2/pages/rbac.adoc b/modules/chapter2/pages/rbac.adoc index edcc437..f06901b 100644 --- a/modules/chapter2/pages/rbac.adoc +++ b/modules/chapter2/pages/rbac.adoc @@ -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^]