將 Apigee Edge 4.17.0x 更新至 4.18.01

私有雲 v4.18.01 的邊緣

哪些 Edge 版本可以更新至 4.18.01 版

您可以透過這項程序更新 Apigee Edge 4.17.0x 版。

如果 Edge 先前為 4.16.01 版,您必須先遷移至 4.16.01.x 版,然後再更新至 4.18.01 版。

誰可以執行更新

執行更新的使用者必須與原先安裝 Edge 的使用者,或以根層級執行的使用者相同。

安裝 Edge RPM 後,任何使用者都能設定。

哪些元件必須更新

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

維持相容性

將私有雲的 Apigee Edge 升級至 4.18.01 版時,您必須確保產生的實作項目僅參照設定檔中支援的屬性。

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

自動傳播資源設定

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

新增 SMTP 管 FROM 設定參數的必要項目

Edge 4.17.05 在啟用 SMTP 伺服器時使用的設定檔中加入新的必要參數。如果您要從 4.17.01 更新,那麼在啟用 SMTP 伺服器時,您必須在設定檔中設定 SMTP FROM

API BaaS 4.17.09 版也開始支援 SMTPFROMFROM 屬性。從 4.17.01 或 4.17.05 更新 API BaaS 時,您必須在設定檔中設定 SMTPFROM

這個參數的格式如下:

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

必須升級至 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 節點中,用於原型設計和測試的拓撲中,您只有一個 Postgres 節點。您可以直接更新這些 Postgres 節點,不必建立新的 Postgres 節點。
  • 如果您的 Postgres 節點使用網路儲存空間 (由 Apigee 推薦),您不必安裝新的 Postgres 節點。在下列程序中,您可以略過指定安裝和稍後停用新的 Postgres 待命節點的步驟。

    開始更新程序之前,請先拍攝 Postgres 所用資料儲存庫的網路快照。然後,如果更新期間發生任何錯誤,且您必須強制復原,可以從該快照還原 Postgres 節點。

安裝新的 Postgres 待命節點

這項程序會在新的節點上建立 Postgres 待命伺服器。請確認您已為現有的 Edge 版本 (4.17.0x) 安裝新的 Postgres 待命伺服器,而非 4.18.01 版。

如要執行安裝作業,請使用安裝目前 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 位址。

    如果 postgresql.properties 檔案不存在,請建立該檔案,並使用 chown 將存取權授予 apigee 使用者,如以下範例所示:

    chown apigee:apigee /opt/apigee/customer/application/postgresql.properties
  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 檔案 (其中 4.17.0x4.17.014.17.054.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

    如果 Postgres 未運作,請啟動:
    > /opt/apigee/apigee-service/bin/apigee-all start
  2. 在新待命節點上執行下列 cURL 指令,取得新待命節點的 UUID:
    > curl -u sysAdminEmail:password http://<node_IP>:8084/v1/servers/self

    輸出內容的結尾應會顯示節點的 UUID。"

  3. 在新待命節點上執行下列指令,停止新的待命節點:
    > /opt/apigee/apigee-service/bin/apigee-all stop
  4. 在 Postgres 主要節點中編輯 /opt/apigee/customer/application/postgresql.properties,將新的待命節點從 /opt/apigee/customer/application/postgresql.properties 中移除:
    /opt/apigee/customer/application/postgresql.properties
  5. 在 Postgres 主要執行個體上重新啟動 apigee-postgresql:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restart
  6. 查看主要執行個體的 /opt/apigee/apigee-postgresql/conf/pg_hba.conf 檔案,確認新的待命節點已移除。在該檔案中,您應該只會看到下列這一行內容:
    主機複製作業 apigee existing_slave_ip/32 信任
  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.01 復原程序

記錄更新資訊

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

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

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

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

零停機時間更新

零停機時間更新或滾動式更新可讓您在不降低 Edge 的情況下更新 Edge 安裝。

只有在設定 5 節點以上設定的情況下,零停機時間更新才能使用。

升級零停機的關鍵就是從負載平衡器一次移除一個路由器。接著,您要更新路由器和同一部機器上的任何其他元件,然後再將路由器加回負載平衡器。

  1. 按照「機器更新順序」中的說明,按照正確的安裝順序更新機器。
  2. 需要更新路由器時,請選取任一路由器,使其無法連線至該路由器,相關說明請參閱啟用/停用伺服器 (訊息處理器/路由器) 可連性一文。
  3. 在與路由器相同的機器上,更新所選路由器和所有其他 Edge 元件。 所有邊緣設定都會在同一節點上顯示路由器和訊息處理器。
  4. 重新連線至路由器。
  5. 針對其餘的路由器重複步驟 2 到步驟 4。
  6. 繼續更新安裝檔中剩餘的任何機器。

請在更新前/後處理下列事項:

  • 在合併的路由器和訊息處理器節點上:
    • 更新前,請執行下列步驟:
      1. 無法連線至路由器。
      2. 將無法連上「訊息處理器」。
    • 更新後,請執行下列步驟:
      1. 將訊息處理器設為可連線。
      2. 確定路由器可連線。
  • 在單一路由器節點上:
    • 更新前,將無法連上路由器。
    • 更新完成後,請將路由器恢復連線。
  • 在單一訊息處理器節點上:
    • 更新前,請讓訊息處理器無法存取。
    • 更新完成後,請讓訊息處理器可連上。

使用無訊息設定檔

您必須將無訊息設定檔傳送至更新指令。靜音設定檔應該與用來安裝 Edge 4.17.0x 的檔案相同。

在具備外部網際網路連線的節點上,更新至 4.18.01 的程序

請使用以下程序更新節點上的 Edge 元件:

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

    如果您使用了網路儲存空間,就不必安裝新的節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」一節。
  2. 如有的話,請停用所有設定在 Cassandra 上執行修復作業的 CRON 工作,直到更新完成為止。
  3. 以根層級登入節點即可安裝 Edge RPM。
    注意:雖然 RPM 安裝需要 Root 存取權,但您可以在沒有 Root 存取權的情況下執行 Edge 設定。
  4. 安裝 yum-utilsyum-plugin-priorities
    > sudo yum install yum-utils
    > sudo yum install yum-plugin-priorities
  5. 按照安裝 Edge apigee-setup 公用程式的說明,停用 SELinux。
  6. 如果您是在 Oracle 7.x 上安裝,請執行下列指令:
    > sudo-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.01 bootstrap_4.18.01.sh 檔案下載至 /tmp/bootstrap_4.18.01.sh
    > curl https://software.apigee.com/bootstrap_4.18.01.sh -o -o /tmp/bootstrap_4.18.18.18.18.01
  9. 安裝 Edge 4.18.01 apigee-service 公用程式和依附元件:
    > sudo bash /tmp/bootstrap_4.18.01.sh apigeeuser=uName apigeepassword=pWord

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

    根據預設,安裝程式會檢查您是否已安裝 Java 1.8。如果沒有,系統會為您安裝。使用「JAVA_FIX」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 更新
  11. 更新管理伺服器的 apigee-validate 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-validate 更新
  12. 更新 apigee-provision 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-provision 更新
  13. 按照下方「機器更新順序」中的順序執行節點的更新公用程式:
    > /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile

    設定檔的唯一規定是設定檔必須可供「apigee」使用者存取或讀取。

    使用「-c」選項指定要更新的元件。可能的元件清單包括:
    ldap = OpenLDAP
    cs = Cassandra
    zk = Zookeeper
    qpid = qpidd
    ps = postgresql
    edge =All Edge 元件 除了 Edge UI、QPID Server、Postgres





  14. 按照「測試安裝」一文的說明,在管理伺服器上執行 apigee-validate 公用程式來測試更新。
  15. 如果您安裝了新的 Postgres 待命節點,請按照上方停用 Postgres 節點一節的說明停用節點。

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

如要稍後再復原更新,請按照 4.18.01 復原程序中所述的程序操作。

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

如果 Edge 節點受到防火牆保護,或以其他方式禁止透過網際網路存取 Apigee 存放區,您可以從 Apigee 存放區的本機存放區或鏡像執行更新。

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

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

如要從本機 4.18.01 存放區更新,請按照下列步驟操作:

  1. 如果您目前使用 Postgres 主要執行個體待命複製,請按照安裝新的 Postgres 待命節點一節所述,安裝新的 Postgres 待命節點。

    如果您使用了網路儲存空間,就不必安裝新的節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」一節。
  2. 按照安裝 Edge apigee-setup 公用程式,按照「建立本機 Apigee 存放區」的說明建立本機 4.18.01 存放區。
    注意事項:如果您目前已有 4.17.0x 存放區,可按照安裝 Edge apigee-setup 公用程式中的「更新本機 Apigee 存放區」所述,新增 4.18.01 存放區。
  3. 如要從 .tar 檔案安裝 apigee-service
    1. 在本機存放區的節點上,使用下列指令將本機存放區封裝至名為 /opt/apigee/data/apigee-mirror/apigee-4.18.01.tar.gz 中的單一.tar 檔案:
      /opt/apigee/data/apigee-mirror/apigee-4.18.01.tar.gz
    2. 將 .tar 檔案複製到您要更新 Edge 的節點。例如,將其複製到新節點上的 /tmp 目錄。
    3. 在新節點上,解壓縮檔案至 /tmp 目錄:
      > tar -xzf apigee-4.18.01.tar.gz

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

      請注意,你在這個指令中會包含存放區目錄的路徑。
  4. 如要使用 Nginx 網路伺服器安裝 apigee-service:
    1. 按照安裝 Edge apigee-setup 公用程式,按照「使用 Nginx 網路伺服器從存放區安裝」的說明設定 Nginx 網路伺服器。
    2. 在遠端節點上,下載 /tmp/bootstrap_4.18.01.sh 的 Edge bootstrap_4.18.01.sh 檔案到 /tmp/bootstrap_4.18.01.sh:
      > /usr/bin/curl http://uName:pWord@uName:

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

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

    設定檔的唯一規定是設定檔必須可供「apigee」使用者存取或讀取。

    使用「-c」選項指定要更新的元件。可能的元件清單如下:
    ldap = OpenLDAP
    cs = Cassandra
    zk = Zookeeper
    qpid = qpidd
    ps = postgresql
    edge =All Edge 元件 除了 Edge UI、QPID Server、Postgres





  9. 按照「測試安裝」一文的說明,在管理伺服器上執行 apigee-validate 公用程式來測試更新。
  10. 如果您安裝了新的 Postgres 待命節點,請按照上方停用 Postgres 節點一節的說明停用節點。

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

如要稍後再復原更新,請按照 4.18.01 復原程序中所述的程序操作。

機器更新順序

在 Edge 安裝過程中更新機器的順序十分重要。更新時最重要的考量事項如下:

  • 您必須先更新所有 Cassandra 和 ZooKeeper 節點,才能更新任何其他節點。
  • 對於具有多個 Edge 元件 (管理伺服器、訊息處理器、路由器、QPID 伺服器,而非 Postgres 伺服器) 的任何機器,請使用「-c 邊緣」選項一次更新所有項目。
  • 如果步驟指定應在多部機器上執行,請按照指定的機器順序執行該步驟。
  • 你不需另外完成不同的步驟就能更新營利設定。如果您指定「-c Edge」選項,則會更新這個欄位。

適用於 1 主機的獨立安裝作業

  1. 如果您是從 4.17.01 版更新,且已啟用 Edge 上的 SMTP,請在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 更新 Cassandra 和 ZooKeeper:
    >> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  3. 更新 Qpid:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  4. 更新 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  5. 停止 Postgres Server、Qpid 伺服器和 PostgreSQL:
    > /opt/apigee/apigee-service/bin/apigee-service Edge-postgres-server stop
    > /opt/apigee/apigee-service/bin/apigee-serviceedge-qpid-server stop
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgre stop
  6. 更新 postgresql:
    > /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
  7. 更新 Postgres 資料庫:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade
  8. 更新其餘 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -cedge -f configFile
  9. 更新 Edge UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile

適用於 2 主機的獨立安裝作業

如需邊緣拓撲和節點編號的清單,請參閱安裝拓撲

  1. 如果您是從 4.17.01 版更新,且已啟用 Edge 上的 SMTP,請在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 在機器 1 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  3. 更新機器 2 上的 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 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -cedge -f configFile
  6. 更新機器 1 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  7. 在機器 2 上更新 postgresql:
    1. Stop Postgres Server、Qpid Server 和 postgresql:
      > /opt/apigee/apigee-service/bin/apigee-service Edge-postgres-server stop
      > /opt/apigee/apigee-service/bin/apigee-serviceedge-qpid-server stop
      > /opt/apigee/apigee-service/apigee-post-post-post
    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 -cedge -f configFile

5 主機叢集安裝作業

如需邊緣拓撲和節點編號的清單,請參閱安裝拓撲

  1. 如果您是從 4.17.01 版更新,且已啟用 Edge 上的 SMTP,請在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 確認已安裝新的 Postgres 待命節點 (如安裝新的 Postgres 待命節點) 中所述。

    如果您使用了網路儲存空間,就不必安裝新的節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」一節。
  3. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 在機器 4 和 5 上更新 Qpid:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  5. 更新機器 1 上的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  6. 更新機器 1、2、3 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -cedge -f configFile
  7. 更新機器 1 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  8. ??更新機器 4 和 5:
    1. 在機器 4 上停止 Postgres 伺服器和 Qpid 伺服器:
      > /opt/apigee/apigee-service/bin/apigee-service Edge-postgres-server stop
      > /opt/apigee/apigee-service/bin/apigee-serviceedge-qpid-server stop
    2. 停止 Postgres 伺服器、Qpid 伺服器和機器上的 postgresql 5:
      > /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
    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-serviceedge-qpid-server start
    8. 在機器上執行下列指令,將 Postgres 設為待命節點 5:
      > cd /opt/apigee/data/apigee-postgresql/pgdata
      > rm -rf *
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standbyFile-f
    9. 在兩個伺服器上發出下列指令碼,驗證複製狀態。系統應在兩台伺服器上顯示相同的結果,確保複製成功:

      在機器 4,主要節點上執行:
      > /opt/apigee/apigee/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 上的 Edge 元件,5:
    > /opt/apigee/apigee-setup/bin/update.sh -cedge -f configFile
  10. 按照停用 Postgres 節點中的程序,務必停用新的待命節點。

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

9 主機叢集安裝作業

如需邊緣拓撲和節點編號的清單,請參閱安裝拓撲

  1. 如果您是從 4.17.01 版更新,且已啟用 Edge 上的 SMTP,請在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 確認已安裝新的 Postgres 待命節點 (如安裝新的 Postgres 待命節點) 中所述。

    如果您使用了網路儲存空間,就不必安裝新的節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」一節。
  3. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 在機器 6 和 7 上更新 Qpid:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  5. 更新機器 1 上的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  6. 依序更新機器 6、7、1、4 和 5 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile
  7. 更新機器 1 上的 UI:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile?
  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. 在機器上執行下列指令,將 Postgres 設為待命節點 9:
      > cd /opt/apigee/data/apigee-postgresql/pgdata
      > rm -rf *
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby File-f
    11. 在兩個伺服器上發出下列指令碼,驗證複製狀態。系統應在兩台伺服器上顯示相同的結果,確保複製成功:
      在機器 8 中,執行:
      > /opt/apigee/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 -cedge -f configFile
  10. 按照停用 Postgres 節點中的程序,務必停用新的待命節點。

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

13 主機叢集安裝作業

如需邊緣拓撲和節點編號的清單,請參閱安裝拓撲

  1. 如果您是從 4.17.01 版更新,且已啟用 Edge 上的 SMTP,請在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 確認已安裝新的 Postgres 待命節點 (如安裝新的 Postgres 待命節點) 中所述。

    如果您使用了網路儲存空間,就不必安裝新的節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」一節。
  3. 在機器 1、2 和 3 上更新 Cassandra 和 ZooKeeper:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 在機器 12 和 13 上更新 Qpid:
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  5. 在機器 4 和 5 上更新 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  6. 依序更新機器 12、13、6、7、10 和 11 上的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile
  7. 更新機器 6 和 7 上的使用者介面:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile?
  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. 在機器上執行下列指令,將 Postgres 設為待命節點 9:
      > cd /opt/apigee/data/apigee-postgresql/pgdata
      > rm -rf *
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby File-f
    11. 在兩個伺服器上發出下列指令碼,驗證複製狀態。系統應在兩台伺服器上顯示相同的結果,確保複製成功:
      在機器 8 中,執行:
      > /opt/apigee/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 -cedge -f configFile?
  10. 按照停用 Postgres 節點中的程序,務必停用新的待命節點。

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

12 主機叢集安裝作業

如需邊緣拓撲和節點編號的清單,請參閱安裝拓撲

  1. 如果您是從 4.17.01 版更新,且已啟用 Edge 上的 SMTP,請在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 確認已安裝新的 Postgres 待命節點 (如安裝新的 Postgres 待命節點) 中所述。

    如果您使用了網路儲存空間,就不必安裝新的節點。請改為擷取 Postgres 所用資料儲存庫的網路快照。詳情請參閱「必須升級至 Postgres 9.6」一節。
  3. 更新 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
  4. 更新 qpidd 的值:
    1. 資料中心 4、5 在資料中心 1
      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。
  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 和資料中心 2 中更新機器 6:
    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-serviceedge-qpid-server start
    10. 在機器 12 上執行下列指令,將 Postgres 設為待命節點 12:
      > cd /opt/apigee/data/apigee-postgresql/pgdata
      > rm -rf *
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresqlconfigFile
    11. 在兩個伺服器上發出下列指令碼,驗證複製狀態。系統應在兩台伺服器上顯示相同的結果,確保成功複製:
      在機器 6,主要節點上執行:
      > /opt/apigee/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 -cedge -f configFile
  10. 按照停用 Postgres 節點中的程序,務必停用新的待命節點。

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

適用於 7 主機 API BaaS 安裝作業

  1. 在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 在機器 5、6 和 7 上更新 Cassandra:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  3. 在機器 1、2 及 3 上更新 ElasticSearch 和 API BaaS 堆疊:
    > /opt/apigee/apigee-setup/bin/update.sh -c e,b -f configFile

  4. 更新機器 4 上的 API BaaS 入口網站:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile

為 10 個主機 API BaaS 安裝

  1. 在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 在機器 8、9 和 10 上更新 Cassandra:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  3. 在機器 1、2 和 3 上更新 ElasticSearch:
    > /opt/apigee/apigee-setup/bin/update.sh -c e -f configFile
  4. 在機器 4、5 和 6 上更新 API BaaS 堆疊:
    > /opt/apigee/apigee-setup/bin/update.sh -c b b -f configFile
  5. 在機器 7 上更新 API BaaS 入口網站:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile

針對兩個資料中心 API 裸機安裝

如要進行這項程序,您必須更新兩個資料中心中的 Cassandra 節點。如果與 Edge 共用這些 Cassandra 節點,通常會在更新 Edge 的過程中更新這些節點。

  1. 在設定檔中設定 SMTPFROMFROM。這個參數的格式如下:
    SMTP FROM="我的公司 <myco@company.com>"
  2. 使用正確的複製係數來更新兩個資料中心的 Cassandra 索引鍵空間。您在任一資料中心的任何 Cassandra 伺服器上只需執行這個步驟一次:

    注意:以下所有指令均將複製係數設為「3」,代表叢集中的三個 Cassandra 節點。視需要修改安裝值。
    1. 啟動 Cassandra cqlsh 公用程式:
      > /opt/apigee/apigee-cassandra/bin/cqlsh cassandraIP
    2. 請在「cqlsh>」提示中執行下列 CQL 指令,以便設定 Cassandra 金鑰空間的複製層級:
      1. cqlsh> ALTER KEYSPACE "Apigee_Baas_dc_1" WITH 複製作業 = { 'class': 'NetworkTopologyStrategy', 'dc-1': '3','dc-2': '3' };
      2. cqlsh> ALTER KEYSPACE "Apigee_Baas" 具有複製功能 = { 'class': 'NetworkTopologyStrategy', 'dc-1': '3','dc-2': '3' };
      3. cqlsh> ALTER KEYSPACE "Apigee_Baas_Locks" WITH 複製作業 = { 'class': 'NetworkTopologyStrategy', 'dc-1': '3','dc-2': '3' };
      4. cqlsh> ALTER KEYSPACE "system_traces" WITH 複製功能 = { 'class': 'NetworkTopologyStrategy', 'dc-1': '3','dc-2': '3' };
      5. cqlsh> ALTER KEYSPACE "Apigee_Baas_dc_2" WITH 複製作業 = { 'class': 'NetworkTopologyStrategy', 'dc-1': '3','dc-2': '3' };
      6. 使用下列指令查看索引鍵空間:
        cqlsh> select * from system.schema_keyspaces;
      7. 結束 cqlsh:
        cqlsh> 結束
  3. (只有在更新 Edge 時未更新 Cassandra 時) 更新資料中心 1 中的 Cassandra 節點,一次一個機器:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  4. (只有在更新 Edge 時沒有更新 Cassandra 時) 一次更新資料中心 2 中的 Cassandra 節點:
    > /opt/apigee/apigee/setup/bin/update.sh -c cs -f configFile
  5. 一次更新在資料中心 1 部機器上的 ElasticSearch:
    > /opt/apigee/apigee-setup/bin/update.sh -c e -f configFile
  6. 一次更新一部機器 2 部機器上的 ElasticSearch:
    > /opt/apigee/apigee-setup/bin/update.sh -c e -f configFile
  7. 逐一更新位於資料中心 1 的機器上的 API BaaS 堆疊:
    > /opt/apigee/apigee-setup/bin/update.sh -c b b -f configFile
  8. 一次更新資料中心 2 部機器上的 API BaaS 堆疊:
    > /opt/apigee/apigee-setup/bin/update.sh -c b b -f configFile
  9. 逐一更新位於資料中心 1 的機器上的 API BaaS 入口網站:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile
  10. 逐一更新位於資料中心 2 的機器上的 API BaaS 入口網站:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile
  11. 更新 BaaS 鍵值。您必須在安裝時設定這些索引鍵空間以進行複製,但不必在執行階段。移除複製作業也會節省 Cassandra 記憶體。

    您只能在任一資料中心的任何 Cassandra 伺服器上執行這個步驟一次:
    1. 啟動 Cassandra cqlsh 公用程式:
      > /opt/apigee/apigee-cassandra/bin/cqlsh cassandraIP
    2. 執行下列 CQL 指令,設定 Cassandra 索引鍵空間的複製層級:
      1. cqlsh> ALTER KEYSPACE "Apigee_Baas_dc_1" WITH 複製作業 = { 'class': 'NetworkTopologyStrategy', 'dc-1': '3' };
      2. cqlsh> ALTER KEYSPACE "Apigee_Baas_dc_2" WITH 複製作業 = { 'class': 'NetworkTopologyStrategy', 'dc-2': '3' };
      3. 使用下列指令查看索引鍵空間:
        cqlsh> select * from system.schema_keyspaces;
      4. 結束 cqlsh:
        cqlsh> 結束

非標準安裝

如果不是標準安裝,請按照下列順序更新 Edge 元件:

  1. ZooKeeper
  2. Cassandra
  3. qpidd、ps
  4. LDAP
  5. 邊緣,意指所有節點上的「-c 邊緣」設定檔,順序如下:包含 Qpid 伺服器的節點、Postgres 伺服器、管理伺服器、訊息處理器以及路由器。
    注意:如果節點同時安裝 Qpid 伺服器和 Postgres 伺服器,請執行「-c Edge」設定檔步驟。
  6. Edge UI
將 Apigee Edge 4.17.01/4.17.05 更新至 4.17.09