更新 Apigee Edge 4.17.05 或 4.17.09 至 4.18.05

Edge for Private Cloud 4.18.05 版

本節說明如何執行下列升級作業:

  • 從 4.17.05 到 4.18.05
  • 從 4.17.09 到 4.18.05

誰可以執行更新

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

安裝 Edge RPM 後,任何使用者都可以進行設定。

必須更新哪些元件

您必須更新所有 Edge 元件。Edge 不支援包含多個版本元件的設定。

維持相容性

將 Apigee Edge for Private Cloud 升級至 4.18.05 時,請務必確保產生的實作項目只會參照設定檔中支援的屬性。

屬性 位置 說明
conf_load_balancing_load.balancing.
  driver.nginx.server.retry
router.properties 請從 router.properties 檔案中移除這項屬性。如要在 4.18.05 中設定重試選項,請使用虛擬主機設定屬性。

自動套用資源設定

如果您透過編輯 /opt/apigee/customer/application 中的 .properties 檔案設定任何屬性,則更新會保留這些值。

必須新增 SMTPMAILFROM 設定參數

Edge 4.17.05 在啟用 SMTP 伺服器時使用的設定檔中,新增了必要參數。

必須升級至 Postgres 9.6

這個 Edge 版本包含 Postgres 9.6 升級。在升級過程中,所有 Postgres 資料都會遷移至 Postgres 9.6。

大多數 Edge 正式版系統都使用兩個 Postgres 節點,並設定為主待命複製。在更新程序中,Postgres 節點會因更新而停機,但數據分析資料仍會寫入 Qpid 節點。Postgres 節點更新並重新上線後,系統會將數據分析資料推送至 Postgres 節點。

執行 Postgres 更新的方式,取決於您為 Postgres 節點設定資料儲存庫的方式:

  • 如果您為 Postgres 節點使用本機資料儲存空間,則必須在升級期間安裝新的 Postgres 待命節點。升級完成後,即可停用新的 Postgres 待命節點。

    如果因任何原因必須復原更新,則需要額外的 Postgres 待命節點。如果必須復原更新,新的 Postgres 待命節點會在復原後成為主要 Postgres 節點。因此,安裝新的 Postgres 待命節點時,應安裝在符合 Postgres 伺服器所有硬體需求的節點上,如 Edge 安裝需求中所定義。

    在 1 節點和 2 節點的 Edge 安裝中,用於原型設計和測試的拓撲只有一個 Postgres 節點。您可以直接更新這些 Postgres 節點,不必建立新的 Postgres 節點。

  • 如果您按照 Apigee 的建議,為 Postgres 節點使用網路儲存空間,就不必安裝新的 Postgres 節點。在下列程序中,您可以略過指定安裝和後續停用新 Postgres 待命節點的步驟。

    開始更新程序之前,請先為 Postgres 使用的資料儲存庫建立網路快照。如果更新期間發生任何錯誤,且您必須執行復原作業,則可從該快照還原 Postgres 節點。

安裝新的 Postgres 待命節點

這項程序會在新的節點上建立 Postgres 待命伺服器。請務必為「現有」Edge 版本 (4.17.05 或 4.17.09) 安裝新的 Postgres 待命伺服器,而非 4.18.05 版。

如要執行安裝作業,請使用與安裝目前 Edge 版本時相同的設定檔。

如要建立新的 Postgres 待命節點,請按照下列步驟操作:

  1. 在目前的 Postgres 主要執行個體上,編輯 /opt/apigee/customer/application/postgresql.properties 檔案,設定下列權杖。如果該檔案不存在,請建立檔案:
    conf_pg_hba_replication.connection=host replication apigee existing_slave_ip/32 trust\ \nhost replication apigee new_slave_ip/32 trust

    其中 existing_slave_ip 是目前 Postgres 待命伺服器的 IP 位址,new_slave_ip 則是新待命節點的 IP 位址。

  2. 在 Postgres 主要執行個體上重新啟動 apigee-postgresql:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restart
  3. 查看主要節點上的 /opt/apigee/apigee-postgresql/conf/pg_hba.conf 檔案,確認已新增待命節點。您應該會在該檔案中看到下列幾行:
    host replication apigee existing_slave_ip/32 trust
    host replication apigee new_slave_ip/32 trust
  4. 安裝新的 Postgres 待命伺服器:
    1. 編輯用來安裝目前 Edge 版本的設定檔,指定下列項目:
      # IP address of the current master:
      PG_MASTER=192.168.56.103
      # IP address of the new standby node
      PG_STANDBY=192.168.56.102
    2. 按照「安裝 Edge apigee-setup 公用程式」一文中的說明停用 SELinux。
    3. 下載 Edge bootstrap_4.17.0x.sh 檔案,其中 x 為 5 (適用於 4.17.05) 或 9 (適用於 4.17.09),並儲存至 /tmp/bootstrap_4.17.0x.sh :
      curl https://software.apigee.com/bootstrap_4.17.0x.sh -o /tmp/bootstrap_4.17.0x.sh
    4. 安裝 Edge apigee-service 公用程式和依附元件:
      sudo bash /tmp/bootstrap_4.17.0x.sh apigeeuser=uName apigeepassword=pWord
    5. 使用 apigee-service 安裝 apigee-setup 公用程式:
      /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
    6. 安裝 Postgres:
      /opt/apigee/apigee-setup/bin/setup.sh -p ps -f configFile
    7. 在新的待命節點上執行下列指令:
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby

      確認狀態顯示為待命。

停用 Postgres 節點

更新完成後,請停用新的待命節點:

  1. 確認 Postgres 正在執行:
    /opt/apigee/apigee-service/bin/apigee-all status

    如果 Postgres 未執行,請啟動:

    /opt/apigee/apigee-service/bin/apigee-all start
  2. 在新的待命節點上執行下列 cURL 指令,取得新待命節點的 UUID:
    curl -u sysAdminEmail:password http://node_IP:8084/v1/servers/self

    輸出內容結尾應會顯示節點的 UUID,格式如下:

    "type" : [ "postgres-server" ],
    "uUID" : "599e8ebf-5d69-4ae4-aa71-154970a8ec75"
  3. 在新待命節點上執行下列指令,停止新待命節點:
    /opt/apigee/apigee-service/bin/apigee-all stop
  4. 在 Postgres 主要節點上,編輯 /opt/apigee/customer/application/postgresql.properties,從 conf_pg_hba_replication.connection 移除新的待命節點:
    conf_pg_hba_replication.connection=host replication apigee existing_slave_ip/32 trust
  5. 在 Postgres 主節點上重新啟動 apigee-postgresql:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restart
  6. 查看主要節點上的 /opt/apigee/apigee-postgresql/conf/pg_hba.conf 檔案,確認新的待命節點已移除。該檔案中應該只會顯示以下這行:
    host replication apigee existing_slave_ip/32 trust
  7. 在管理伺服器節點上發出下列 Edge Management API 呼叫,從 ZooKeeper 刪除待命節點的 UUID:
    curl -u sysAdminEmail:password -X DELETE http://ms_IP:8080/v1/servers/new_slave_uuid

更新必要條件

升級 Apigee Edge 前,請先完成下列必要條件:

  • 備份所有節點
    為安全起見,建議您在更新前完整備份所有節點。請按照目前 Edge 版本的程序執行備份。

    這樣一來,如果新版本無法正常運作,您就有備用方案。如要進一步瞭解備份,請參閱「備份與還原」。

  • 確保 Edge 正在執行
    使用下列指令,確保 Edge 在更新程序中正常運作:
    /opt/apigee/apigee-service/bin/apigee-all status

處理更新失敗

如果更新失敗,您可以嘗試修正問題,然後再次執行 update.sh。您可以多次執行更新,系統會從上次中斷的地方繼續更新。

如果失敗時需要將更新復原至先前版本,請參閱「復原 4.18.05」一節。

記錄更新資訊

根據預設,update.sh 公用程式會將記錄資訊寫入:

/opt/apigee/var/log/apigee-setup/update.log

如果執行 update.sh 公用程式的使用者無法存取該目錄,系統會將記錄寫入 /tmp 目錄,並命名為 update_username.log。

如果使用者無法存取 /tmp,update.sh 公用程式就會失敗。

零停機更新

零停機時間更新 (或滾動式更新) 可讓您更新 Edge 安裝,而不會關閉 Edge。

只有 5 個節點以上的設定,才能進行零停機時間更新。

如要進行零停機時間升級,關鍵在於從負載平衡器中逐一移除各個路由器。接著,您要更新路由器和與路由器位於同一部機器上的任何其他元件,然後將路由器重新加入負載平衡器。

  1. 請按照機器更新順序中的說明,依正確順序更新安裝作業中的機器。
  2. 更新路由器時,請選取任一路由器,並將其設為無法連線,如「啟用/停用伺服器 (訊息處理器/路由器) 可連線狀態」所述。
  3. 更新所選路由器,以及與路由器位於同一部機器上的所有其他 Edge 元件。 所有 Edge 設定都會在同一個節點上顯示路由器和訊息處理器。
  4. 讓路由器恢復連線。
  5. 對其餘路由器重複步驟 2 到 4。
  6. 繼續更新安裝作業中的其餘機器。

更新前後請留意以下事項:

  • 在合併的路由器和訊息處理器節點上:
    • 更新前:請執行下列操作:
      1. 讓路由器無法連線。
      2. 讓訊息處理器無法連線。
    • 更新後,請執行下列操作:
      1. 讓訊息處理器可供連線。
      2. 讓路由器可供連線。
  • 在單一路由器節點上:
    • 更新前,請先讓路由器無法連線。
    • 更新後,請確保路由器可連線。
  • 在單一訊息處理器節點上:
    • 更新前,請先讓訊息處理器無法連線。
    • 更新後,請讓訊息處理器可供連線。

使用靜音設定檔

您必須將自動設定檔傳遞至更新指令。自動設定檔應與您用來安裝 Edge 4.17.0x 的檔案相同。

在具備外部網際網路連線的節點上更新至 4.18.05

請按照下列程序更新節點上的 Edge 元件:

  1. 如果您目前使用 Postgres 主要/待命複製功能搭配本機儲存空間,請按照「安裝新的 Postgres 待命節點」一節的說明,安裝新的 Postgres 待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」。

  2. 如有任何 CRON 工作設定為對 Cassandra 執行修復作業,請先停用,直到更新完成為止。
  3. 以 root 身分登入節點,安裝 Edge RPM。
  4. 安裝 yum-utils 和 yum-plugin-priorities:
    sudo yum install yum-utils
    sudo yum install yum-plugin-priorities
  5. 按照「安裝 Edge apigee-setup 公用程式」一文中的說明停用 SELinux。
  6. 如果是在 Oracle 7.x 上安裝,請執行下列指令:
    sudo yum-config-manager --enable ol7_optional_latest
  7. 如果您是在 AWS 上安裝,請執行下列 yum-configure-manager 指令:
    yum update rh-amazon-rhui-client.noarch
    sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
  8. 將 Edge 4.18.05 bootstrap_4.18.05.sh 檔案下載至 /tmp/bootstrap_4.18.05.sh:
    curl https://software.apigee.com/bootstrap_4.18.05.sh -o /tmp/bootstrap_4.18.05.sh
  9. 安裝 Edge 4.18.05 apigee-service 公用程式和依附元件:
    sudo bash /tmp/bootstrap_4.18.05.sh apigeeuser=uName apigeepassword=pWord

    其中 uName:pWord 是您從 Apigee 取得的使用者名稱和密碼。如果省略 pWord,系統會提示您輸入。

    根據預設,安裝程式會檢查您是否已安裝 Java 1.8。如果沒有,系統會為您安裝。使用 JAVA_FIX 選項,指定 Java 安裝作業的處理方式。JAVA_FIX 採用下列值:

    • I = 安裝 OpenJDK 1.8 (預設)
    • C = 繼續操作,不安裝 Java
    • Q = 退出。如果選擇這個選項,您必須自行安裝 Java。
  10. 使用 apigee-service 更新 apigee-setup 公用程式:
    /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
  11. 更新管理伺服器上的 apigee-validate 公用程式:
    /opt/apigee/apigee-service/bin/apigee-service apigee-validate update
  12. 更新 apigee-provision 公用程式:
    /opt/apigee/apigee-service/bin/apigee-service apigee-provision update
  13. 按照「機器更新順序」一節所述的順序,在節點上執行更新公用程式:
    /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile

    設定檔的唯一要求是「apigee」使用者必須能夠存取或讀取設定檔。

    使用 -c 選項指定要更新的元件。可能包含的元件如下:

    • "cs" = Cassandra
    • 「e」= ElasticSearch
    • 「edge」= Edge UI 以外的所有 Edge 元件。「edge」元件包括 Management Server、訊息處理器、Router、QPID Server、Edge Postgres Server。
    • "ldap" = OpenLDAP
    • "ps" = postgresql
    • "qpid" = qpidd
    • "sso" = Edge SSO
    • "ui" = Edge UI
    • "zk" = Zookeeper

    您可以將 component 設為「all」,對所有元件執行 update.sh,但前提是您必須具備 Edge all-in-one (aio) 安裝設定檔。例如:

    /opt/apigee/apigee-setup/bin/update.sh -c all -f ./sa_silent_config
  14. 在所有執行 Edge UI 元件的機器上重新啟動該元件 (如果尚未這麼做):
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart
  15. 如要測試更新,請按照「測試安裝」一節所述,在管理伺服器上執行 apigee-validate 公用程式。
  16. 如果您安裝了新的 Postgres 待命節點,請按照「停用 Postgres 節點」一文中的說明停用該節點。

    如果您使用網路儲存空間,則不必安裝新節點。詳情請參閱「必須升級至 Postgres 9.6」。

如要復原更新,請按照「復原 4.18.05」一節所述的程序操作。

從本機存放區更新至 4.18.05

如果 Edge 節點位於防火牆後方,或因其他原因而無法透過網際網路存取 Apigee 存放區,您可以從 Apigee 存放區的本機存放區或鏡像執行更新。

建立本機 Edge 存放區後,您可以透過下列兩種方式從本機存放區更新 Edge:

  • 建立存放區的 .tar 檔案,將 .tar 檔案複製到節點,然後從 .tar 檔案更新 Edge。
  • 在本機存放區的節點上安裝網路伺服器,讓其他節點可以存取。 Apigee 提供 Nginx 網路伺服器供您使用,您也可以使用自己的網路伺服器。

如要從本機 4.18.05 存放區更新:

  1. 如果您目前使用 Postgres 主要/待命複製功能,請按照「安裝新的 Postgres 待命節點」一節所述,安裝新的 Postgres 待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」。

  2. 按照「安裝 Edge apigee-setup 公用程式」一文中的「建立本機 Apigee 存放區」一節,建立本機 4.18.05 存放區。
  3. 如要從 .tar 檔案安裝 apigee-service:
    1. 在本機存放區所在的節點上,使用下列指令將本機存放區封裝成名為 /opt/apigee/data/apigee-mirror/apigee-4.18.05.tar.gz 的單一 .tar 檔案:
      /opt/apigee/apigee-service/bin/apigee-service apigee-mirror package
    2. 將 .tar 檔案複製到要更新 Edge 的節點。例如,將其複製到新節點上的 /tmp 目錄。
    3. 在新節點上,將檔案解壓縮至 /tmp 目錄:
      tar -xzf apigee-4.18.05tar.gz

      這個指令會在含有 .tar 檔案的目錄中,建立名為 repos 的新目錄。例如 /tmp/repos。

    4. 從 /tmp/repos 安裝 Edge apigee-service 公用程式和依附元件:
      sudo bash /tmp/repos/bootstrap_4.18.05.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos

      請注意,您在這個指令中加入了 repos 目錄的路徑。

  4. 如要使用 Nginx 網路伺服器安裝 apigee-service:
    1. 按照「安裝 Edge apigee-setup 公用程式」一文中的「使用 Nginx 網路伺服器從存放區安裝」一節所述,設定 Nginx 網路伺服器。
    2. 在遠端節點上,將 Edge bootstrap_4.18.05.sh 檔案下載至 /tmp/bootstrap_4.18.05.sh:
      /usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap_4.18.05.sh -o /tmp/bootstrap_4.18.05.sh

      其中 uName:pWord 是您先前為存放區設定的使用者名稱和密碼,remoteRepo 則是存放區節點的 IP 位址或 DNS 名稱。

    3. 在遠端節點上,安裝 Edge apigee-service 公用程式和依附元件:
      sudo bash /tmp/bootstrap_4.18.05.sh apigeerepohost=remoteRepo:3939 apigeeuser=uName apigeepassword=pWord apigeeprotocol=http://

      其中 uName:pWord 是存放區使用者名稱和密碼。

  5. 使用 apigee-service 更新 apigee-setup 公用程式:
    /opt/apigee/apigee-service/bin/apigee-service apigee-setup update 
  6. 更新管理伺服器上的 apigee-validate 公用程式:
    /opt/apigee/apigee-service/bin/apigee-service apigee-validate update
  7. 更新 apigee-provision 公用程式:
    /opt/apigee/apigee-service/bin/apigee-service apigee-provision update
  8. 按照「機器更新順序」一節所述的順序,在節點上執行 update 公用程式:
    /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile

    設定檔的唯一要求是「apigee」使用者必須能夠存取或讀取設定檔。

    使用 -c 選項指定要更新的元件。可能包含的元件如下:

    • "cs" = Cassandra
    • 「e」= ElasticSearch
    • 「edge」= Edge UI 以外的所有 Edge 元件。「edge」元件包括 Management Server、訊息處理器、Router、QPID Server、Edge Postgres Server。
    • "ldap" = OpenLDAP
    • "ps" = postgresql
    • "qpid" = qpidd
    • "sso" = Edge SSO
    • "ui" = Edge UI
    • "zk" = Zookeeper

    您可以將 component 設為「all」,對所有元件執行 update.sh,但前提是您必須具備 Edge all-in-one (aio) 安裝設定檔。例如:

    /opt/apigee/apigee-setup/bin/update.sh -c all -f ./sa_silent_config
  9. 在所有執行 Edge UI 元件的機器上重新啟動該元件 (如果尚未這麼做):
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart
  10. 如要測試更新,請按照「測試安裝」一節所述,在管理伺服器上執行 apigee-validate 公用程式。
  11. 如果您安裝了新的 Postgres 待命節點,請按照「停用 Postgres 節點」一文中的說明停用該節點。

    如果您使用網路儲存空間,則不必安裝新節點。詳情請參閱「必須升級至 Postgres 9.6」。

如要復原更新,請按照「復原 4.18.05」一節所述的程序操作。

機器更新順序

在 Edge 安裝作業中,更新機器的順序很重要。更新時最重要的考量因素如下:

  • 您必須先更新所有 Cassandra 和 ZooKeeper 節點,才能更新其他節點。
  • 如果機器有多個 Edge 元件 (管理伺服器、訊息處理器、路由器、QPID 伺服器,但不包括 Postgres 伺服器),請使用「-c edge」選項同時更新所有元件。
  • 如果步驟指定應在多部機器上執行,請按照指定的機器順序執行。
  • 您不需要另外更新營利功能。指定「-c edge」選項時,系統會更新這個檔案。

1 節點獨立安裝

  1. 更新 Cassandra 和 ZooKeeper:
    /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. 更新 Qpid:
    /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  3. 更新 LDAP:
    /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  4. 停止 Postgres 伺服器、Qpid 伺服器和 PostgreSQL:
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
  5. 更新 postgresql:
    /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
  6. 更新 Postgres 資料庫:
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
  7. 更新其餘 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  8. 更新 Edge UI:
    /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  9. (如果您已安裝 Edge SSO) 更新 Edge SSO:
    /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file

    其中 sso_config_file 是您在安裝 SSO 時建立的設定檔。

  10. 重新啟動 Edge UI 元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart

2 節點獨立安裝

如需 Edge 拓撲和節點編號清單,請參閱「安裝拓撲」。

  1. 在機器 1 上更新 Cassandra 和 ZooKeeper:
    /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  2. 在機器 2 上更新 Qpid:
    /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  3. 在機器 1 上更新 LDAP:
    /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  4. 更新機器 1 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  5. 更新機器 1 的 UI:
    /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  6. (如果您已安裝 Edge SSO) 在機器 1 上更新 Edge SSO:
    /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file

    其中 sso_config_file 是您在安裝 SSO 時建立的設定檔。

  7. 更新機器 2 上的 postgresql:
    1. 停止 Postgres 伺服器、Qpid 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    2. 更新 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    3. 更新 Postgres 資料庫:
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
    4. 更新機器 2 上的 Edge 元件:
      /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  8. 在機器 1 上重新啟動 Edge UI 元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart

5 節點安裝

如需 Edge 拓撲和節點編號清單,請參閱「安裝拓撲」。

  1. 請務必按照「安裝新的 Postgres 待命節點」一文所述,安裝新的 Postgres 待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」。

  2. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  3. 更新機器 4 和 5 上的 Qpid:
    /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  4. 在機器 1 上更新 LDAP:
    /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. 更新機器 1、2、3 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  6. 更新機器 1 的 UI:
    /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  7. (如果您已安裝 Edge SSO) 在機器 1 上更新 Edge SSO:
    /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file

    其中 sso_config_file 是您在安裝 SSO 時建立的設定檔。

  8. 更新機器 4 和 5:
    1. 停止機器 4 上的 Postgres 伺服器和 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    2. 在機器 5 停止 Postgres 伺服器、Qpid 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    3. 如果已安裝,請在您為復原作業新增的待命節點上,停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    4. 更新機器 4 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    5. 更新機器 4 上的 Postgres 資料庫 (僅限 Postgres 主節點):
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
    6. 更新機器 5 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    7. 在機器 4 和 5 上啟動 Postgres 伺服器和 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
    8. 在機器 5 執行下列指令,將 Postgres 設為待命節點:
      cd /opt/apigee/data/apigee-postgresql/pgdata
      rm -rf *
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile
    9. 在兩部伺服器上執行下列指令碼,驗證複製狀態。系統應在兩部伺服器上顯示相同的結果,確保複製成功:
      • 在機器 4 (主要節點) 上執行:
        /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-master

        確認顯示為主要執行個體。

      • 在機器 5 (待命節點) 上:
        /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby

        確認狀態顯示為待命。

  9. 更新機器 4、5 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  10. 請務必按照「停用 Postgres 節點」一節所述,停用新的待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。詳情請參閱「必須升級至 Postgres 9.6」。

  11. 在機器 1 上重新啟動 Edge UI 元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart

9 節點叢集安裝

如需 Edge 拓撲和節點編號清單,請參閱「安裝拓撲」。

  1. 請務必按照「安裝新的 Postgres 待命節點」一文所述,安裝新的 Postgres 待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」。

  2. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  3. 更新機器 6 和 7 上的 Qpid:
    /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  4. 在機器 1 上更新 LDAP:
    /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. 依序更新機器 6、7、1、4 和 5 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  6. 更新機器 1 的 UI:
    /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  7. (如果您已安裝 Edge SSO) 在機器 1 上更新 Edge SSO:
    /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file

    其中 sso_config_file 是您在安裝 SSO 時建立的設定檔。

  8. 更新機器 8 和 9:
    1. 停止機器 8 上的 Postgres 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
    2. 在機器 9 停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    3. 停止機器 6 和 7 上的 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    4. 如果已安裝,請在您為復原作業新增的待命節點上,停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    5. 更新機器 8 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    6. 更新機器 8 上的 Postgres 資料庫 (僅限 Postgres 主節點):
      /-->
      opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
    7. 更新機器 9 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    8. 在機器 8 和 9 上啟動 Postgres 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
    9. 在機器 6 和 7 上啟動 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
    10. 在機器 9 執行下列指令,將 Postgres 設為待命節點:
      cd /opt/apigee/data/apigee-postgresql/pgdata
      rm -rf *
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile
    11. 在兩部伺服器上執行下列指令碼,驗證複製狀態。系統應在兩部伺服器上顯示相同的結果,確保複製成功:
      • 在機器 8 (主要節點) 上執行:
        /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-master

        確認顯示為主要執行個體。

      • 在機器 9 (待命節點) 上:
        /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby

        確認狀態顯示為待命。

  9. 更新機器 8 和 9 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  10. 請務必按照「停用 Postgres 節點」一節所述,停用新的待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。詳情請參閱「必須升級至 Postgres 9.6」。

  11. 在機器 1 上重新啟動 Edge UI 元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart

13 節點叢集安裝

如需 Edge 拓撲和節點編號清單,請參閱「安裝拓撲」。

  1. 請務必按照「安裝新的 Postgres 待命節點」一文所述,安裝新的 Postgres 待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」。

  2. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  3. 更新機器 12 和 13 上的 Qpid:
    /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  4. 在機器 4 和 5 上更新 LDAP:
    /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. 依序更新機器 12、13、6、7、10 和 11 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  6. 更新機器 6 和 7 的 UI:
    /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  7. (如果您已安裝 Edge SSO) 在機器 6 和 7 上更新 Edge SSO:
    /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file

    其中 sso_config_file 是您在安裝 SSO 時建立的設定檔。

  8. 更新機器 8 和 9:
    1. 停止機器 8 上的 Postgres 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
    2. 在機器 9 停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    3. 停止機器 12 和 13 上的 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    4. 如果已安裝,請在您為復原作業新增的待命節點上,停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    5. 更新機器 8 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    6. 更新機器 8 上的 Postgres 資料庫 (僅限 Postgres 主節點):
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
    7. 更新機器 9 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    8. 在機器 8 和 9 上啟動 Postgres 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
    9. 在機器 12 和 13 上啟動 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
    10. 在機器 9 執行下列指令,將 Postgres 設為待命節點:
      cd /opt/apigee/data/apigee-postgresql/pgdata
      rm -rf *
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile
    11. 在兩部伺服器上執行下列指令碼,驗證複製狀態。系統應在兩部伺服器上顯示相同的結果,確保複製成功:
      • 在機器 8 (主要節點) 上執行:
        /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-master

        確認顯示為主要執行個體。

      • 在機器 9 (待命節點) 上:
        /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby

        確認狀態顯示為待命。

  9. 更新機器 8 和 9 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  10. 請務必按照「停用 Postgres 節點」一節所述,停用新的待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。詳情請參閱「必須升級至 Postgres 9.6」。

  11. 在機器 6 和 7 上重新啟動 Edge UI 元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart

12 節點叢集安裝

如需 Edge 拓撲和節點編號清單,請參閱「安裝拓撲」。

  1. 請務必按照「安裝新的 Postgres 待命節點」一節所述,安裝新的 Postgres 待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」。

  2. 更新 Cassandra 和 ZooKeeper:
    1. 在資料中心 1 的機器 1、2 和 3 上:
      /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
    2. 資料中心 2 的機器 7、8 和 9
      /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  3. 更新 qpidd:
    1. 資料中心 1 中的機器 4、5
      1. 在機器 4 上更新 qpidd:
        /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
      2. 在機器 5 重複步驟 1。
    2. 資料中心 2 中的機器 10、11
      1. 在機器 10 上更新 qpidd :
        /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
      2. 在機器 11 上重複步驟 1。
  4. 更新 LDAP:
    1. 資料中心 1 中的機器 1
      /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
    2. 資料中心 2 中的機器 7
      /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. 更新 Edge 元件:
    1. 資料中心 1 中的機器 4、5、1、2、3
      /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
    2. 資料中心 2 中的機器 10、11、7、8、9
      /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  6. 更新 UI:
    1. 資料中心 1 中的機器 1:
      /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
    2. 資料中心 2 的機器 7:
      /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  7. (如果您已安裝 Edge SSO) 更新 Edge SSO:
    1. 資料中心 1 中的機器 1:
      /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file
    2. 資料中心 2 的機器 7:
      /opt/apigee/apigee-setup/bin/update.sh -c sso -f sso_config_file
    3. 其中 sso_config_file 是您安裝 SSO 時建立的設定檔。

  8. 更新資料中心 1 的機器 6 和資料中心 2 的機器 12:
    1. 停止機器 6 上的 Postgres 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
    2. 在機器 12 上停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    3. 在機器 4、5、10 和 11 上停止 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    4. 如果已安裝,請在您為復原作業新增的待命節點上,停止 Postgres 伺服器和 postgresql:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql stop
    5. 更新機器 6 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    6. 更新機器 6 上的 Postgres 資料庫 (僅限 Postgres 主節點):
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
    7. 更新機器 12 上的 postgresql:
      /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
    8. 在機器 6 和 12 上啟動 Postgres 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
    9. 在機器 4、5、10 和 11 上啟動 Qpid 伺服器:
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
    10. 在機器 12 上執行下列指令,將 Postgres 設為待命節點:
      cd /opt/apigee/data/apigee-postgresql/pgdata
      rm -rf *
      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f configFile
    11. 在兩部伺服器上執行下列指令碼,驗證複製狀態。系統應在兩部伺服器上顯示相同的結果,確保複製成功:

      在機器 6 (主要節點) 上執行:

      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-master

      確認顯示為主要執行個體。

      在機器 12 (待命節點) 上:

      /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby

      確認狀態顯示為待命。

  9. 更新機器 6 和 12 上的 Edge 元件:
    /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  10. 請務必按照「停用 Postgres 節點」一文所述,停用新的待命節點。

    如果您使用網路儲存空間,則不必安裝新節點。詳情請參閱「必須升級至 Postgres 9.6」。

  11. 在機器 1 和 7 上重新啟動 Edge UI 元件:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restart

非標準安裝

如果您採用非標準安裝,請按照下列順序更新 Edge 元件:

  1. ZooKeeper
  2. Cassandra
  3. qpidd、ps
  4. LDAP
  5. Edge,也就是所有節點上的「-c edge」設定檔,順序如下:具有 Qpid 伺服器的節點、Edge Postgres 伺服器、管理伺服器、訊息處理器和路由器。
  6. Edge UI
  7. Edge SSO

更新完成後,請務必在所有執行 Edge UI 元件的機器上重新啟動該元件。