Prerequisites
本主题包含安装 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 版本的安装主题的访问区块链平台管理器部分。
其他先决条件软件
- kubectl 版本 1.29.3 或更高版本 - Kubernetes 的命令行工具
- Helm 版本 3.12.3 或更高版本 - Kubernetes 软件包管理器
- 用于管理容器和云池的工具 - 请选择以下选项之一:
- Podman 版本 4.9.4-rhel 或更高版本
- Docker 版本 24.0.6 或更高版本
- yq 版本 4.42.1 - 命令行 YAML 处理器
- jq v1.7.1 或更高版本 - 命令行 JSON 处理器
- Istio - 用于部署的安全和流量管理工具
- v1.20.2 或更高版本,适用于运行 Oracle Blockchain Platform Enterprise Edition 补丁程序 4 或更低版本的 OKE 或 minikube
- v1.22.1 或更高版本,适用于运行 Oracle Blockchain Platform Enterprise Edition 补丁程序 5 或更高版本的 OKE 或 minikube
- v1.22.1 for Red Hat OpenShift Local
- v1.26.0,适用于 Microsoft Azure 上的 Red Hat OpenShift
- v1.26.0(适用于 Red Hat OpenShift 内部部署)
- istioctl - Istio 的命令行工具
Web 浏览器
- 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 进行测试。有关其他信息,请参见 Installing 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 进行测试。有关其他信息,请参见 Installing 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:
# 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注意:
Istio 安装将在创建 Kubernetes 集群后完成。它对.kube/config 文件具有依赖性。
Istio 的 ingressgateway 服务可以在 Kubernetes 中配置为使用 LoadBalancer 或 NodePort 服务类型运行。有关详细信息,请参见 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 。在使用runme脚本安装 Oracle Blockchain Platform Enterprise Edition 期间,可以根据需要定制 https 端口的nodePort值(基于允许的nodePort范围)。默认情况下,Kubernetes 集群中允许的nodePort范围为 30000-32767。注意:
安装 Oracle Blockchain Platform Enterprise Edition 后,请勿更新 httpsport或nodePort的值,因为它会影响其功能。
面向 Oracle Blockchain Platform Enterprise Edition 服务的主机名解析
istio-ingressgateway 选择的服务类型,需要通过以下方式将这些主机名解析为 IPv4 地址:
- 如果为
LoadBalancer,则解析为istio-ingressgateway服务生成的外部 IP 地址 - 如果为
NodePort,则解析为 worker 节点的 IP 地址