在 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 先決條件

建議的叢集工作節點最低限度規格:

  高可用性生產
節點 CPU 4 個 CPU 或更高 CPU
節點記憶 32 GB 或更高
節點計數 3 或更高的版本
開機磁碟區大小 100 GB 或更高

安裝 OpenShift CLI ( oc),即可存取叢集。請參閱 OpenShift CLI

驗證您已連線至 OpenShift。
oc get nodes
此命令應傳回主要節點和工作節點的清單及其狀態。

安裝 Oracle Blockchain Platform Enterprise Edition

  1. 設定 istio 設定檔。您必須先完成安裝 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. 擷取壓縮套件並尋找 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:容器登錄登入使用者名稱。
    • imageReleaseVersion - Oracle 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. 視需要將下行新增至主機上用來連線至「區塊鏈平台管理程式」主控台的其中一個檔案:
    • 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 並佈建執行處理。