minikubeでのOracle Blockchain Platform Enterprise Editionのデプロイ

minikubeは、テストおよび内部開発目的で使用できます。本番環境にはお薦めしません。

前提条件:
  • CPU: 8以上
  • メモリー: 16GB
  • 空きディスク容量: 50GB以上
  • スーパーユーザー権限を持つroot以外のユーザー
  • minikubeノードがインターネットにアクセスできることを確認します。これは、Oracle Blockchain Platformインスタンスへのチェーンコードのインストールに必要です。
  • minikube v1.33.1以降

minikubeのインストール

この項では、テスト済バージョンのminikubeをインストールする例を示します。詳細は、「Kubernetes Install Tools」を参照してください。

#Download the latest minikube binary
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

#Install
sudo install minikube-linux-amd64 /usr/local/bin/minikube

#Verify Installation
minikube version

#Start Minikube
minikube start

#Verify Minikube Installation
minikube status
#Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

#Install minikube using Homebrew
brew install minikube

#Start minikube
minikube start

#Verify minikube Installation
minikube status

Istioインストールの完了

Oracle Blockchain Platform Enterprise Editionでは、バージョン1.20.2以降がサポートされています。次を実行する前に、「Istioのインストール」の手順を完了している必要があります。


# Install
    istioctl install --set profile=default --set values.pilot.env.ENABLE_TLS_ON_SIDECAR_INGRESS=true --set components.cni.enabled=true --set values.cni.repair.deletePods="true"
    ## Enter "y" when prompted for "Proceed? (y/N)"
 
# Verify:
    $ istioctl version
    client version: 1.22.1
    control plane version: 1.22.1
    data plane version: 1.22.1 (1 proxies)

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

Oracle Blockchain Platform Enterprise Editionをminikubeインスタンスにダウンロードしてインストールするには:

  1. Oracle Blockchain Platform Enterprise Editionのページで、「Download」をクリックし、ステップに従ってOracle Blockchain Platform Enterprise Editionパッケージをダウンロードします。パッケージを解凍し、ダウンロードしたアーカイブ・ファイルからパッケージを抽出します。
    tar -xzf <distribution-package-file>
    # example tar -xzf obpee_package_24.1.3-20240723083137.tgz
  2. 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
     
    # storageClassName should be set to create a dynamic persistent volume. If empty, default storageClass is used.
     
    controlPlaneStorage:
      storageClassName: 
      # Example 500Mi, 5Gi
      size: 4Gi
      
    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: 使用するコンテナ・レジストリ・サーバー。例: iad.ocir.io
    • imageRegistryConfiguration.imageTagPrefix: レジストリを含むコンテナ・ベース・リポジトリ・パスで、イメージのプッシュ先(プル元)です。例: iad.ocir.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
    • imagePullTimeout: Oracle Blockchain Platform Enterprise Editionのインストール中のイメージ・プル待機タイムアウト(秒)。デフォルトは1800秒です。
  3. minikubeが実行中であることを確認してください。
  4. 新しいターミナル・ウィンドウを開き、配布パッケージ・ディレクトリに移動します。runme_minikube.shを実行し、スクリプトの出力に従ってステップを進めます:
    ./runme_minikube.sh [--publish-image]

    ノート:

    オプションの--publish-imageコマンドは、コンテナをOracle Cloud Infrastructure Registryなどのコンテナ・イメージ・レジストリにアップロードします。
    • デフォルトのLDAP管理パスワードを入力します(パスワードは表示されません)。これは、組込みLDAP認証サーバーの管理ユーザーのパスワードを設定するために使用されます。
    • デフォルトのコントロール・プレーン管理ユーザー・パスワードを入力します(パスワードは表示されません): Blockchain Platform Manager管理ユーザーのパスワードの設定に使用されます。
    • runme-input.yamlStorageClassが指定されていない場合、システムはデフォルトのストレージ・クラスが設定されているかどうかを確認し、使用するかどうかを尋ねます。
    • Istioイングレス・ゲートウェイ・サービスのhttpsポートを確認します。LoadBalancerサービス・タイプのデフォルトは443です。
    • レジストリ<registry name>パスワードを入力します。これは、イメージをダウンロードするためのコンテナ・イメージ・レジストリ(runme-input.yamlで指定)への接続に使用されます。
  5. 別のターミナル・ウィンドウで、次のコマンドを実行します:
    export KUBECONFIG=/<path_to>/.kube/minikube
  6. Blockchain Platform Managerおよびインスタンスにアクセスするためにminikubeトンネルがアクティブであることを確認します:
    minikube tunnel --bind-address 0.0.0.0
  7. スクリプトは、引き続きobp-cpネームスペースの下に次のサービスをインストールします:
    • control-plane
    • openldap
    • obp-auth-server
    • obp-operator
    • hlf-operator
  8. スクリプトは、コントロール・プレーンUIにアクセスできるBlockchain Platform Manager URLを出力します。

Blockchain Platform Managerにアクセスします

インストール後、生成されるBlockchain Platform Managerホスト名のホスト名解決を構成します。
  1. 次のコマンドを実行して、構成済ホスト名のリストを取得します:
    kubectl get virtualservice -n obp-cp -o json | jq -r .items[].spec.hosts[0]
  2. minikubeホストのIPv4アドレスを、生成されたホストのマッピングIPアドレスとして使用します。
  3. Blockchain Platform ManagerおよびOracle Blockchain Platformインスタンスにアクセスするには、minikubeトンネルがアクティブであることを確認します。