OpenShift Dedicated on Google Cloud Platform への Red Hat Developer Hub のインストール
Operator または Helm チャートを使用して、Red Hat OpenShift Dedicated 上で Red Hat Developer Hub を実行します。
概要
はじめに リンクのコピーリンクがクリップボードにコピーされました!
次のいずれかの方法を使用して、OpenShift Dedicated on Google Cloud Platform (GCP) に Developer Hub をインストールできます。
- Red Hat Developer Hub Operator
- Red Hat Developer Hub Helm チャート
Developer Hub インスタンスの外部 URL に一致するように、app-config.yaml で baseUrl を設定する必要があります。この値は、Red Hat Developer Hub が正常に機能するために必要です。設定されていない場合、フロントエンドおよびバックエンドサービスは適切に通信できず、機能が想定どおりに機能しない可能性があります。
第1章 Operator を使用して OpenShift Dedicated on GCP に Red Hat Developer Hub をインストールする リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Developer Hub Operator を使用して、OpenShift Dedicated on GCP に Developer Hub をインストールできます。
前提条件
- 有効な GCP アカウントを持っている。
- OpenShift Dedicated クラスターが GCP 上で実行されている。詳細は、Red Hat OpenShift Dedicated ドキュメントの GCP でのクラスターの作成 を参照してください。
- OpenShift Dedicated クラスターと GCP プロジェクトへの管理者アクセス権がある。
手順
- OpenShift Container Platform Web コンソールメニューで、Operators > OperatorHub に移動し ます。
- Filter by keyword フィールドに Developer Hub と入力し、Red Hat Developer Hub Operator カードをクリックします。
- Red Hat Developer Hub Operator ページで、Install をクリックします。
- インストールが完了したら、Installed Operators に移動し、Red Hat Developer Hub Operator を選択します。
カスタム設定をプロビジョニングします。
apiVersion: v1 kind: ConfigMap metadata: name: app-config-rhdh data: "app-config-rhdh.yaml": | app: title: Red Hat Developer Hub baseUrl: https://__<my_developer_hub_url>__ backend: auth: externalAccess: - type: legacy options: subject: legacy-default-config secret: "${BACKEND_SECRET}" baseUrl: https://__<my_developer_hub_url>__ cors: origin: https://__<my_developer_hub_url>__app-config-rhdhという名前の設定マップとBACKEND_SECRETを含む Kubernetes シークレットを作成する必要があります。これらのリソースは、認証およびアプリケーション設定の Developer Hub インスタンスが使用します。詳細な手順については、カスタム Red Hat Developer Hub 設定のプロビジョニング を 参照してください。
以下のように
app-config.yamlを含むapp-config-rhdhという名前の設定マップを作成します。apiVersion: v1 kind: ConfigMap metadata: name: app-config-rhdh data: "app-config-rhdh.yaml": | app: title: Red Hat Developer Hub baseUrl: https://__<my_developer_hub_url>__ backend: auth: externalAccess: - type: legacy options: subject: legacy-default-config secret: "${BACKEND_SECRET}" baseUrl: https://__<my_developer_hub_url>__ cors: origin: https://__<my_developer_hub_url>__my-rhdh-secretsという名前のシークレットを作成し、Base64 でエンコードされた文字列を値として持つBACKEND_SECRETという名前のキーを追加します。apiVersion: v1 kind: Secret metadata: name: my-rhdh-secrets stringData: # TODO: Add the necessary auth secrets for service-to-service auth setup BACKEND_SECRET: "xxx" # Replace with your Base64-encoded secret- Developer Hub Operator ページに戻り、Create New Instance をクリックします。
- Developer Hub デプロイメントの名前とターゲット namespace を指定します。
- Git 統合、シークレット、ユーザーパーミッションなど、必要なオプションを設定します。
- 設定を確認し、デプロイメントオプションを選択して、Create をクリックします。
検証
- Developer Hub にアクセスするには、OpenShift Container Platform Web コンソールで提供されている Developer Hub URL に移動します。
第2章 Helm チャートを使用して OpenShift Dedicated on GCP に Red Hat Developer Hub をインストールする リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Developer Hub Helm チャートを使用して、OpenShift Dedicated on GCP に Developer Hub をインストールできます。
前提条件
- 有効な GCP アカウントを持っている。
- OpenShift Dedicated クラスターが GCP 上で実行されている。詳細は、Red Hat OpenShift Dedicated ドキュメントの GCP でのクラスターの作成 を参照してください。
- Helm 3 以降がインストールされている。
手順
- Developer Hub Web コンソールの Developer パースペクティブから、+Add をクリックします。
- Developer Catalog パネルから、Helm Chart をクリックします。
- Filter by keyword ボックスに Developer Hub と入力し、Red Hat Developer Hub カードをクリックします。
- Red Hat Developer Hub ページで、Create をクリックします。
-
クラスターから、OpenShift Container Platform ルーターホスト (例:
apps.<clusterName>.com) をコピーします。 ラジオボタンを選択して、Form ビューまたは YAML ビューのいずれかを使用して Developer Hub インスタンスを設定します。
重要Helm チャートを使用して Developer Hub をデプロイする前に、インスタンスのパブリック
baseUrlなどのカスタム設定を定義する必要があります。baseUrlを設定しないと、アプリケーションは正しく機能しません。この設定は、Helm インストールウィザードで Form view または YAML view を使用して定義できます。baseUrlを設定するには、Helm 設定で次の値を設定します。global: app: baseUrl: https://<your-developer-hub-url> backend: baseUrl: https://<your-developer-hub-url> cors: origin: https://<your-developer-hub-url>追加のシークレット、プラグイン、および高度な設定を
values.yamlファイルに定義することもできます。詳細な手順については、カスタム Red Hat Developer Hub 設定のプロビジョニング を 参照してください。デフォルトでは Form view が選択されています。
Form view を使用する場合
- Form view を使用してインスタンスを設定するには、Root Schema → global → Enable service authentication within Backstage instance に移動し、OpenShift Container Platform ルーターホストを Form のフィールドに貼り付けます。
YAML view を使用する場合
YAML ビューを使用してインスタンスを設定するには、次の例に示すように、
global.clusterRouterBaseパラメーター値に OpenShift Container Platform ルーターのホスト名を貼り付けます。global: auth: backend: enabled: true clusterRouterBase: apps.<clusterName>.com # other Red Hat Developer Hub Helm Chart configurations
- 必要に応じて他の値を編集し、Create をクリックして、データベースと Developer Hub が起動するのを待ちます。
検証
- Developer Hub にアクセスするには、Open URL アイコンをクリックします。