在 Azure Red Hat 上部署 Oracle Blockchain Platform Enterprise Edition OpenShift
您可以在 Azure Red Hat OpenShift 上安裝 Oracle Blockchain Platform Enterprise Edition。OpenShift 是 Red Hat 的企業 Kubernetes 平台,可運用一組工具來大規模建置、部署及管理容器化應用程式,以強化標準 Kubernetes。Azure Red Hat OpenShift 是 Microsoft Azure 上完全託管的 OpenShift 服務。
本主題中的指示是建議如何在 Azure Red Hat OpenShift 上部署 Oracle Blockchain Platform Enterprise Edition 的準則。在實際嘗試此方法之前 (特別是生產環境),您應該先熟悉 Azure Red Hat OpenShift 文件,這些文件會取代此主題中的任何資訊。
- Azure Red Hat OpenShift:關於 Azure Red Hat OpenShift
- Azure Red Hat OpenShift 文件:Azure Red Hat OpenShift 文件
在 Microsoft Azure 上建立 Red Hat OpenShift 叢集
建議的 Azure Red Hat OpenShift 叢集最低規格。
使用 Azure 文件作為指南,建立 Azure Red Hat OpenShift 叢集:建立 Azure Red Hat OpenShift 叢集
您必須建立下列項目:
- 控制平面 VM:三個 Standard_D8s_v3
- 工作節點 VM:四個 Standard_D4s_v3
- 產生 Red Hat 提取加密密碼。
安裝 Oracle Blockchain Platform Enterprise Edition
Oracle Blockchain Platform 部署所需的映像檔會先儲存在 Docker 儲存區域中,然後再推送至 Microsoft Azure VM。建議您從地理位置儘可能接近安裝軟體所在區域的雲端 Linux VM 進行安裝。Docker 映像檔的本機儲存大約應為 100GB。
- 開啟您的 OpenShift 叢集主控台。
- 選取
kube:admin,然後選取Copy login command。系統會提示您輸入使用者 ID 與密碼。按一下顯示記號。複製使用此記號登入命令,並將它貼到 OpenShift 命令行介面中。$ oc login --token=<token> --server=<openshift_cluster_url> - 驗證您已連線至 OpenShift。
此命令應傳回主要節點和工作節點的清單及其狀態。oc get nodes - 設定 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" - 下載 Oracle Blockchain Platform:Oracle Blockchain Platform 。
- 擷取壓縮套件並尋找 OpenShift 的
runme指令碼。 - 以必要的值更新
runme-input.yaml檔案。下列範例runme-input.yaml檔案可作為參照使用:
在上一個範例中,變數的定義如下所示:imageRegistryConfiguration: registry: <container_registry_name.azurecr.io> imageTagPrefix: <container-image-repository-prefix.azurecr.io/bcs-k8s-dev > username: <container-registry-username> imageReleaseVersion: 24.1.3-20240723083137 # storageClassName should be set to create a dynamic persistent volume. If empty, default storageClass is used. controlPlaneStorage: storageClassName: # Example 500Mi, 5Gi 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: 1800imageRegistryConfiguration.registry:要使用的容器登錄伺服器。imageRegistryConfiguration.imageTagPrefix:含有登錄的容器基本儲存庫路徑,其中影像會被植入或從其中提取。範例:registryname.azurecr.io/obpee/bcsimageRegistryConfiguration.username:容器登錄登入使用者名稱。若為 Azure,則為容器登錄權杖。imageReleaseVersion- Oracle Blockchain Platform Enterprise Edition 發行版本controlPlaneStorage.storageClassName:用於 PVC 的 Kubernetes 儲存類別 (PersistentVolumeClaim)。如果空白,則會使用預設的storageClasscontrolPlaneStorage.size:Blockchain Platform Manager (控制層) 服務的 PVC 大小parentDomainName:用於區塊鏈平台管理員服務的網域名稱。範例:example.comimagePullTimeout:在 Oracle Blockchain Platform Enterprise Edition 安裝期間,影像提取等待逾時 (秒)。預設值為 1800 秒。
- 在編輯器中開啟
runme_openshift.sh,然後對下列兩行加上註解:openshift_status_checkcheck_software_exists "crc"
- 執行
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-planeopenldapobp-auth-serverobp-operatorhlf-operator
- 取得 Istio 傳入閘道服務的外部 IP 位址:
kubectl get svc/istio-ingressgateway -n istio-system - 視需要將下行新增至主機上用來連線至「區塊鏈平台管理程式」主控台的其中一個檔案:
- Linux 或 macOS:
/etc/hosts - Windows:
C:\Windows\system32\drivers\etc\hosts
其中<public_svc_ip> controlplane.<parentDomainName> openldap.<parentDomainName> auth.<parentDomainName><public_svc_ip>是上一個步驟的公用、外部 IP 位址。 - Linux 或 macOS:
後續條件
您現在已準備好首次登入 Oracle Blockchain Platform 並佈建執行處理。