Installing Red Hat Developer Hub on Amazon Elastic Kubernetes Service
Abstract
Preface Copy linkLink copied to clipboard!
You can install Red Hat Developer Hub on Amazon Elastic Kubernetes Service (EKS) using one of the following methods:
- The Red Hat Developer Hub Operator
- The Red Hat Developer Hub Helm chart
Chapter 1. Installing Developer Hub on EKS with the Operator Copy linkLink copied to clipboard!
The Red Hat Developer Hub Operator installation requires the Operator Lifecycle Manager (OLM) framework.
Additional resources
- For information about the OLM, see Operator Lifecycle Manager(OLM) documentation.
1.1. Installing the Developer Hub Operator with the OLM framework Copy linkLink copied to clipboard!
You can install the Developer Hub Operator on EKS using the Operator Lifecycle Manager (OLM) framework. Following that, you can proceed to deploy your Developer Hub instance in EKS.
Prerequisites
-
You have set the context to the EKS cluster in your current
kubeconfig. For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster. -
You have installed
kubectl. For more information, see Installing or updating kubectl. -
You have subscribed to
registry.redhat.io. For more information, see Red Hat Container Registry Authentication. - You have installed the Operator Lifecycle Manager (OLM). For more information about installation and troubleshooting, see OLM QuickStart or How do I get Operator Lifecycle Manager?
Procedure
Run the following command in your terminal to create the
rhdh-operatornamespace where the Operator is installed:kubectl create namespace rhdh-operator
kubectl create namespace rhdh-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a pull secret using the following command:
kubectl -n rhdh-operator create secret docker-registry rhdh-pull-secret \ --docker-server=registry.redhat.io \ --docker-username=<user_name> \ --docker-password=<password> \ --docker-email=<email>kubectl -n rhdh-operator create secret docker-registry rhdh-pull-secret \ --docker-server=registry.redhat.io \ --docker-username=<user_name> \1 --docker-password=<password> \2 --docker-email=<email>3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow The created pull secret is used to pull the Developer Hub images from the Red Hat Ecosystem.
Create a
CatalogSourceresource that contains the Operators from the Red Hat Ecosystem:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an
OperatorGroupresource as follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
Subscriptionresource using the following code:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to verify that the created Operator is running:
kubectl -n rhdh-operator get pods -w
kubectl -n rhdh-operator get pods -wCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the operator pod shows
ImagePullBackOffstatus, then you might need permissions to pull the image directly within the Operator deployment’s manifest.TipYou can include the required secret name in the
deployment.spec.template.spec.imagePullSecretslist and verify the deployment name usingkubectl get deployment -n rhdh-operatorcommand:kubectl -n rhdh-operator patch deployment \ rhdh.fast --patch '{"spec":{"template":{"spec":{"imagePullSecrets":[{"name":"rhdh-pull-secret"}]}}}}' \ --type=mergekubectl -n rhdh-operator patch deployment \ rhdh.fast --patch '{"spec":{"template":{"spec":{"imagePullSecrets":[{"name":"rhdh-pull-secret"}]}}}}' \ --type=mergeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the default configuration of the operator to ensure that Developer Hub resources can start correctly in EKS using the following steps:
Edit the
backstage-default-configConfigMap in therhdh-operatornamespace using the following command:kubectl -n rhdh-operator edit configmap backstage-default-config
kubectl -n rhdh-operator edit configmap backstage-default-configCopy to Clipboard Copied! Toggle word wrap Toggle overflow Locate the
db-statefulset.yamlstring and add thefsGroupto itsspec.template.spec.securityContext, as shown in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Locate the
deployment.yamlstring and add thefsGroupto its specification, as shown in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Locate the
service.yamlstring and change thetypetoNodePortas follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Save and exit.
Wait for a few minutes until the changes are automatically applied to the operator pods.
1.2. Deploying the Developer Hub instance on EKS with the Operator Copy linkLink copied to clipboard!
Prerequisites
- A cluster administrator has installed the Red Hat Developer Hub Operator.
- You have an EKS cluster with AWS Application Load Balancer (ALB) add-on installed. For more information, see Application load balancing on Amazon Elastic Kubernetes Service and Installing the AWS Load Balancer Controller add-on.
- You have configured a domain name for your Developer Hub instance. The domain name can be a hosted zone entry on Route 53 or managed outside of AWS. For more information, see Configuring Amazon Route 53 as your DNS service documentation.
- You have an entry in the AWS Certificate Manager (ACM) for your preferred domain name. Make sure to keep a record of your Certificate ARN.
-
You have subscribed to
registry.redhat.io. For more information, see Red Hat Container Registry Authentication. -
You have set the context to the EKS cluster in your current
kubeconfig. For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster. -
You have installed
kubectl. For more information, see Installing or updating kubectl.
Procedure
Create a
my-rhdh-app-configconfig map containing theapp-config.yamlDeveloper Hub configuration file by using the following template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Red Hat Developer Hub secret and add a key named
BACKEND_SECRETwith aBase64-encodedstring as value:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
<my_product_secrets>is your preferred Developer Hub secret name, where<my_product_secrets>specifies the unique identifier for your secret configuration within Developer Hub.
ImportantEnsure that you use a unique value of
BACKEND_SECRETfor each Developer Hub instance.You can use the following command to generate a key:
node-p'require("crypto").randomBytes(24).toString("base64")'node-p'require("crypto").randomBytes(24).toString("base64")'Copy to Clipboard Copied! Toggle word wrap Toggle overflow To enable pulling the PostgreSQL image from the Red Hat Ecosystem Catalog, add the image pull secret in the default service account within the namespace where the Developer Hub instance is being deployed:
kubectl patch serviceaccount default \ -p '{"imagePullSecrets": [{"name": "rhdh-pull-secret"}]}' \ -n <your_namespace>kubectl patch serviceaccount default \ -p '{"imagePullSecrets": [{"name": "rhdh-pull-secret"}]}' \ -n <your_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create your
Backstagecustom resource using the following template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
<my_product_secrets>is your preferred Developer Hub secret name, where<my_product_secrets>specifies the identifier for your secret configuration within Developer Hub.
Create an Ingress resource using the following template, ensuring to customize the names as needed:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow In the previous template, replace ` <rhdh_dns_name>` with your Developer Hub domain name and update the value of
alb.ingress.kubernetes.io/certificate-arnwith your certificate ARN.
Verification
Wait until the DNS name is responsive, indicating that your Developer Hub instance is ready for use.
Chapter 2. Installing Developer Hub on EKS with the Helm chart Copy linkLink copied to clipboard!
When you install the Developer Hub Helm chart in Elastic Kubernetes Service (EKS), it orchestrates the deployment of a Developer Hub instance, which provides a robust developer platform within the AWS ecosystem.
Prerequisites
- You have an EKS cluster with AWS Application Load Balancer (ALB) add-on installed. For more information, see Application load balancing on Amazon Developer Hub and Installing the AWS Load Balancer Controller add-on.
- You have configured a domain name for your Developer Hub instance. The domain name can be a hosted zone entry on Route 53 or managed outside of AWS. For more information, see Configuring Amazon Route 53 as your DNS service documentation.
- You have an entry in the AWS Certificate Manager (ACM) for your preferred domain name. Make sure to keep a record of your Certificate ARN.
-
You have subscribed to
registry.redhat.io. For more information, see Red Hat Container Registry Authentication. -
You have set the context to the EKS cluster in your current
kubeconfig. For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster. -
You have installed
kubectl. For more information, see Installing or updating kubectl. - You have installed Helm 3 or the latest. For more information, see Using Helm with Amazon EKS.
Procedure
Go to your terminal and run the following command to add the Helm chart repository containing the Developer Hub chart to your local Helm registry:
helm repo add openshift-helm-charts https://charts.openshift.io/
helm repo add openshift-helm-charts https://charts.openshift.io/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a pull secret using the following command:
kubectl create secret docker-registry rhdh-pull-secret \ --docker-server=registry.redhat.io \ --docker-username=<user_name> \ --docker-password=<password> \ --docker-email=<email>kubectl create secret docker-registry rhdh-pull-secret \ --docker-server=registry.redhat.io \ --docker-username=<user_name> \1 --docker-password=<password> \2 --docker-email=<email>3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow The created pull secret is used to pull the Developer Hub images from the Red Hat Ecosystem.
Create a file named
values.yamlusing the following template:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command in your terminal to deploy Developer Hub using the latest version of Helm Chart and using the values.yaml file created in the previous step:
helm install rhdh \ openshift-helm-charts/redhat-developer-hub \ [--version 1.4.3] \ --values /path/to/values.yaml
helm install rhdh \ openshift-helm-charts/redhat-developer-hub \ [--version 1.4.3] \ --values /path/to/values.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
For the latest chart version, see https://github.com/openshift-helm-charts/charts/tree/main/charts/redhat/redhat/redhat-developer-hub
Verification
Wait until the DNS name is responsive, indicating that your Developer Hub instance is ready for use.