將 Apigee Edge 4.16.01/4.16.05 更新為 4.17.05

Edge for Private Cloud 4.17.05 版

哪些 Edge 版本可以更新至 4.17.05

您可以使用這項程序,將 Apigee Edge 4.16.01.0x 和 4.16.05.x 版更新至 4.17.05 版。

如果您使用的 Edge 版本早於 4.16.01 版,則必須先遷移至 4.16.01 版,再更新至 4.17.05 版。

  • 您可以將 Apigee Edge 4.15.07 版遷移至 4.16.01 版。
  • 如果您使用的 Edge 版本低於 4.15.07,則必須先遷移至 4.15.07 版,再遷移至 4.16.01 版。
    • 如果您是從 Edge 4.14.04 以上版本遷移:請直接遷移至 4.15.07 版。
    • 如果您是從 Edge 4.14.01 版遷移:必須先遷移至 4.14.04 版,再遷移至 4.15.07 版。

誰可以執行更新

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

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

必須更新哪些元件

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

從 4.16.01 更新時降級 Zookeeper

Edge for Private Cloud 4.16.01 中的 Zookeeper RPM 版本為 apigee-zookeeper-3.4.5-1.0.905.noarch.rpm。在後續的 Edge 版本中,Zookeeper 版本已改回 apigee-zookeeper-3.4.5-0.0.94x。這可防止 yum 將 Zookeeper 升級至 4.16.01 以上版本。如要修正這種情況,請在更新 Zookeeper 前執行 yum downgrade apigee-zookeeper。

您可以使用下列指令檢查 Zookeeper 版本:

> rpm -qa |grep apigee-zookeeper

如果這個指令傳回 Zookeeper 版本:

apigee-zookeeper-3.4.5-1.0.905

接著,您必須執行降級。

自動套用資源設定

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

更新必要條件

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

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

    這樣一來,如果新版本無法正常運作,您就有備用方案。如要進一步瞭解備份,請參閱「備份與還原」。
  • 確認 Edge 正在執行
    使用下列指令,確認 Edge 在更新程序期間正常運作:

    > /opt/apigee/apigee-service/bin/apigee-all status

處理更新失敗

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

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

記錄更新資訊

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

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

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

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

必須升級至 Java JDK 第 8 版

這個版本的 Edge 要求您在所有 Edge 處理節點上安裝 Java JDK 8 版。您可以安裝 Oracle JDK 8 或 OpenJDK 8。如果尚未安裝 Java JDK 8,更新指令碼可以為您安裝。

在 Java 8 更新中,Oracle JDK 8 不再支援部分 TLS 加密。如需完整清單,請參閱 http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html 的「Default Disabled 加密套件」一節。

必須啟用 EPEL 存放區

您必須啟用 Extra Packages for Enterprise Linux (或 EPEL),才能安裝或更新 Edge。您使用的指令取決於 RedHat/CentOS 版本:

  • RedHat/CentOS 7.x:
    > wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; rpm -ivh epel-release-latest-7.noarch.rpm
  • RedHat/CentOS 6.x:
    wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm; rpm -ivh epel-release-latest-6.noarch.rpm

必須新增 SMTPMAILFROM 設定參數

Edge 4.17.05 在啟用 SMTP 伺服器時使用的設定檔中,新增了必要參數。現在啟用 SMTP 伺服器時,必須在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:

SMTPMAILFROM="My Company <myco@company.com>"

請先將這個參數新增至設定檔,再執行更新。

使用外部驗證時,如要更新,則必須提供這項資訊

您可以將外部目錄服務整合至現有的 Apigee Edge 私有雲安裝。這項功能可與任何支援 LDAP 的目錄服務搭配使用,例如 Active Directory、OpenLDAP 等。外部 LDAP 解決方案可讓系統管理員透過集中式目錄管理服務,管理使用者憑證,該服務位於使用這些憑證的系統 (例如 Apigee Edge) 外部。

詳情請參閱「安裝拓撲」。

啟用外部驗證後,大多數客戶會使用 Active Directory SAM 帳戶名稱欄位做為驗證使用者名稱,而非 Edge OpenLDAP 伺服器使用的電子郵件地址。

如果您已與外部目錄服務整合,請在將 Edge 更新至 4.17.05 時,在設定檔中新增下列程式碼:

IS_EXTERNAL_AUTH="true"

這行會將 Edge 設為支援帳戶名稱 (而非電子郵件地址) 做為使用者名稱。

必須升級至 Qpid 1.35

這個版本包含 Qpid 1.35 的必要更新。更新 Qpid 節點時,您必須:

  • 封鎖 Qpid 節點上的通訊埠 5672,暫時防止路由器和訊息處理器寫入 Qpid 節點。您可以使用下列指令,在 Qpid 節點上封鎖這個通訊埠:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
  • 請等待 Qpid 佇列中的訊息清空,確保 Qpid 節點已在更新前處理所有訊息。使用下列指令,確保 Qpid 訊息佇列為空白:
    > qpid-stat -q
  • 更新 Qpid 節點。
  • 解除封鎖 Qpid 節點上的通訊埠 5672,允許路由器和訊息處理器存取。 您可以使用下列指令解除封鎖這個通訊埠:
    > sudo iptables -F

    請注意,如果您將 iptables 用於其他規則,可以使用 -D 選項來撤銷特定變更:
    > sudo iptables -D INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP

以下將詳細說明各個 Edge 拓撲的程序。

必須升級至 Postgres 9.4

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

在更新程序中,Postgres 節點會因更新而停機,但數據分析資料仍會寫入 Qpid 節點。Postgres 節點更新並重新上線後,系統會將數據分析資料推送至 Postgres 節點。

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

安裝新的 Postgres 待命節點

這項程序會在新的節點上建立 Postgres 待命伺服器。請務必為「現有」Edge 版本 (4.16.01 或 4.16.05) 安裝新的 Postgres 待命伺服器,而非 4.17.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 位址:
      PG_MASTER=192.168.56.103
      # 新待命節點的 IP 位址
      PG_STANDBY=192.168.56.102
    2. 按照「安裝 Edge apigee-setup 公用程式」一文中的說明停用 SELinux。
    3. 將 Edge bootstrap_4.16.05.sh 檔案下載至 /tmp/bootstrap_4.16.05.sh:
      > curl https://software.apigee.com/bootstrap_4.16.05.sh -o /tmp/bootstrap_4.16.05.sh

      注意:如果您是從 4.16.01 更新,請下載 Edge bootstrap.sh 檔案。
    4. 安裝 Edge apigee-service 公用程式和依附元件:
      > sudo bash /tmp/bootstrap_4.16.05.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>

零停機更新

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

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

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

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

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

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

使用靜音設定檔

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

在具有外部網際網路連線的節點上更新至 4.17.05 的程序

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

  1. 如果您目前使用 Postgres 主從式複製功能,請按照上述「安裝新的 Postgres 待命節點」一節的說明,安裝新的 Postgres 待命節點。
  2. 如有任何 CRON 工作設定為對 Cassandra 執行修復作業,請先停用,直到更新完成為止。
  3. 以 root 身分登入節點,安裝 Edge RPM。
    注意:雖然 RPM 安裝需要 root 存取權,但您可以在沒有 root 存取權的情況下執行 Edge 設定。
  4. 按照「安裝 Edge apigee-setup 公用程式」中的說明停用 SELinux。
  5. 將 Edge 4.17.05 bootstrap_4.17.05.sh 檔案下載至 /tmp/bootstrap_4.17.05.sh:
    > curl https://software.apigee.com/bootstrap_4.17.05.sh -o /tmp/bootstrap_4.17.05.sh
  6. 安裝 Edge 4.17.05 apigee-service 公用程式和依附元件:
    > sudo bash /tmp/bootstrap_4.17.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。
  7. (僅限 CentOS-6.x 和 RedHat-6.x) 在所有 Qpid 節點上,執行下列指令,確保下載正確的 Qpid 版本:
    > yum install apigee-qpidd --disablerepo=epel
  8. 使用 apigee-service 更新 apigee-setup 公用程式:
    1. 如果您是透過升級 Edge 4.15.07.0x 版來安裝 4.16.01,則必須安裝 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install

      這個指令會在 /opt/apigee/apigee-setup/bin 中安裝 update.sh 公用程式。

      如果您已安裝 apigee-setup 公用程式,請更新該公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
    2. 如果您直接安裝 4.16.01,也就是未從 4.15.07.0x 升級,則必須更新 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update

      這項 apigee-service 更新會在 /opt/apigee/apigee-setup/bin 中安裝 update.sh 公用程式。
    3. 如果您直接或透過更新安裝 4.16.05,則必須更新 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update

      這項 apigee-service 更新會在 /opt/apigee/apigee-setup/bin 中安裝 update.sh 公用程式。
  9. 視您目前的 Edge 版本而定,您必須在管理伺服器上安裝或更新 apigee-validate 公用程式。
    1. 如果您目前使用 Edge 4.16.05:請更新管理伺服器上的 apigee-validate 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-validate update
    2. 如果您目前使用的是 Edge 4.16.01:請在管理伺服器上安裝 apigee-validate 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-validate install

      注意:如果您在安裝 4.16.01 時,已在訊息處理器節點上安裝 apigee-validate 公用程式,可以使用下列指令在該節點上更新:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-validate update

      不過,自 4.16.05 以上版本起,Apigee 建議您在管理伺服器上安裝並執行 apigee-validate 公用程式。
    3. 如果您是從 4.16.01 升級:請編輯傳遞至 apigee-validate 公用程式的設定檔。在 4.16.01 Edge 版本中,apigee-validate 使用的設定檔需要下列屬性:
      APIGEE_ADMINPW=sysAdminPword
      MP_POD=gateway
      REGION=dc-1


      在這個版本中,設定檔只需要 APIGEE_ADMINPW 屬性。您可以從檔案中移除其他兩個屬性。
  10. 更新 apigee-provision 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-provision update
  11. 按照下方「機器更新順序」所述的順序,在節點上執行更新公用程式:
    > /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile

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

    使用「-c」選項指定要更新的元件。可能元件的清單包括:
    ldap = OpenLDAP
    cs = Cassandra
    zk = Zookeeper
    qpid = qpidd
    ps = postgresql
    edge =Edge UI 以外的所有 Edge 元件:Management Server、訊息處理器、Router、QPID Server、Postgres Server
    ui = Edge UI
    all = 更新機器上的所有元件 (僅適用於 Edge aio 安裝設定檔或 API BaaS asa 安裝設定檔)
    e = ElasticSearch
    b = API BaaS Stack
    p = API BaaS Portal
    ebp = 位於相同節點上的 ElasticSearch、API BaaS Stack 和 API BaaS Portal
  12. 如要測試更新,請在管理伺服器上執行 apigee-validate 公用程式,如「測試安裝」一節所述。
  13. 如果您安裝了新的 Postgres 待命節點,請按照上述「停用 Postgres 節點」一節中的說明停用該節點。

如要復原更新,請按照「4.17.05 復原程序」中的步驟操作。

從本機存放區更新至 4.17.05 的程序

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

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

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

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

  1. 如果您目前使用 Postgres 主從式複製功能,請按照上述「安裝新的 Postgres 待命節點」一節的說明,安裝新的 Postgres 待命節點。
  2. 按照「安裝 Edge apigee-setup 公用程式」中的「建立本機 Apigee 存放區」一節所述,建立本機 4.17.05 存放區。
    注意:如果您已有 4.16.01 或 4.16.05 存放區,可以按照「安裝 Edge apigee-setup 公用程式」一文中的「更新本機 Apigee 存放區」一節所述,將 4.17.05 存放區新增至該存放區。
  3. 如要從 .tar 檔案安裝 apigee-service:
    1. 在本機存放區的節點上,使用下列指令將本機存放區封裝成名為 /opt/apigee/data/apigee-mirror/apigee-4.17.05.tar.gz 的單一.tar 檔案:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-mirror package
    2. 將 .tar 檔案複製到要更新 Edge 的節點。例如,將其複製到新節點上的 /tmp 目錄。
    3. 在新節點上,將檔案解壓縮至 /tmp 目錄:
      > tar -xzf apigee-4.17.05.tar.gz

      這個指令會在包含 .tar 檔案的目錄中建立名為 repos 的新目錄。例如 /tmp/repos。
    4. 從 /tmp/repos 安裝 Edge apigee-service 公用程式和依附元件:
      > sudo bash /tmp/repos/bootstrap_4.17.05.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos

      請注意,您在這個指令中加入了 repos 目錄的路徑。
  4. 如要使用 Nginx 網路伺服器安裝 apigee-service:
    1. 按照「安裝 Edge apigee-setup 公用程式」一文中的「使用 Nginx 網路伺服器從存放區安裝」一節所述,設定 Nginx 網路伺服器。
    2. 在遠端節點上,將 Edge bootstrap_4.17.05.sh 檔案下載至 /tmp/bootstrap_4.17.05.sh:
      > /usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap_4.17.05.sh -o /tmp/bootstrap_4.17.05.sh

      其中 uName:pWord 是您在上方為存放區設定的使用者名稱和密碼,而 remoteRepo 是存放區節點的 IP 位址或 DNS 名稱。
    3. 在遠端節點上,安裝 Edge apigee-service 公用程式和依附元件:
      > sudo bash /tmp/bootstrap_4.17.05.sh apigeerepohost=remoteRepo:3939 apigeeuser=uName apigeepassword=pWord apigeeprotocol=http://

      其中 uName:pWord 是存放區使用者名稱和密碼。
  5. 使用 apigee-service 更新 apigee-setup 公用程式:
    1. 如果您是透過升級 Edge 4.15.07.0x 版來安裝 4.16.01,則必須安裝 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup install

      這個指令會在 /opt/apigee/apigee-setup/bin 中安裝 update.sh 公用程式。

      如果您已安裝 apigee-setup 公用程式,請更新該公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
    2. 如果您直接安裝 4.16.01,也就是未從 4.15.07.0x 升級,則必須更新 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update

      這項 apigee-service 更新會在 /opt/apigee/apigee-setup/bin 中安裝 update.sh 公用程式。
    3. 如果您直接或透過更新安裝 4.16.05,則必須更新 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup update

      這項 apigee-service 更新會在 /opt/apigee/apigee-setup/bin 中安裝 update.sh 公用程式。
  6. 視您目前的 Edge 版本而定,您必須在管理伺服器上安裝或更新 apigee-validate 公用程式。
    1. 如果您目前使用 Edge 4.16.05:請更新管理伺服器上的 apigee-validate 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-validate update
    2. 如果您目前使用的是 Edge 4.16.01:請在管理伺服器上安裝 apigee-validate 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-validate install

      注意:如果您在安裝 4.16.01 時,已在訊息處理器節點上安裝 apigee-validate 公用程式,可以使用下列指令在該節點上更新:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-validate update

      不過,自 4.16.05 以上版本起,Apigee 建議您在管理伺服器上安裝及執行 apigee-validate 公用程式。
    3. 如果您是從 4.16.01 升級:請編輯傳遞至 apigee-validate 公用程式的設定檔。在 4.16.01 Edge 版本中,apigee-validate 使用的設定檔需要下列屬性:
      APIGEE_ADMINPW=sysAdminPword
      MP_POD=gateway
      REGION=dc-1


      在這個版本中,設定檔只需要 APIGEE_ADMINPW 屬性。您可以從檔案中移除其他兩個屬性。
  7. 更新 apigee-provision 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-provision update
  8. 按照下方「機器更新順序」一節所述的順序,在節點上執行更新公用程式:
    > /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile

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

    使用「-c」選項指定要更新的元件。可能元件的清單包括:
    ldap = OpenLDAP
    cs = Cassandra
    zk = Zookeeper
    qpid = qpidd
    ps = postgresql
    edge =Edge UI 以外的所有 Edge 元件:Management Server、訊息處理器、Router、QPID Server、Postgres Server
    ui = Edge UI
    all = 更新機器上的所有元件 (僅適用於 Edge aio 安裝設定檔或 API BaaS asa 安裝設定檔)
    e = ElasticSearch
    b = API BaaS Stack
    p = API BaaS Portal
    ebp = 位於相同節點上的 ElasticSearch、API BaaS Stack 和 API BaaS Portal
  9. 如要測試更新,請在管理伺服器上執行 apigee-validate 公用程式,如「測試安裝」一節所述。
  10. 如果您安裝了新的 Postgres 待命節點,請按照上述「停用 Postgres 節點」一節中的說明停用該節點。

如要復原更新,請按照「4.17.05 復原程序」中的步驟操作。

機器更新順序

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

  • 您必須先更新所有 Cassandra 和 ZooKeeper 節點,才能更新其他節點。
  • 如果機器有多個 Edge 元件 (管理伺服器、訊息處理器、路由器、QPID 伺服器,但不包括 Postgres 伺服器),請使用「-c edge」選項同時更新所有元件。
  • 如果步驟指定應在多部機器上執行,請按照指定的機器順序執行。
  • 您不需要另外更新營利功能。指定「-c edge」選項時,系統會更新這個值。
  • (僅限 CentOS-6.x 和 RedHat-6.x) 在所有具備外部網際網路連線的 Qpid 節點上,請務必執行下列指令,下載正確的 Qpid 版本,如上所示:
    > yum install apigee-qpidd --disablerepo=epel

如果是 1 主機獨立安裝

  1. 如果您已在 Edge 上啟用 SMTP,請在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:
    SMTPMAILFROM="My Company <myco@company.com>"
  2. 如果從 4.16.01 更新,請降級 Zookeeper:
    > yum downgrade apigee-zookeeper
  3. 更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 設定下列 iptables 規則:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
  5. 檢查 Qpid 訊息佇列:
    > qpid-stat -q

    繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
  6. 更新 qpidd:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  7. 清除 iptables:
    > sudo iptables -F
  8. 更新 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  9. 停止 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
  10. 更新 postgresql:
    > /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
  11. 更新 Postgres 資料庫:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
  12. 更新其餘 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  13. 更新 Edge UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

2 主機獨立安裝

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

  1. 如果您已在 Edge 上啟用 SMTP,請在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:
    SMTPMAILFROM="My Company <myco@company.com>"
  2. 如果從 4.16.01 更新,請在機器 1 上降級 Zookeeper:
    > yum downgrade apigee-zookeeper
  3. 在機器 1 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 在機器 2 上設定下列 iptables 規則:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
  5. 檢查機器 2 上的 Qpid 訊息佇列:
    > qpid-stat -q

    繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
  6. 在機器 2 上更新 qpidd:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  7. 清除機器 2 的 iptables:
    > sudo iptables -F
  8. 在機器 1 上更新 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  9. 更新機器 1 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  10. 更新機器 1 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  11. 更新機器 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 和機器 1 上的 Edge 元件:
      > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  12. 更新機器 2 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile

5 主機叢集安裝

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

  1. 如果您已在 Edge 上啟用 SMTP,請在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:
    SMTPMAILFROM="My Company <myco@company.com>"
  2. 請務必按照上述「安裝新的 Postgres 待命節點」一節所述,安裝新的 Postgres 待命節點。
  3. 如果是從 4.16.01 更新,請在機器 1、2 和 3 上降級 Zookeeper:
    > yum downgrade apigee-zookeeper
  4. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  5. 在機器 4 上設定下列 iptables 規則:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
  6. 檢查機器 4 上的 Qpid 訊息佇列:
    > qpid-stat -q

    繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
  7. 更新機器 4 上的 qpidd:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  8. 清除機器 4 的 iptables:
    > sudo iptables -F
  9. 在機器 5 重複步驟 5 到 8。
  10. 在機器 1 上更新 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  11. 更新機器 1、2、3 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  12. 更新機器 1 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  13. 更新機器 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

      確認系統顯示其為待命節點。
  14. 更新機器 4、5 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  15. 請務必按照上述「停用 Postgres 節點」中的程序,停用新的待命節點。

如果是 9 主機叢集安裝

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

  1. 如果您已在 Edge 上啟用 SMTP,請在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:
    SMTPMAILFROM="My Company <myco@company.com>"
  2. 請務必按照上述「安裝新的 Postgres 待命節點」一節所述,安裝新的 Postgres 待命節點。
  3. 如果是從 4.16.01 更新,請在機器 1、2 和 3 上降級 Zookeeper:
    > yum downgrade apigee-zookeeper
  4. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  5. 在機器 6 上設定下列 iptables 規則:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
  6. 檢查機器 6 上的 Qpid 訊息佇列:
    > qpid-stat -q

    繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
  7. 更新機器 6 上的 qpidd:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  8. 清除機器 6 的 iptables:
    > sudo iptables -F
  9. 在機器 7 重複步驟 5 到 8。
  10. 在機器 1 上更新 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  11. 依序更新機器 6、7、1、4 和 5 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  12. 更新機器 1 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  13. 更新機器 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

      確認系統顯示該節點為待命節點。
  14. 更新機器 8 和 9 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  15. 請務必按照上述「停用 Postgres 節點」中的程序,停用新的待命節點。

13 主機叢集安裝

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

  1. 如果您已在 Edge 上啟用 SMTP,請在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:
    SMTPMAILFROM="My Company <myco@company.com>"
  2. 請務必按照上述「安裝新的 Postgres 待命節點」一節所述,安裝新的 Postgres 待命節點。
  3. 如果是從 4.16.01 更新,請在機器 1、2 和 3 上降級 Zookeeper:
    > yum downgrade apigee-zookeeper
  4. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  5. 在機器 12 上設定下列 iptables 規則:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
  6. 檢查機器 12 上的 Qpid 訊息佇列:
    > qpid-stat -q

    繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
  7. 更新機器 12 上的 qpidd:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  8. 清除機器 12 的 iptables:
    > sudo iptables -F
  9. 在機器 13 重複步驟 5 到 8。
  10. 更新機器 4 和 5 上的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  11. 依序更新機器 12、13、6、7、10 和 11 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  12. 更新機器 6 和 7 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  13. 更新機器 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

      確認系統顯示該節點為待命節點。
  14. 更新機器 8 和 9 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
  15. 請務必按照上述「停用 Postgres 節點」中的程序,停用新的待命節點。

12 主機叢集安裝

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

  1. 如果您已在 Edge 上啟用 SMTP,請在設定檔中設定 SMTPMAILFROM。這個參數的格式如下:
    SMTPMAILFROM="My Company <myco@company.com>"
  2. 請務必按照上述「安裝新的 Postgres 待命節點」一節所述,安裝新的 Postgres 待命節點。
  3. 更新 Cassandra 和 ZooKeeper:
    1. 如果從 4.16.01 更新,請在資料中心 1 的機器 1、2 和 3 上降級 Zookeeper:
      > yum downgrade apigee-zookeeper
    2. 在資料中心 1 的機器 1、2 和 3 上:
      > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
    3. 如果從 4.16.01 更新,請在資料中心 2 的機器 7、8 和 9 上降級 Zookeeper:
      > yum downgrade apigee-zookeeper
    4. 在資料中心 2 的機器 7、8 和 9 上
      > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 更新 qpidd:
    1. 資料中心 1 中的機器 4、5
      1. 在機器 4 上設定下列 iptables 規則:
        > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
      2. 檢查機器 4 上的 Qpid 訊息佇列:
        > qpid-stat -q

        繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
      3. 更新機器 4 上的 qpidd:
        > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
      4. 清除機器 4 上的 iptables:
        > sudo iptables -F
      5. 在機器 5 重複步驟 1 到 4。
    2. 資料中心 2 中的機器 10、11
      1. 在機器 10 上設定下列 iptables 規則:
        > sudo iptables -A INPUT -p tcp --destination-port 5672 ! -s `hostname` -i eth0 -j DROP
      2. 檢查機器 10 上的 Qpid 訊息佇列:
        > qpid-stat -q

        繼續檢查佇列,直到「msg」欄中的計數為 0。Qpid 必須處理完所有訊息,才能升級。
      3. 更新機器 10 上的 qpidd:
        > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
      4. 清除機器 10 上的 iptables:
        > sudo iptables -F
      5. 在機器 11 重複步驟 1 到 4。
  5. 更新 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
  6. 更新 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
  7. 更新 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
  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 節點」中的程序,停用新的待命節點。

7 主機或 10 主機 API BaaS 安裝

非標準安裝

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

  1. ZooKeeper
  2. Cassandra
  3. qpidd
  4. LDAP
  5. Edge,也就是所有節點上的「-c edge」設定檔,順序如下:具有 Qpid 伺服器但沒有 Postgres 伺服器的節點、Management Server、訊息處理器和 Router。
    注意:如果節點同時安裝 Qpid 伺服器和 Postgres 伺服器,請在步驟 8 執行「-c edge」設定檔步驟。
  6. Edge UI
  7. Postgres 主執行個體上的 postgresql,包括升級。
  8. Postgres 待命執行個體上的 postgresql。
  9. Edge,也就是所有合併 Qpid 和 Postgres 節點,或任何獨立 Postgres 節點上的「-c edge」設定檔。