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インスタンスにダウンロードしてインストールするには:
- 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
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秒です。
- minikubeが実行中であることを確認してください。
- 新しいターミナル・ウィンドウを開き、配布パッケージ・ディレクトリに移動します。
runme_minikube.sh
を実行し、スクリプトの出力に従ってステップを進めます:./runme_minikube.sh [--publish-image]
ノート:
オプションの--publish-image
コマンドは、コンテナをOracle Cloud Infrastructure Registryなどのコンテナ・イメージ・レジストリにアップロードします。- デフォルトのLDAP管理パスワードを入力します(パスワードは表示されません)。これは、組込みLDAP認証サーバーの管理ユーザーのパスワードを設定するために使用されます。
- デフォルトのコントロール・プレーン管理ユーザー・パスワードを入力します(パスワードは表示されません): Blockchain Platform Manager管理ユーザーのパスワードの設定に使用されます。
runme-input.yaml
にStorageClass
が指定されていない場合、システムはデフォルトのストレージ・クラスが設定されているかどうかを確認し、使用するかどうかを尋ねます。- Istioイングレス・ゲートウェイ・サービスのhttpsポートを確認します。LoadBalancerサービス・タイプのデフォルトは443です。
- レジストリ<registry name>パスワードを入力します。これは、イメージをダウンロードするためのコンテナ・イメージ・レジストリ(
runme-input.yaml
で指定)への接続に使用されます。
- 別のターミナル・ウィンドウで、次のコマンドを実行します:
export KUBECONFIG=/<path_to>/.kube/minikube
- Blockchain Platform Managerおよびインスタンスにアクセスするためにminikubeトンネルがアクティブであることを確認します:
minikube tunnel --bind-address 0.0.0.0
- スクリプトは、引き続き
obp-cp
ネームスペースの下に次のサービスをインストールします:control-plane
openldap
obp-auth-server
obp-operator
hlf-operator
- スクリプトは、コントロール・プレーンUIにアクセスできるBlockchain Platform Manager URLを出力します。
Blockchain Platform Managerにアクセスします
インストール後、生成されるBlockchain Platform Managerホスト名のホスト名解決を構成します。
- 次のコマンドを実行して、構成済ホスト名のリストを取得します:
kubectl get virtualservice -n obp-cp -o json | jq -r .items[].spec.hosts[0]
- minikubeホストのIPv4アドレスを、生成されたホストのマッピングIPアドレスとして使用します。
- Blockchain Platform ManagerおよびOracle Blockchain Platformインスタンスにアクセスするには、minikubeトンネルがアクティブであることを確認します。