本主題說明更新現有以控制平面為基礎之 Omnissa Access 部署的建議程序。內容涵蓋更新作業系統套件、控制平面資產服務包、Access 服務和啟動程序虛擬機器。
**重要:**這些更新指示不適用於從 2412 版或更早版本進行升級。
先決條件
- 除非另有指定,否則請從啟動程序虛擬機器執行所有命令。
- 現有部署必須狀況良好。開始前,請執行
wso healthcheck和wso access check-service-readiness,以確認系統健全狀況。 - 目標版本的離線資產服務包已下載,並可在啟動程序虛擬機器中使用。
- 如果此次更新包含作業系統套件更新,則作業系統安全性 RPM 已下載,並可在啟動程序虛擬機器中使用。
更新工作流程
更新包含下列階段:
- 第 1 階段 - 設定用於作業系統更新的本機存放庫 (僅在需要更新作業系統套件時執行)。
- 第 2 階段 - 下載並設定新的控制平面資產服務包。
- 第 3 階段 - 更新控制平面,並視需要一併更新作業系統套件。
- 第 4 階段 - 更新 Access 服務並驗證服務狀態。
- 第 5 階段 - 如果第 1 階段適用,則更新啟動程序虛擬機器的作業系統。
第 1 階段 - 設定用於作業系統更新的本機存放庫
附註:
-
如果此次更新不包含作業系統套件更新,請略過此階段,直接前往「第 2 階段 - 設定新的資產服務包」。
-
如果您自行部署 AlmaLinux 9.6,則第 1 階段不適用。請直接前往「第 2 階段 - 設定新的資產服務包」。
操作程序:
-
在啟動程序虛擬機器上執行 DNF 存放庫更新指令碼:
sh /usr/local/sbin/update-dnf-repo.sh /root/security-rpms.tar.gz -
在 Shell 中設定下列變數,以供後續步驟使用:
export WORKDIR="/root/<cluster_name>" export BOOTSTRAP_IP="<bootstrap-node-ip>" export TARGETS="general_compute_linux:general_compute_access_linux" export ASSET_DIR="${WORKDIR}/assets-<version>" -
在啟動程序虛擬機器上啟用本機存放庫,並準備其 CA 憑證,以便發佈至叢集節點:
sed -i 's/enabled=0/enabled=1/' /etc/yum.repos.d/localrepo.repo mkdir -p ${WORKDIR}/access/localrepo_ca_path cp -f /etc/nginx/localrepo-certs/root-ca.crt \ ${WORKDIR}/access/localrepo_ca_path/root-ca.crt -
將本機存放庫組態推送至叢集節點:
-
在叢集節點上建立憑證目錄:
wso control-plane ansible -- -b -m file \ -a "path=/etc/nginx/localrepo-certs state=directory owner=root group=root mode=0755" \ "${TARGETS}" -
將根 CA 憑證複製到叢集節點:
wso control-plane ansible -- -b -m copy \ -a "src=/workdir/access/localrepo_ca_path/root-ca.crt dest=/etc/nginx/localrepo-certs/root-ca.crt owner=root group=root mode=0644 force=yes" \ "${TARGETS}" -
將叢集節點指向啟動程序 HTTPS 存放庫:
wso control-plane ansible -- -b -m ini_file \ -a "path=/etc/yum.repos.d/localrepo.repo section=localrepo option=baseurl value=https://${BOOTSTRAP_IP}/" \ "${TARGETS}" wso control-plane ansible -- -b -m ini_file \ -a "path=/etc/yum.repos.d/localrepo.repo section=localrepo option=sslverify value=1" \ "${TARGETS}" wso control-plane ansible -- -b -m ini_file \ -a "path=/etc/yum.repos.d/localrepo.repo section=localrepo option=sslcacert value=/etc/nginx/localrepo-certs/root-ca.crt" \ "${TARGETS}" wso control-plane ansible -- -b -m ini_file \ -a "path=/etc/yum.repos.d/localrepo.repo section=localrepo option=enabled value=1" \ "${TARGETS}" -
僅使用本機存放庫,在叢集節點上重建 DNF 快取。如果您要在已發行版本上連續套用多項更新,則每次都必須重複執行此步驟。
wso control-plane ansible -- -b -m shell \ -a "dnf clean all && rm -rf /var/cache/dnf/* && dnf --refresh makecache --disablerepo='*' --enablerepo=localrepo && dnf --refresh --disablerepo='*' --enablerepo=localrepo list available" \ "${TARGETS}"
-
第 2 階段 - 設定新的資產服務包
操作程序:
-
建立用於存放新資產服務包的目錄,並下載該服務包:
mkdir -p ${ASSET_DIR} cd ${ASSET_DIR} # Copy the target release asset bundle to this location ${ASSET_DIR}**重要:**下載與目標版本相對應的資產服務包。請勿重複使用舊版的服務包。
-
解壓縮服務包,並將 CLI 新增至您的路徑:
# Ensure that you are in ${ASSET_DIR} before you unzip the asset bundle unzip asset-bundle.zip cp cli-distribution/linux/wso /usr/bin/ cp: overwrite '/usr/bin/wso'? y # It will prompt for overwrite wso eula Do you agree to these terms ? [y/n]: y -
設定 CLI 以使用新的服務包:
cd ${WORKDIR} wso configure ${ASSET_DIR}
第 3 階段 - 更新控制平面
操作程序:
-
使用新的資產服務包部署控制平面。如果此次更新也會更新叢集節點上的作業系統套件,請加入
-u:# To update without OS packages update nohup wso cp deploy & # To update with OS packages update nohup wso cp deploy -u & -
驗證部署:
wso version wso healthcheck -
如果部署時使用了
-u,請解封叢集:**附註:**如果部署時未使用
-u,則可略過此步驟。wso cp unseal
第 4 階段 - 更新 Access 服務
操作程序:
-
使 Access 組態與此次更新保持一致:
wso access update-config set -
如果工作目錄中存在先前手動覆寫所留下的
services目錄,請將其移至其他位置,讓部署改用新服務包中的映像:mv ${WORKDIR}/services to ${WORKDIR}/services.bk -
部署所有 Access 服務:
nohup wso services deploy --type full & -
檢查服務的健全狀況:
wso access check-service-readiness -
待所有服務均回報為健全狀態後,結束更新模式:
wso access update-config reset -
清理先前版本中的資產:
wso cp reset-assets
第 5 階段 - 更新啟動程序虛擬機器作業系統
僅在叢集更新成功完成後執行此階段。此階段不需要中斷叢集運作。完成第 4 階段後,即可繼續執行叢集作業。
在此階段中,請選擇執行就地更新或更換虛擬機器。
就地更新
-
更新套件並重新啟動此啟動程序虛擬機器:
dnf update -y reboot -
啟動程序虛擬機器重新上線後,驗證叢集:
wso healthcheck wso access check-service-readiness
更換虛擬機器
如果您想要從最新的 Omnissa OVA 部署新的啟動程序虛擬機器,而不是就地修補現有的啟動程序虛擬機器,請使用此選項。若要進行重大作業系統更新,建議採用此方式。
步驟 1 - 從現有啟動程序虛擬機器建立移轉套件
cd /root/<cluster_name>
tar czpvf /root/<cluster_name>-migration-$(date +%Y%m%d).tar.gz \
profile.yml \
logging \
telegraf_plugin \
ansible_extra_vars.yml \
access \
cp-cluster \
additional_env_vars.env \
deploy_services.log \
deployment-config.yml
步驟 2 - 將移轉套件複製到新的啟動程序虛擬機器
scp /root/<cluster_name>-migration-*.tar.gz configuser@<new-bootstrap-machine>:/home/configuser/
步驟 3 - 在新的啟動程序虛擬機器上還原組態
mkdir -p /root/<cluster_name>
cd /root/<cluster_name>
tar xzpvf /home/configuser/cp-cluster-migration-*.tar.gz
新的啟動程序虛擬機器現在包含與先前啟動程序虛擬機器相同的部署組態。
步驟 4 - 設定資產服務包
將現有啟動程序虛擬機器所使用的資產服務包複製到新的啟動程序虛擬機器,然後執行後續步驟。
mkdir -p assets
cd assets
# COPY asset bundle at this path.
unzip asset-bundle.zip
cp cli-distribution/linux/wso /usr/bin/
wso eula
wso configure /root/<cluster_name>/assets/
cd ..
步驟 5 - 驗證新的啟動程序虛擬機器
wso version
wso healthcheck
wso access check-service-readiness
確認 CLI 版本、控制平面映像版本、CPS 映像版本、叢集健全狀況和 Access 服務就緒狀態皆正確。所有 Access 服務的狀態都應顯示為 READY。
此頁面對您有幫助嗎?