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

chore: chart: add Red Hat Developer 1.2.6 for registry.redhat.io/rhdh/rhdh-hub-rhel9:1.2-160 #1692

Closed
wants to merge 14 commits into from
Closed
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 not shown.
131 changes: 0 additions & 131 deletions charts/redhat/redhat/redhat-developer-hub/0.1.0/report.yaml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

## Scripted installation

To [install](./install.sh) from a Helm Chart Repository, run the following commands:

```
cd /tmp
# Create or select a namespace
# Install the chart repo
# Install the chart, then update the clusterRouterBase
curl -sSLO https://raw.githubusercontent.com/rhdh-bot/openshift-helm-charts/redhat-developer-hub-1.5-8-CI/installation/install.sh && chmod +x install.sh
./install.sh 1.5-8-CI --namespace rhdh-1-5-8-ci --chartrepo
```

That's it!


## Manual installation

The [install](./install.sh) script creates a chart repo, then follows the [standard installation guide](https://access.redhat.com/documentation/en-us/red_hat_developer_hub/1.1/html-single/administration_guide_for_red_hat_developer_hub/index#proc-install-rhdh-helm_admin-rhdh) and automates these steps:

1. Create a chart repo, with .metadata.name = `rhdh-next-ci-repo`
```
oc apply -f https://github.com/rhdh-bot/openshift-helm-charts/raw/redhat-developer-hub-1.5-8-CI/installation/rhdh-next-ci-repo.yaml
```
2. Go to `Developer` perspective in your cluster
1. Select your namespace or project (eg., `rhdh-helm` or `rhdh-1-5-8-ci`)
1. Click `+Add`, scroll down and select `Helm Chart`
1. Filter out the default charts and just select the `Rhdh Next Ci Repo`
1. **IMPORTANT**: In the chart's YAML view, change the following line to the correct value for your cluster. For example, change
```
clusterRouterBase: apps.example.com
```
to
```
clusterRouterBase: apps.ci-my-cluster-goes-here.com
```
7. Click `Create` and watch the deployment happen from the `Topology` view.
1. Open the `Route` once it's available to see your deployed RHDH instance.

## Optional Verification

To verify a chart, use chart-verifier. This is only needed if you built your own chart and want to check it passes compliance checks.

```
cd /tmp && mkdir -p chartverifier; \\
podman run --rm -i -e KUBECONFIG=/.kube/config \\
-v /home/nboldt/.kube:/.kube:z -v /tmp/chartverifier:/app/chartverifier:z \\
quay.io/redhat-certification/chart-verifier \\
verify --write-to-file https://github.com/rhdh-bot/openshift-helm-charts/raw/redhat-developer-hub-1.5-8-CI/charts/redhat/redhat/redhat-developer-hub/1.5-8-CI/redhat-developer-hub-1.5-8-CI.tgz
echo 'Report in /tmp/chartverifier/report.yaml'
```
51 changes: 51 additions & 0 deletions installation/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: v1
entries:
redhat-developer-hub:
- annotations:
artifacthub.io/category: integration-delivery
artifacthub.io/license: Apache-2.0
artifacthub.io/links: |
- name: support
url: https://github.com/redhat-developer/rhdh-chart/issues
- name: Chart Source
url: https://github.com/redhat-developer/rhdh-chart
- name: Default Image Source
url: https://github.com/janus-idp/backstage-showcase
charts.openshift.io/archs: x86_64
charts.openshift.io/name: Red Hat Developer Hub (CI Build)
charts.openshift.io/provider: Red Hat
charts.openshift.io/supportURL: https://access.redhat.com/support
apiVersion: v2
appVersion: 1.5-8
created: "2024-12-02T12:42:19.054118042-05:00"
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 2.14.1
- alias: upstream
name: backstage
repository: https://backstage.github.io/charts
version: 2.1.0
description: A Helm chart for deploying Red Hat Developer Hub (CI Build)
digest: a65305c58d7e0adc6c4a2837bb6f76c84e13db6f11ac91e1320592acc40b5b94
home: https://red.ht/rhdh
icon: data:image/svg+xml;base64,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IDQuOWUtNCwyLjRlLTQgNy4zZS00LDQuOWUtNCAwLjI0ODYsMC4yNDg5IDAuNDAyNTksMC41OTIzNSAwLjQwMjU5LDAuOTcxMTkgMCwwLjc1ODMgLTAuNjE2NywxLjM3NSAtMS4zNzUsMS4zNzUgeiIKICAgICAgIGZpbGw9IiNmZmZmZmYiCiAgICAgICBzdHJva2Utd2lkdGg9IjAiCiAgICAgICBpZD0icGF0aDIxIiAvPgogIDwvZz4KPC9zdmc+Cg==
keywords:
- backstage
- idp
- janus-idp
- developer-hub
- redhat-developer-hub
- redhat
kubeVersion: '>= 1.19.0-0'
maintainers:
- name: Red Hat
url: https://redhat.com
name: redhat-developer-hub
type: application
urls:
- https://raw.githubusercontent.com/rhdh-bot/openshift-helm-charts/redhat-developer-hub-1.5-8-CI/charts/redhat/redhat/redhat-developer-hub/1.5-8-CI/redhat-developer-hub-1.5-8-CI.tgz
version: 1.5-8-CI
generated: "2024-12-02T12:42:19.040009158-05:00"
77 changes: 77 additions & 0 deletions installation/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/bash -e
#
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# install a helm chart with the correct global.clusterRouterBase

# default namespace if none set
namespace="rhdh-helm"
chartrepo=0 # by default don't create a new chart repo unless the version chart version includes "CI" suffix

usage ()
{
echo "Usage: $0 CHART_VERSION [-n namespace]

Examples:
$0 1.1.1
$0 1.5-8-CI -n rhdh-ci

Options:
-n, --namespace Project or namespace into which to install specified chart; default: $namespace
-r, --chartrepo If set, a Helm Chart Repo will be applied to the cluster, based on the chart version.
If CHART_VERSION ends in CI, this is done by default.
"
exit
}

if [[ $# -lt 1 ]]; then usage; fi

while [[ "$#" -gt 0 ]]; do
case $1 in
'-r'|'--chartrepo') chartrepo=1;;
'-n'|'--namespace') namespace="$2"; shift 1;;
'-h') usage;;
*) CV="$1";;
esac
shift 1
done

if [[ ! $CV ]]; then usage; fi


tmpfile=/tmp/redhat-developer-hub.chart.values.yml
CHART_URL="https://github.com/rhdh-bot/openshift-helm-charts/raw/redhat-developer-hub-${CV}/charts/redhat/redhat/redhat-developer-hub/${CV}/redhat-developer-hub-${CV}.tgz"

# choose namespace for the install (or create if non-existant)
oc new-project "$namespace" || oc project "$namespace"

# if a CI chart, create a chart repo
if [[ $CV == *"-CI" ]]; then chartrepo=1; fi
if [[ $chartrepo -eq 1 ]]; then
oc apply -f https://github.com/rhdh-bot/openshift-helm-charts/raw/redhat-developer-hub-${CV}/installation/rhdh-next-ci-repo.yaml
fi

# 1. install (or upgrade)
helm upgrade redhat-developer-hub -i "${CHART_URL}"

# 2. collect values
PASSWORD=$(kubectl get secret redhat-developer-hub-postgresql -o jsonpath="{.data.password}" | base64 -d)
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')

# 3. change values
helm upgrade redhat-developer-hub -i "${CHART_URL}" \
--set global.clusterRouterBase="${CLUSTER_ROUTER_BASE}" \
--set global.postgresql.auth.password="$PASSWORD"

# 4. cleanup
rm -f "$tmpfile"

echo "
Once deployed, Developer Hub $CV will be available at
https://redhat-developer-hub-${namespace}.${CLUSTER_ROUTER_BASE}
"
Loading
Loading