第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 に移動します。