在 Red Hat OpenShift 内部部署集群上部署 Oracle Blockchain Platform Enterprise Edition

在部署 Oracle Blockchain Platform Enterprise Edition 之前,必须运行 Red Hat OpenShift Enterprise 集群,并且必须安装多个先决条件。

本主题中的说明是一条准则,建议您如何在内部部署 Red Hat OpenShift 上部署 Oracle Blockchain Platform Enterprise Edition。在实际尝试这一点之前,特别是对于生产环境,您应该熟悉 Red Hat OpenShift 文档,该文档取代了本主题中的任何信息。

创建 Red Hat OpenShift 集群

您的集群必须满足以下 Red Hat OpenShift 文档中概述的要求:OpenShift Container Platform Prerequisites

为集群 Worker 节点建议的最低规范:

  具有高可用性的生产
节点 CPU 4 个或更高的 CPU
节点存储器 32 GB 或更大
节点计数 3 或更高版本
引导卷大小 100 GB 或更大

安装 OpenShift CLI ( oc ),以便您可以访问群集。请参见 OpenShift CLI

验证您是否已连接到 OpenShift。
oc get nodes
此命令应返回主节点和 worker 节点的列表及其状态。

安装 Oracle Blockchain Platform Enterprise Edition

  1. 设置 istio 配置文件。在运行以下命令之前,必须先完成 Install Istio 中的步骤。
    istioctl install --set profile=openshift --set
    values.pilot.env.ENABLE_TLS_ON_SIDECAR_INGRESS=true --set components.cni.enabled=true --set
    values.cni.repair.deletePods="true"
  2. 下载 Oracle Blockchain Platform:Oracle Blockchain Platform
  3. 提取 zip 软件包并查找 OpenShift 的 runme 脚本。
  4. 使用必需的值更新 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
     
    controlPlaneStorage:
      storageClassName: 
      size: 10Gi
      
    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

    注意:

    我们建议在您的环境中设置容器注册表,以便更快地提取映像。如果您使用自己的容器注册表,请使用 24.1.3-20240723083137 imageReleaseVersion 值。
    在前面的示例中,变量按如下列表中所示进行定义:
    • imageRegistryConfiguration.registry:要使用的容器注册表服务器。
    • imageRegistryConfiguration.imageTagPrefix :容器基本资料档案库路径和注册表,其中映像将被推送到并拉出。示例:registryname.rhoscr.io/obpee/bcs
    • imageRegistryConfiguration.username:容器注册表登录用户名。
    • imageReleaseVersionOracle Blockchain Platform Enterprise Edition 版本
    • controlPlaneStorage.storageClassName:要用于 PVC 的 Kubernetes 存储类 (PersistentVolumeClaim )。如果为空,则使用缺省 storageClass
    • controlPlaneStorage.size :Blockchain Platform Manager(控制平面)服务的 PVC 大小
    • parentDomainName:用于区块链平台管理器服务的域名。示例:example.com。Blockchain Platform Manager 和服务控制台 URL 将包含此域名。
    • imagePullTimeout:在 Oracle Blockchain Platform Enterprise Edition 安装期间,图像提取等待超时(以秒为单位)。默认值为 1800 秒。
  5. 在编辑器中打开 runme_openshift.sh,并注释掉以下两行:
    • openshift_status_check
    • check_software_exists "crc"
  6. 运行 runme_openshift.sh 并按照提示完成这些步骤:
    chmod +x runme_openshift.sh
    
    ./runme_openshift.sh --publish-images
    # The publish-images option uploads the containers to the container image registry specified in runme-input.yaml
    # Running the script without this option pulls images you've already pre-uploaded from the repository specified in runme-input.yaml
    您将遇到的提示:
    • 输入 OpenLDAP 管理员密码 - 这将由 Blockchain Platform Manager 使用,用户将在此 OpenLDAP 服务器上创建。
    • 输入控制层管理员密码 - 此密码将由 Oracle Blockchain Platform 管理员用户使用,并首次登录 Blockhain Platform Manager 控制台。
    • 输入 run-input.yaml 中指定用户的注册表登录密码 - 此密码用于连接到容器资料档案库。
    • 该脚本将以下服务安装在 obp-cp 名称空间下:
      • control-plane
      • openldap
      • obp-auth-server
      • obp-operator
      • hlf-operator
  7. 获取 Istio 入站网关服务的外部 IP 地址:
    kubectl get svc/istio-ingressgateway -n istio-system
  8. 根据需要在用于连接到 Blockchain Platform Manager 控制台的主机上向这些文件之一添加以下行:
    • Linux 或 macOS:/etc/hosts
    • Windows:C:\Windows\system32\drivers\etc\hosts
    <public_svc_ip> controlplane.<parentDomainName> openldap.<parentDomainName> auth.<parentDomainName>
    其中 <public_svc_ip> 是上一步骤中的公共外部 IP 地址。

后续条件

您现在可以首次登录 Oracle Blockchain Platform 并预配实例。