Azure Red Hat OpenShiftへのOracle Blockchain Platform Enterprise Editionのデプロイ
Azure Red Hat OpenShiftにOracle Blockchain Platform Enterprise Editionをインストールできます。OpenShiftは、コンテナ化されたアプリケーションを大規模に構築、デプロイおよび管理するためのツール・スイートを使用して標準Kubernetesを強化するRed HatのエンタープライズKubernetesプラットフォームです。Azure Red Hat OpenShiftは、Microsoft Azure上のフルマネージドのOpenShiftサービスです。
このトピックの手順は、Oracle Blockchain Platform Enterprise EditionをAzure Red Hat OpenShiftにデプロイする方法を示唆するガイドラインです。これを実際に試す前に、特に本番環境では、このトピックの情報よりも優先される Azure Red Hat OpenShiftのドキュメントに精通しておく必要があります。
- Azure Red Hat OpenShift: Azure Red Hat OpenShiftについて
- Azure Red Hat OpenShiftドキュメント: Azure Red Hat OpenShiftドキュメント
Microsoft AzureでのRed Hat OpenShiftクラスタの作成
Azure Red Hat OpenShift Clusterの推奨最小仕様。
Azureドキュメントをガイドとして使用して、Azure Red Hat OpenShiftクラスタを作成します: Azure Red Hat OpenShiftクラスタの作成
次のものを作成する必要があります。
- コントロール・プレーン・仮想マシン: 3つのStandard_D8s_v3
- ワーカー・ノードVM: 4つのStandard_D4s_v3
- Red Hatプルシークレットを生成します。
Oracle Blockchain Platform Enterprise Editionのインストール
Oracle Blockchain Platformデプロイメントに必要なイメージは、Microsoft Azure VMにプッシュされる前にDockerリポジトリに格納されます。ソフトウェアをインストールするリージョンにできるかぎり地理的に近いCloud Linux VMからインストールすることをお薦めします。Dockerイメージのローカル・ストレージは約100GBである必要があります。
- OpenShiftクラスタ・コンソールを開きます。
kube:admin、Copy login commandの順に選択します。ユーザーIDとパスワードの入力を求められます。「トークンの表示」をクリックします。「Log in with this token」コマンドをコピーして、OpenShiftコマンドライン・インタフェースに貼り付けます。$ oc login --token=<token> --server=<openshift_cluster_url>- OpenShiftに接続していることを確認します。
このコマンドは、マスター・ノードとワーカー・ノードのリストとそのステータスを返します。oc get nodes - istioプロファイルを設定します。次のコマンドを実行する前に、「Istioのインストール」のステップを完了している必要があります。
istioctl install --set profile=openshift --set values.pilot.env.ENABLE_TLS_ON_SIDECAR_INGRESS=true --set components.cni.enabled=true --set values.cni.repair.deletePods="true" - Oracle Blockchain Platform: Oracle Blockchain Platformをダウンロードします。
- zipパッケージを抽出し、OpenShiftの
runmeスクリプトを見つけます。 runme-input.yamlファイルを必要な値で更新します。次のrunme-input.yamlファイルの例は、参照として使用できます。
前の例では、次のリストに示すように変数が定義されています。imageRegistryConfiguration: registry: <container_registry_name.azurecr.io> imageTagPrefix: <container-image-repository-prefix.azurecr.io/bcs-k8s-dev > username: <container-registry-username> imageReleaseVersion: 24.1.3-20240723083137 # storageClassName should be set to create a dynamic persistent volume. If empty, default storageClass is used. controlPlaneStorage: storageClassName: # Example 500Mi, 5Gi size: 10Gi parentDomainName: example.com #imagePullTimeout: Use this field to customize the wait time (in seconds) for pulling the required container images from the repository. Default is 1800 seconds. imagePullTimeout: 1800imageRegistryConfiguration.registry: 使用するコンテナ・レジストリ・サーバー。imageRegistryConfiguration.imageTagPrefix: レジストリのあるコンテナ・ベース・リポジトリ・パスで、イメージのプッシュ先およびプル元です。例:registryname.azurecr.io/obpee/bcsimageRegistryConfiguration.username: コンテナ・レジストリのログイン・ユーザー名。Azureの場合、コンテナ・レジストリ・トークンです。imageReleaseVersion- Oracle Blockchain Platform Enterprise Editionリリース・バージョンcontrolPlaneStorage.storageClassName: PVC (PersistentVolumeClaim)に使用するKubernetesストレージ・クラス。空の場合は、デフォルトのstorageClassが使用されます。controlPlaneStorage.size: Blockchain Platform Manager(コントロール・プレーン)サービスのPVCサイズparentDomainName: Blockchain Platform Managerサービスに使用するドメイン名。例:example.comimagePullTimeout: Oracle Blockchain Platform Enterprise Editionのインストール中のイメージ・プル待機タイムアウト(秒)。デフォルトは1800秒。
runme_openshift.shをエディタで開き、次の2行をコメント・アウトします。openshift_status_checkcheck_software_exists "crc"
runme_openshift.shを実行し、プロンプトに従ってステップを完了します。
次のプロンプトが表示されます。chmod +x runme_openshift.sh ./runme_openshift.sh --publish-images # The publish-images option uploads the containers to the container image registry specified in runme-input.yaml # Running the script without this option pulls images you've already pre-uploaded from the repository specified in runme-input.yaml- OpenLDAP管理パスワードを入力します- これはブロックチェーン・プラットフォーム・マネージャによって使用され、ユーザーはこのOpenLDAPサーバー上に作成されます。
- コントロール・プレーン管理パスワードの入力- このパスワードはOracle Blockchain Platform管理ユーザー用であり、Blockhain Platform Managerコンソールへの初回ログイン時に使用されます。
run-input.yamlで指定されたユーザーのレジストリ・ログイン・パスワードを入力します- コンテナ・リポジトリへの接続に使用されます。- このスクリプトは、次のサービスを
obp-cpネームスペースにインストールします。control-planeopenldapobp-auth-serverobp-operatorhlf-operator
- Istioイングレス・ゲートウェイ・サービスの外部IPアドレスを取得します:
kubectl get svc/istio-ingressgateway -n istio-system - ブロックチェーン・プラットフォーム・マネージャ・コンソールへの接続に使用するホスト上のこれらのファイルの1つに、必要に応じて次の行を追加します。
- LinuxまたはmacOS:
/etc/hosts - Windowsの場合:
C:\Windows\system32\drivers\etc\hosts
ここで、<public_svc_ip> controlplane.<parentDomainName> openldap.<parentDomainName> auth.<parentDomainName><public_svc_ip>は、前のステップのパブリック外部IPアドレスです。 - LinuxまたはmacOS:
前提条件
これで、初めてOracle Blockchain Platformにログオンしてインスタンスをプロビジョニングする準備が整いました。