必備條件

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

Kubernetes 平台

下列是支援的平台:
  • Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE) v1.29.1 或更新版本
  • minikube v1.33.1 或更新版本 - 僅供測試環境使用,不適用於生產環境

您必須具有可由 DNS 伺服器解析的網域名稱。

其他先決條件軟體

此外,您需要下列工具來協助管理 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 版本 1.20.2 或更新版本和 istioctl - 適用於部署的安全性和流量管理工具及其命令行工具

Web 瀏覽器

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

安裝先決條件軟體

本節提供安裝必備條件測試版本的逐步解說範例。請參閱每份產品的說明文件,以取得其他資訊以及安裝說明的任何必要修改。

安裝 kubectl

kubectl 版本應一律在叢集的次要版本差異內。例如,如果您的 Oracle 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 版本 1.20.2 和更新版本。

下載 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 Gateway

負載平衡器

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

節點連接埠

如果無法使用負載平衡器服務類型,可以使用節點連接埠服務類型設定 Istio 傳入閘道服務。Oracle Blockchain Platform Enterprise Edition 將使用 Istio 入口網中 https 連接埠的 nodePort 值,將外部流量遞送至 Kubernetes 叢集內的 Oracle Blockchain Platform Enterprise Edition 。在使用 runme 指令碼安裝 Oracle Blockchain Platform Enterprise Edition 期間,您可以選擇性地自訂 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 位址