Prerequisites

本主题包含安装 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 Engine 集群版本为 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 进行测试。有关更多信息,请参见 Download jq

# Install:
    sudo dnf install jq

# Verify:
   jq --version
   jq-1.7.1

安装 kubectl

kubectl 版本应始终在集群的一个次要版本差异内。例如,如果您的 Oracle Kubernetes Engine 集群版本为 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 进行测试。有关更多信息,请参见 Download 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

注意:

Istio 安装将在创建 Kubernetes 集群后完成。它依赖于 .kube/config 文件。

Istio 的 ingressgateway 服务可以在 Kubernetes 中配置为使用 LoadBalancerNodePort 服务类型运行。有关详细信息,请参见 Istio 文档: Istio Ingress Gateways

负载平衡器

如果 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,则解析为 worker 节点的 IP 地址