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のドキュメントに精通しておく必要があります。

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である必要があります。

  1. OpenShiftクラスタ・コンソールを開きます。
  2. kube:adminCopy login commandの順に選択します。ユーザーIDとパスワードの入力を求められます。
    「トークンの表示」をクリックします。「Log in with this token」コマンドをコピーして、OpenShiftコマンドライン・インタフェースに貼り付けます。
    $ oc login --token=<token> --server=<openshift_cluster_url>
  3. OpenShiftに接続していることを確認します。
    oc get nodes
    このコマンドは、マスター・ノードとワーカー・ノードのリストとそのステータスを返します。
  4. 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"
  5. Oracle Blockchain Platform: Oracle Blockchain Platformをダウンロードします。
  6. zipパッケージを抽出し、OpenShiftのrunmeスクリプトを見つけます。
  7. 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: 1800
    前の例では、次のリストに示すように変数が定義されています。
    • imageRegistryConfiguration.registry: 使用するコンテナ・レジストリ・サーバー。
    • imageRegistryConfiguration.imageTagPrefix: レジストリのあるコンテナ・ベース・リポジトリ・パスで、イメージのプッシュ先およびプル元です。例: registryname.azurecr.io/obpee/bcs
    • imageRegistryConfiguration.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.com
    • imagePullTimeout: Oracle Blockchain Platform Enterprise Editionのインストール中のイメージ・プル待機タイムアウト(秒)。デフォルトは1800秒。
  8. runme_openshift.shをエディタで開き、次の2行をコメント・アウトします。
    • openshift_status_check
    • check_software_exists "crc"
  9. 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
  10. Istioイングレス・ゲートウェイ・サービスの外部IPアドレスを取得します:
    kubectl get svc/istio-ingressgateway -n istio-system
  11. ブロックチェーン・プラットフォーム・マネージャ・コンソールへの接続に使用するホスト上のこれらのファイルの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にログオンしてインスタンスをプロビジョニングする準備が整いました。