必備條件

本主題包含安裝 Oracle Blockchain Platform Enterprise Edition 的硬體和軟體先決條件。

Kubernetes 平台

支援下列平台:
  • Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE) v1.29.1 或更新版本
  • Red Hat OpenShift Local - Embedded OpenShift 4.15.3 或更新版本、Code Ready Container 版本 2.34.1 或更新版本相容
  • Microsoft Azure v4.17.27 或更新版本上的 Red Hat OpenShift
  • Red Hat OpenShift 內部部署叢集 v4.17 或更新版本相容
  • minikube v1.33.1 或更新版本 - 僅適用於生產環境

您必須具備可由 DNS 伺服器解析的有效網域名稱。只適用於測試或非生產環境,您可以在 /etc/hosts 檔案中新增項目來設定本機名稱解析。部署後,會產生要在 /etc/hosts 檔案中使用的特定主機名稱和 IP 位址。如需詳細資訊,請參閱您 Kubernetes 版本之安裝主題的存取區塊鏈平台管理程式小節。

其他先決條件軟體

此外,您還需要下列工具來協助管理 Kubernetes 平台及安裝 Oracle Blockchain Platform 容器:
  • kubectl 版本 1.29.3 或更新版本 - Kubernetes 的命令行工具
  • Helm 版本 3.12.3 或更新版本 - Kubernetes 套裝軟體管理員
  • 管理容器和 Pod 的工具 - 請選擇下列其中一項:
    • Podman 版本 4.9.4-rhel 或更新版本
    • Docker 版本 24.0.6 或更新版本
  • yq 版本 4.42.1 - 命令行 YAML 處理器
  • jq v1.7.1 或更新版本 - 命令行 JSON 處理器
  • Istio - 部署的安全和流量管理工具
    • 執行 Oracle Blockchain Platform Enterprise Edition 修正程式 4 或更舊版本之 OKE 或 minikube 的 v1.20.2 或更新版本
    • 執行 Oracle Blockchain Platform Enterprise Edition 修正程式 5 或更新版本之 OKE 或 minikube 的 v1.22.1 或更新版本
    • Red Hat 的 v1.22.1 OpenShift 本機
    • v1.26.0 適用於 Microsoft Azure 上的 Red Hat OpenShift
    • Red Hat OpenShift 內部部署的 v1.26.0
  • istioctl - Istio 的命令行工具

Web 瀏覽器

Oracle Blockchain Platform 中包含的所有管理工具都可以使用下列瀏覽器存取:
  • Mozilla Firefox
  • Microsoft Edge
  • Google Chrome
  • Apple Safari

安裝先決條件軟體

本節提供安裝已測試版本的先決條件的逐步解說範例。如需安裝指示的其他資訊和任何必要的修改,請參閱每項產品的說明文件。

安裝 kubectl

kubectl 版本應該一律在叢集的一個次要版本差異內。例如,如果您的 Kubernetes 叢集版本是 v1.29.1,您可以使用 kubectl v1.29.3。如需其他資訊,請參閱 Kubernetes 安裝工具

# Download:
    curl -LO https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl
 
# Setup:
    # Make binary file executable:
    chmod +x ./kubectl
    # Move the downloaded binary to /usr/local/bin or /usr/bin and make "root" as the owner of this binary
    sudo mv ./kubectl /usr/bin/kubectl
    sudo chown root: /usr/bin/kubectl
 
# Verify:
    $ kubectl version --client --output=yaml
    clientVersion:
        buildDate: "2024-03-15T00:08:19Z"
        compiler: gc
        gitCommit: 6813625b7cd706db5bc7388921be03071e1a492d
        gitTreeState: clean
        gitVersion: v1.29.3
        goVersion: go1.21.8
        major: "1"
        minor: "29"
        platform: linux/amd64
    kustomizeVersion: v5.0.4-0.20230601165947-6ce0bf390ce3

安裝 Helm

Oracle Blockchain Platform Enterprise Edition 已與 Helm v3.12.3 進行測試。如需其他資訊,請參閱安裝 Helm

#Download install script:
    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
 
# Provide execute permission and execute:
    chmod +x get_helm.sh
    ./get_helm.sh
 
# Verify:"
    $ helm version
    version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}

安裝 Podman

Oracle Blockchain Platform Enterprise Edition 使用 Podman v4.9.4-rhel 進行測試。如需其他資訊,請參閱 Podman Installation Instructions

# Update the package list:
    sudo yum update
 
# Install podman:
    sudo yum install podman -y
 
# create docker alias to run podman commands
    sudo yum install -y podman-docker
 
#Verify:
    $ podman --version
        podman version 4.9.4-rhel
    $ docker --version
        podman version 4.9.4-rhel

安裝 YQ

Oracle Blockchain Platform Enterprise Edition 使用 yq v4.42.1 進行測試。如需其他資訊,請參閱 yq README

# Download:
    wget https://github.com/mikefarah/yq/releases/download/v4.42.1/yq_linux_amd64.tar.gz -O - | tar xz
 
# Setup:
    sudo mv yq_linux_amd64 /usr/bin/yq
    sudo chmod +x /usr/bin/yq
 
# Verify:
yq --version

安裝 jq

Oracle Blockchain Platform Enterprise Edition 使用 jq v1.7.1 進行測試。如需其他資訊,請參閱下載 jq

# Install:
    sudo dnf install jq

# Verify:
   jq --version
   jq-1.7.1

安裝 kubectl

kubectl 版本應該一律在叢集的一個次要版本差異內。例如,如果您的 Oracle Kubernetes 引擎叢集版本是 v1.29.1,您可以使用 kubectl v1.29.3。如需其他資訊,請參閱 Kubernetes 安裝工具

curl -LO https://dl.k8s.io/release/v1.29.3/bin/darwin/amd64/kubectl

# Setup:
    # Make binary file executable:
    chmod +x ./kubectl
    # Move the downloaded binary to /usr/local/bin and make "root" as the owner of this binary
    sudo mv ./kubectl /usr/local/bin/kubectl
    sudo chown root: /usr/local/bin/kubectl
 
# Verify:
    $ kubectl version --client --output=yaml

    clientVersion:
        buildDate: "2024-03-15T00:08:19Z"
        compiler: gc
        gitCommit: 6813625b7cd706db5bc7388921be03071e1a492d
        gitTreeState: clean
        gitVersion: v1.29.3
        goVersion: go1.21.8
        major: "1"
        minor: "29"
        platform: darwin/amd64
    kustomizeVersion: v5.0.4-0.20230601165947-6ce0bf390ce3

安裝 Helm

Oracle Blockchain Platform Enterprise Edition 已與 Helm v3.12.3 進行測試。如需其他資訊,請參閱安裝 Helm

#Download install script:
    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
 
# Provide execute permission and execute:
    chmod +x get_helm.sh
    ./get_helm.sh
 
# Verify:"
    $ helm version
    version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}

安裝 Podman

Oracle Blockchain Platform Enterprise Edition 使用 Podman v4.9.4-rhel 進行測試。如需其他資訊,請參閱 Podman Installation Instructions

# Install:
     brew install podman

# After installing, you need to create and start your first Podman machine:

     podman machine init
     podman machine start

# Verify:
     podman info
     host: arch: amd64 buildahVersion: 1.36.0 cgroupControllers: - cpu - io - memory - pids cgroupManager: systemd

# Make docker commands available via podman by creating a symlink:
     sudo ln -s /usr/local/bin/podman /usr/local/bin/docker 

安裝 YQ

Oracle Blockchain Platform Enterprise Edition 使用 yq v4.44.1 進行測試。如需其他資訊,請參閱 yq README

# Install:
    brew install yq

# Verify:
   yq--version
   yq (https://github.com/mikefarah/yq/) version v4.44.1

安裝 jq

Oracle Blockchain Platform Enterprise Edition 使用 jq v1.7.1 進行測試。如需其他資訊,請參閱下載 jq

# Install:
    brew install jq

# Verify:
   jq --version
   jq-1.7.1

安裝 Istio

Istio 擴展 Kubernetes,為複雜的部署提供流量管理和安全性。Oracle Blockchain Platform Enterprise Edition 使用 Istio 作為傳入閘道服務,以接受各種服務的傳入流量。

建議您安裝 Istio 和 istioctl (Istio 組態命令行公用程式)。

下載 Istio:

# Download istioctl tool
   curl -L https://istio.io/downloadIstio | sh -

# (optional) You can move the downloaded "istio-1.22.1" directory     
   mv ./istio-1.22.1 $HOME/istioctl

# Add the istioctl client to your path     
export PATH=$HOME/istioctl/bin:$PATH

建議您安裝 Istio 和 istioctl (Istio 組態命令行公用程式)。

下載 Istio:

# Download istioctl tool
   curl -L https://istio.io/downloadIstio | sh -

# (optional) You can move the downloaded "istio-1.22.1" directory     
   mv ./istio-1.22.1 $HOME/istioctl

# Add the istioctl client to your path     
export PATH=$HOME/istioctl/bin:$PATH

附註:

建立 Kubernetes 叢集之後,將會完成 Istio 安裝。它具有 .kube/config 檔案的相依性。

可以在 Kubernetes 中設定 Istio 的 ingressgateway 服務,以 LoadBalancerNodePort 服務類型執行。請參閱 Istio 文件以瞭解詳細資訊: Istio Ingress Gateways

負載平衡器

如果您的 Kubernetes 叢集支援外部負載平衡器,建議您使用部署期間將使用的 Oracle Blockchain Platform Enterprise Edition runme 命令檔,將 Istio 傳入閘道服務設定為負載平衡器。Oracle Blockchain Platform Enterprise Edition 將使用 Istio 傳入閘道的 https 連接埠 (443) 作為公用連接埠來接受傳入流量。您可以在安裝 Oracle Blockchain Platform Enterprise Edition 時,使用 runme 命令檔選擇性地自訂此連接埠值。

節點連接埠

在無法使用負載平衡器服務類型的情況下,可以使用節點連接埠服務類型來設定 Istio 傳入閘道服務。Oracle Blockchain Platform Enterprise Edition 將使用 Istio 傳入閘道中 https 連接埠的 nodePort 值,將外部流量遞送至 Kubernetes 叢集內的 Oracle Blockchain Platform Enterprise Edition 。在安裝 Oracle Blockchain Platform Enterprise Edition 時,可以使用 runme 命令檔,選擇性地自訂 https 連接埠的 nodePort 值 (根據允許的 nodePort 範圍)。依照預設,Kubernetes 叢集中允許的 nodePort 範圍為 30000-32767。

附註:

請勿在安裝 Oracle Blockchain Platform Enterprise Edition 之後更新 https portnodePort 的值,因為它會影響其功能。

Oracle Blockchain Platform Enterprise Edition 服務的主機名稱解析

Oracle Blockchain Platform Enterprise Edition 服務使用在 Istio 閘道 / 虛擬服務中設定的唯一產生主機名稱。若要與 Kubernetes 叢集內的 Oracle Blockchain Platform Enterprise Edition 服務進行通訊,您必須從瀏覽器或應用程式使用這些唯一的主機名稱。根據為 istio-ingressgateway 所選擇的服務類型,這些主機名稱必須以下列方式解析為 IPv4 位址:
  • 如果是 LoadBalancer,它們就會解析成針對 istio-ingressgateway 服務產生的外部 IP 位址
  • 如果是 NodePort,它們就會解析為工作節點的 IP 位址