4.16.05 復原程序

Edge for Private Cloud 4.16.05 版

您可能需要在以下兩種情況下執行復原:

  1. 復原至舊版本。例如從 4.16.05 降級至 4.16.01。
  2. 復原至相同版本中的舊版。

請按照下列程序,為這兩種情況執行復原作業。

誰可以執行復原

執行復原作業的使用者應與原先更新 Edge 的使用者相同,或以 root 身分執行的使用者。

根據預設,Edge 元件會以「apigee」使用者身分執行。在某些情況下,您可能會以不同使用者身分執行 Edge 元件。舉例來說,如果路由器必須存取特殊權限通訊埠 (例如低於 1000 的通訊埠),則必須以 root 身分或具備這些通訊埠存取權的使用者身分執行路由器。或者,您也可以以某個使用者的身分執行一個元件,並以另一個使用者的身分執行另一個元件。

可復原的元件

執行復原作業時,請注意下列情況:

  • 如要復原節點上的下列五個元件,您必須復原節點上安裝的任何元件。舉例來說,如果您在節點上安裝了管理伺服器、路由器和訊息處理器,則必須復原這三個元件,才能復原其中任何一個元件。

    這五個元件分別是:
    • 管理伺服器
    • 路由器
    • 訊息處理器
    • Qpid 伺服器
    • Postgres 伺服器
  • 請勿復原 Cassandra。這個 Edge 版本包含更新版的 Cassandra,與 4.16.01 版本相容。如果您復原任何元件,請將 Cassandra 保持在 4.16.05 版本,以便使用最新功能。
  • 這個版本不含新版 postgresql 或 qpidd。因此您不必復原這些變更。

如要復原 4.16.05

如要復原 Apigee Edge,請執行下列復原步驟:

  1. 停止要復原的元件:
    1. 如要復原下列任一元件,必須停止所有元件:Management Server、Router、訊息處理器、Qpid Server 或 Postgres Server:
      > apigee-service edge-management-server stop
      > apigee-service edge-router stop
      > apigee-service edge-message-processor stop
      > apigee-service edge-qpid-server stop
      > apigee-service edge-postgres-server stop
    2. 如要復原任何其他元件,請停止該元件:
      > apigee-service comp stop
  2. 如要復原營利功能,請解除安裝:
    > apigee-service edge-mint-gateway uninstall
  3. 解除安裝元件即可復原:
    1. 如果您要復原下列任一元件,請將其全部解除安裝:Management Server、Router、訊息處理器、Qpid Server 或 Postgres Server:
      > apigee-service edge-gateway uninstall
    2. 如要復原任何其他元件,請只解除安裝該元件
      > apigee-service comp uninstall
  4. 如要復原路由器,則必須刪除 /opt/nginx/conf.d 的內容:
    > cd /opt/nginx/conf.d
    > rm -rf *
  5. 如要將元件復原至 4.16.01 版本:
    1. 解除安裝 4.16.05 版的 apigee-setup:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup uninstall
    2. 下載 4.16.01 版本的 bootstrap.sh:
      > curl https://software.apigee.com/bootstrap.sh -o /tmp/bootstrap.sh
    3. 安裝 4.16.01 Edge apigee-service 公用程式和依附元件:
      > sudo bash /tmp/bootstrap.sh apigeeuser=uName apigeepassword=pWord
      其中 uName 和 pWord 是您從 Apigee 收到的使用者名稱和密碼。如果省略 pWord,系統會提示您輸入。
    4. 安裝 4.16.01 版的 apigee-setup:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
    5. 安裝 4.16.01 版元件:
      > /<instal_dir>/apigee/apigee-setup/bin/setup.sh -p comp -f configFile
      其中 comp 是要安裝的元件,configFile 是 4.16.01 設定檔。
  6. 如要將元件復原至 4.16.05 版本的特定版本:
    1. 下載特定元件版本:
      > /<instal_dir>/apigee/apigee-service/bin/apigee-service comp-version install
      其中 comp-version 是要安裝的元件和版本。例如:
      > /<instal_dir>/apigee/apigee-service/bin/apigee-service edge-ui-4.16.05-0.0.3649 install
      如果您使用的是 Apigee 線上存放區,可以使用下列指令判斷可用的元件版本:
      > yum --showduplicates list comp
      例如:
      > yum --showduplicates list edge-ui
    2. 使用 apigee-setup 安裝元件:
      > /<install_dir>/apigee/apigee-setup/bin/setup.sh -p comp -f configFile
      例如:
      > /<install_dir>/apigee/apigee-setup/bin/setup.sh -p ui -f configFile
      請注意,您只需在安裝時指定元件名稱。

如果復原時發生問題,請與 Apigee 支援團隊聯絡。