developer-hub

by joaquinito2051

Helm chartv1.1.0App 1.1-97Apache-2.0

A Helm chart for deploying Red Hat Developer Hub

About this chart

Red Hat Developer Hub is an enterprise-grade, open developer platform for building developer portals, containing a supported and opinionated framework. Boosting the engineering team's productivity and increasing the competitive advantages, the Red Hat Developer Hub helps reduce frustration in the engineering team.

Dependencies

The helm chart packages the following subcharts. Their respective values can be available under the subchart name key in Helm values.

RepositoryNameVersion
https://backstage.github.io/chartsupstream(backstage)1.9.1
https://charts.bitnami.com/bitnamicommon2.14.1

Installation

Prerequisites

The helm chart deploys Red Hat Developer Hub and includes the following prerequisites:

Procedure

Before proceeding to install the chart, download a Quay.io pullSecret associated with your Red Hat Developer Hub subscription. The pull secret grants you access to the developer preview version of the Red Hat Developer Hub. Without Quay.io access, the helm chart will not install.

  1. Go to Quay.io and log in.
  2. Open Account Settings in the menu available on the top-right side.
  3. Click Generate Encrypted Password and repeat your password and click Verify
  4. Select Kubernetes Secret tab and view or download the secret
  5. Change the secrets .metadata.name to rhdh-pull-secret
  6. Log into your OpenShift/Kubernetes cluster and create the secret

OpenShift Helm Catalog

  1. Click the "Create" button at the top of the modal dialog on this page

  2. Update host settings, so Backstage can create proper connection between its frontend and backend:

    • If you plan to use the default OpenShift router, please update:

      global:
        clusterRouterBase: apps.example.com
      
    • If you want to host Red Hat Developer Hub on a custom host or if you are not using OpenShift, please update:

      global:
        host: backstage.example.com
      
    • If you are not using OpenShift, please instruct the chart not to deploy Route resource and use Ingress instead:

      route:
        enabled: false
      upstream:
        ingress:
          enabled: true
      
  3. Update your storage preference. If you do not want persistent storage attached to the deployed database, please update:

    upstream:
      postgresql:
        primary:
          persistence:
            enabled: false
    

Manual installation from the Chart Repository

  1. Add the chart repository using the following command:

    helm repo add openshift-helm-charts https://charts.openshift.io/
    
  2. Download the default values and review them:

    helm show values openshift-helm-charts/redhat-developer-hub > values.yaml
    
  3. Perform the required value changes mentioned in the section OpenShift Helm Catalog above in steps 2 and 3.

  4. Install the chart:

    helm upgrade -i <release_name> -f values.yaml openshift-helm-charts/redhat-developer-hub
    

Uninstalling the Chart

To uninstall/delete the <release_name> helm release manually, run:

helm uninstall <release_name>

Values

KeyDescriptionTypeDefault
global.authEnable service authentication within Backstage instanceobject{"backend":{"enabled":true,"existingSecret":"","value":""}}
global.auth.backendBackend service to service authentication Ref: https://backstage.io/docs/auth/service-to-service-auth/object{"enabled":true,"existingSecret":"","value":""}
global.auth.backend.enabledEnable backend service to service authentication, unless configured otherwise it generates a secret valuebooltrue
global.auth.backend.existingSecretInstead of generating a secret value, refer to existing secretstring""
global.auth.backend.valueInstead of generating a secret value, use the following valuestring""
global.clusterRouterBaseShorthand for users who do not want to specify a custom HOSTNAME. Used ONLY with the DEFAULT upstream.backstage.appConfig value and with OCP Route enabled.string""
global.dynamic.includesArray of YAML files listing dynamic plugins to include with those listed in the plugins field. Relative paths are resolved from the working directory of the initContainer that will install the plugins (/opt/app-root/src).list["dynamic-plugins.default.yaml"]
global.dynamic.includes[0]List of dynamic plugins included inside the janus-idp/backstage-showcase container image, some of which are disabled by default. This file ONLY works with the janus-idp/backstage-showcase container image.string"dynamic-plugins.default.yaml"
global.dynamic.pluginsList of dynamic plugins, possibly overriding the plugins listed in includes files. Every item defines the plugin package as a NPM package spec, an optional pluginConfig with plugin-specific backstage configuration, and an optional disabled flag to disable/enable a plugin listed in includes files. It also includes an integrity field that is used to verify the plugin package integrity.list[]
global.hostCustom hostname shorthand, overrides global.clusterRouterBase, upstream.ingress.host, route.host, and url values in upstream.backstage.appConfig. If neither global.clusterRouterBase nor global.host are set, the helm chart will attempt to autofill with the hostname of the OCP Ingress configurationstring""
routeOpenShift Route parametersobject{"annotations":{},"enabled":true,"host":"{{ .Values.global.host }}","path":"/","tls":{"caCertificate":"","certificate":"","destinationCACertificate":"","enabled":true,"insecureEdgeTerminationPolicy":"Redirect","key":"","termination":"edge"},"wildcardPolicy":"None"}
route.annotationsRoute specific annotationsobject{}
route.enabledEnable the creation of the route resourcebooltrue
route.hostSet the host attribute to a custom value. If not set, OpenShift will generate it, please make sure to match your baseUrlstring"{{ .Values.global.host }}"
route.pathPath that the router watches for, to route traffic for to the service.string"/"
route.tlsRoute TLS parameters Ref: https://docs.openshift.com/container-platform/4.9/networking/routes/secured-routes.htmlobject{"caCertificate":"","certificate":"","destinationCACertificate":"","enabled":true,"insecureEdgeTerminationPolicy":"Redirect","key":"","termination":"edge"}
route.tls.caCertificateCert authority certificate contents. Optionalstring""
route.tls.certificateCertificate contentsstring""
route.tls.destinationCACertificateContents of the ca certificate of the final destination. When using reencrypt termination this file should be provided in order to have routers use it for health checks on the secure connection. If this field is not specified, the router may provide its own destination CA and perform hostname validation using the short service name (service.namespace.svc), which allows infrastructure generated certificates to automatically verify.string""
route.tls.enabledEnable TLS configuration for the host defined at route.host parameterbooltrue
route.tls.insecureEdgeTerminationPolicyIndicates the desired behavior for insecure connections to a route. While each router may make its own decisions on which ports to expose, this is normally port 80. The only valid values are None, Redirect, or empty for disabled.string"Redirect"
route.tls.keyKey file contentsstring""
route.tls.terminationSpecify TLS termination.string"edge"
route.wildcardPolicyWildcard policy if any for the route. Currently only 'Subdomain' or 'None' is allowed.string"None"
upstreamUpstream Backstage chart configurationobjectUse Openshift compatible settings
upstream.backstage.extraVolumes[0]Ephemeral volume that will contain the dynamic plugins installed by the initContainer below at start.object{"ephemeral":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"2Gi"}}}}},"name":"dynamic-plugins-root"}
upstream.backstage.extraVolumes[0].ephemeral.volumeClaimTemplate.spec.resources.requests.storageSize of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins.string"2Gi"
upstream.backstage.initContainers[0].imageImage used by the initContainer to install dynamic plugins into the dynamic-plugins-root volume mount. It could be replaced by a custom image based on this one.stringquay.io/janus-idp/backstage-showcase:latest

Opinionated Backstage deployment

This chart defaults to an opinionated deployment of Backstage that provides user with a usable Backstage instance out of the box.

Features enabled by the default chart configuration:

  1. Uses Red Hat Developer Hub image that pre-loads a lot of useful plugins and features
  2. Exposes a Route for easy access to the instance
  3. Enables OpenShift-compatible PostgreSQL database storage

For additional instance features please consuls Red Hat Developer Hub documentation.

Additional features can be enabled by extending the default configuration at:

upstream:
  backstage:
    appConfig:
      # Inline app-config.yaml for the instance
    extraEnvVars:
      # Additional environment variables

Features

Red Hat Developer Hub is an opinionated deployment of Backstage that provides user with a usable instance out of the box.

Features enabled by the default chart configuration:

  1. Uses Red Hat Developer Hub image that pre-loads a lot of useful plugins and features
  2. Exposes a Route for easy access to the instance. Alternatively, allows you to expose an Ingress resource for non-OpenShift deployments.
  3. Enables OpenShift-certified PostgreSQL database storage.

For additional instance features, see Red Hat Developer Hub documentation.

Deploy developer-hub with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has developer-hub on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdeveloper-hub is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply