Red Hat OpenShiftオンプレミス・クラスタへのOracle Blockchain Platform Enterprise Editionのデプロイ

Oracle Blockchain Platform Enterprise Editionをデプロイする前に、Red Hat OpenShift Enterpriseクラスタが実行されている必要があり、いくつかの前提条件をインストールする必要があります。

このトピックの手順は、Oracle Blockchain Platform Enterprise EditionをオンプレミスのRed Hat OpenShiftにデプロイする方法を示唆するガイドラインです。これを実際に試す前に、特に本番環境では、このトピックの情報よりも優先される Red Hat OpenShiftのドキュメントについて理解しておく必要があります。

Red Hat OpenShiftクラスタの作成

クラスタは、OpenShift Container Platformの前提条件で概説されているRed Hat OpenShiftのドキュメントに記載されている要件を満たしている必要があります。

クラスタ・ワーカー・ノードの推奨最小仕様:

  高可用性のある本番環境
ノードCPU CPU x 4以上
ノード・メモリー 32 GB以上
ノード数 3以上
ブート・ボリューム・サイズ 100 GB以上

OpenShift CLI (oc)をインストールして、クラスタにアクセスできるようにします。OpenShift CLIを参照してください。

OpenShiftに接続していることを確認します。
oc get nodes
このコマンドは、マスター・ノードとワーカー・ノードのリストとそのステータスを返します。

Oracle Blockchain Platform Enterprise Editionのインストール

  1. 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"
  2. Oracle Blockchain Platform: Oracle Blockchain Platformをダウンロードします。
  3. zipパッケージを抽出し、OpenShiftのrunmeスクリプトを見つけます。
  4. runme-input.yamlファイルを必要な値で更新します。次のrunme-input.yamlファイルの例は、参照として使用できます。
    imageRegistryConfiguration:
      registry: <container_registry_name>
      imageTagPrefix: <container-image-repository-prefix>
      username: <container-registry-username>
     
    imageReleaseVersion: 24.1.3-20240723083137
     
    controlPlaneStorage:
      storageClassName: 
      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: 1800

    ノート:

    イメージのプルが高速になるように、環境にコンテナ・レジストリを設定することをお薦めします。独自のコンテナ・レジストリを使用している場合は、24.1.3-20240723083137 imageReleaseVersion値を使用します。
    前の例では、次のリストに示すように変数が定義されています。
    • imageRegistryConfiguration.registry: 使用するコンテナ・レジストリ・サーバー。
    • imageRegistryConfiguration.imageTagPrefix: レジストリのあるコンテナ・ベース・リポジトリ・パスで、イメージのプッシュ先およびプル元です。例: registryname.rhoscr.io/obpee/bcs
    • imageRegistryConfiguration.username: コンテナ・レジストリのログイン・ユーザー名。
    • imageReleaseVersion - Oracle Blockchain Platform Enterprise Editionリリース・バージョン
    • controlPlaneStorage.storageClassName: PVC (PersistentVolumeClaim)に使用するKubernetesストレージ・クラス。空の場合は、デフォルトのstorageClassが使用されます。
    • controlPlaneStorage.size: Blockchain Platform Manager(コントロール・プレーン)サービスのPVCサイズ
    • parentDomainName: Blockchain Platform Managerサービスに使用するドメイン名。例: example.com。Blockchain Platform Managerとサービス・コンソールのURLには、このドメイン名が含まれます。
    • imagePullTimeout: Oracle Blockchain Platform Enterprise Editionのインストール中のイメージ・プル待機タイムアウト(秒)。デフォルトは1800秒。
  5. runme_openshift.shをエディタで開き、次の2行をコメント・アウトします。
    • openshift_status_check
    • check_software_exists "crc"
  6. 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-plane
      • openldap
      • obp-auth-server
      • obp-operator
      • hlf-operator
  7. Istioイングレス・ゲートウェイ・サービスの外部IPアドレスを取得します:
    kubectl get svc/istio-ingressgateway -n istio-system
  8. ブロックチェーン・プラットフォーム・マネージャ・コンソールへの接続に使用するホスト上のこれらのファイルの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アドレスです。

前提条件

これで、初めてOracle Blockchain Platformにログオンしてインスタンスをプロビジョニングする準備が整いました。