2.2. Helm CLI を使用した OpenShift Container Platform への Developer Hub のデプロイ
Helm CLI を使用して、Red Hat OpenShift Container Platform に Red Hat Developer Hub をインストールできます。
前提条件
-
ワークステーションに OpenShift CLI (
oc) がインストールされている。 - OpenShift Container Platform アカウントにログインしている。
- OpenShift Container Platform 管理者ロールを持つユーザーによって、アプリケーションを作成するための適切なロールと権限がプロジェクト内で設定されている。OpenShift Container Platform のロールの詳細は、RBAC を使用して権限を定義および適用する を参照してください。
- OpenShift Container Platform でプロジェクトを作成している。OpenShift Container Platform でプロジェクトを作成する方法の詳細は、Red Hat OpenShift Container Platform のドキュメント を参照してください。
- Helm CLI ツールがインストールされている。
手順
<my-rhdh-project> OpenShift Container Platform プロジェクトを作成してアクティブ化します。
NAMESPACE=<emphasis><rhdh></emphasis> oc new-project ${NAMESPACE} || oc project ${NAMESPACE}NAMESPACE=<emphasis><rhdh></emphasis> oc new-project ${NAMESPACE} || oc project ${NAMESPACE}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Red Hat Developer Hub Helm チャートをインストールします。
helm upgrade redhat-developer-hub -i https://github.com/openshift-helm-charts/charts/releases/download/redhat-redhat-developer-hub-1.5.3/redhat-developer-hub-1.5.3.tgz
helm upgrade redhat-developer-hub -i https://github.com/openshift-helm-charts/charts/releases/download/redhat-redhat-developer-hub-1.5.3/redhat-developer-hub-1.5.3.tgzCopy to Clipboard Copied! Toggle word wrap Toggle overflow OpenShift Container Platform クラスターの Developer Hub データベースパスワードとルーターベース URL の値を使用して、Developer Hub Helm チャートのインスタンスを設定します。
PASSWORD=$(oc 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/^[^.]*\.//') helm upgrade redhat-developer-hub -i "https://github.com/openshift-helm-charts/charts/releases/download/redhat-redhat-developer-hub-1.5.3/redhat-developer-hub-1.5.3.tgz" \ --set global.clusterRouterBase="$CLUSTER_ROUTER_BASE" \ --set global.postgresql.auth.password="$PASSWORD"PASSWORD=$(oc 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/^[^.]*\.//') helm upgrade redhat-developer-hub -i "https://github.com/openshift-helm-charts/charts/releases/download/redhat-redhat-developer-hub-1.5.3/redhat-developer-hub-1.5.3.tgz" \ --set global.clusterRouterBase="$CLUSTER_ROUTER_BASE" \ --set global.postgresql.auth.password="$PASSWORD"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 実行中の Developer Hub インスタンスの URL を表示します。
echo "https://redhat-developer-hub-$NAMESPACE.$CLUSTER_ROUTER_BASE"
echo "https://redhat-developer-hub-$NAMESPACE.$CLUSTER_ROUTER_BASE"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
検証
- 実行中の Developer Hub インスタンスの URL をブラウザーで開き、Developer Hub を使用します。
関連情報