將 Apigee Edge 4.16.09 更新至 4.18.01

私有雲 4.18.01 版本

哪些 Edge 版本可更新至 4.18.01

您可以將這個程序更新 Apigee Edge 4.16.09.0x 至 4.18.01 版。

如果您使用的是 Edge 4.16.01 之前的版本,必須先遷移至 4.16.01.x 版,然後更新為 4.18.01 版。

誰可執行更新

執行更新的使用者應和最初安裝 Edge 的使用者,或以超級使用者的身分執行的使用者。

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

您必須更新哪些元件

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

必須升級至 Qpid 1.35

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

  • 暫時停用 Qpid 節點上的通訊埠 5672,藉此防止路由器和訊息處理器寫入 Qpid 節點。您可以使用下列指令在 Qpid 節點上封鎖這個通訊埠:
    > sudo iptables -A INPUT -p tcp --destination-port 5672 !-s 「主機名稱」-i eth0 -j DROP
  • 等候 Qpid 佇列留空,確保 Qpid 節點在更新前已處理所有訊息。使用下列指令來確保 Qpid 訊息佇列中沒有任何內容:
    > qpid-stat -q
  • 更新 Qpid 節點。
  • 解除封鎖 Qpid 節點上的通訊埠 5672,以允許存取路由器和訊息處理器。 您可以使用下列指令來解除封鎖這個通訊埠:
    > sudo iptables -F

    請注意,如果您將其他 IP 位址用於其他規則,可以使用 -D 選項撤銷特定變更:
    > sudo iptables -D INPUT -p tcp --destination-port 5672 !-s 「主機名稱」-i eth0 -j DROP

下文將詳細說明每個 Edge 拓撲。

必須升級至 Postgres 9.6

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

在更新過程中,Postgres 節點處於待更新狀態時,數據分析資料仍會寫入 Qpid 節點。更新 Postgres 節點並連上網際網路後,數據分析資料會推送至 Postgres 節點。

如果因任何理由必須復原更新,您必須使用額外的 Postgres 待命節點。如果您必須復原更新,新的 Postgres 待命節點會在復原完成後成為主要 Postgres 節點。因此,當您安裝新的 Postgres 待命節點時,應位於符合 Postgres 伺服器所有硬體需求的節點上 (如 Edge 安裝要求的定義)。

安裝新的 Postgres 待命節點

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

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

如何建立新的 Postgres 待命節點:

  1. 在目前的 Postgres 主要執行個體上,編輯 /opt/apigee/customer/application/postgresql.properties 檔案,設定下列權杖。如果該檔案不存在,請建立這個檔案:

    conf_pg_hba_replication.connection=host 複製 Apigee existing_slave_ip/32Trust\ \n 主機複製 Apigee new_slave_ip/32trust

    其中「existing_slave_ip」是目前 Postgres 待命 IP 位址,
  2. 在 Postgres 主要執行個體上重新啟動 apigee-postgresql
    > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restart
  3. 查看主要執行個體的 /opt/apigee/apigee-postgresql/conf/pg_hba.conf 檔案,確認是否已新增新的待命節點。您應該會在該檔案中看到下列幾行內容:
    主機複製 Apigee existing_slave_ip/32 信任
    主機複製 Apigee new_slave_ip/32 信任項目
  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.09.sh 檔案下載至 /tmp/bootstrap_4.16.09.sh
      > curl https://software.apigee.com/bootstrap_4.16.09.sh -o /tmp/bootstrap_4.16.09.sh
    4. 安裝 Edge apigee-service 公用程式和依附元件:
      > sudo bash /tmp/bootstrap_4.16.09.sh apigeeuser=uName apigeepassword=pWord
    5. 透過 apigee-service 安裝 apigee-setup 公用程式:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-setup 安裝
    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 為 5,「a-9」 - 49:4": "a-9": "a" "a" "4", "-" "a" """"

  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 複製 Apigee existing_slave_ip/32 信任
  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. 如要從 ZooKeeper 刪除待命節點的 UUID,請在管理伺服器節點進行下列 Edge Management API 呼叫:
    > curl -u sysAdminEmail:password -X DELETE http://<ms_IP>:8080/v1/servers/<new_slave_uuid>

必須啟用 EPEL 存放區

您必須啟用「Enterprise Linux (或 EPEL)」的額外套件,才能安裝或更新 Edge。您使用的指令取決於 RedHat/CentOS 版本:

  • 如為 RedHat/CentOS/Oracle 7.x:
    > wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; rpm -ivh epel-release-latest-7.nopm.rpm
  • 如為 RedHat/CentOS/Oracle 6.x:
    wget https://dl.fedoraproject.org/pub/epel/epel-e------較延遲.rpm; rpm -ivh epel-release-latest-6.noarch.rpm

需要新增 SMTPSMTPFROM 設定參數

啟用 SMTP 伺服器時,Edge 4.17.05 新增了設定檔的必要參數。如果您是從 4.17.01 版更新,則必須在啟用 SMTP 伺服器時在設定檔中設定 SMTPSMTPFROM

API BaaS 4.17.09 版已新增對 SMTPSMTPFROM 屬性的支援。 更新 API BaaS 時,您必須在設定檔中設定 SMTPSMTPFROM

這個參數的格式如下:

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

使用外部驗證時更新

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

詳情請參閱「外部驗證設定」。

啟用外部驗證功能時,多數客戶會使用 Active Directory SAM 帳戶名稱欄位進行驗證,而不是 Edge OpenLDAP 伺服器使用的電子郵件地址。

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

IS_EXTERNAL_AUTH="true"

這一行會設定 Edge 以支援帳戶名稱,而非電子郵件地址。

資源設定自動傳播

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

更新必備條件

升級 Apigee Edge 前,請遵守下列先決條件:

  • 備份所有節點
    基於安全考量,建議您先更新所有節點的完整備份。使用目前版本的 Edge 程序執行備份作業。

    這方便您建立備份方案,以防新版本更新無法正常運作。如要進一步瞭解備份,請參閱備份與還原一文。
  • 確保 Edge 正在執行
    使用下列指令,確保更新程序在更新期間必須執行:

    > /opt/apigee/apigee-service/bin/apigee-all 狀態

處理失敗的更新

如果更新失敗,您可以嘗試修正問題,然後再次執行 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. 確保路由器可供連線。
  • 單一路由器節點:
    • 更新前,請先連上路由器。
    • 更新完成後,即可連線至路由器。
  • 單一訊息處理器節點:
    • 更新前,請先與「訊息處理者」聯絡。
    • 更新完成後,即可開啟訊息處理工具。

使用靜音設定檔

您必須將靜音設定檔傳遞至 update 指令。靜音設定檔應與用於安裝 Edge 4.16.09 的設定檔相同。

在搭載外部網際網路連線的節點上更新至 4.18.01 的程序

如要更新節點的 Edge 元件,請按照下列程序操作:

  1. 如果您目前使用 Postgres 主版本複製功能,請安裝上述的 Postgres 待命節點,如上文所述,請參閱安裝新的 Postgres 待命節點
  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. 啟用上述的 EPEL 存放區。
  7. 如要在 Oracle 7.x 上安裝,請執行下列指令:
    > sudo yum-config-manager --enable ol7_OPTIONAL_latest
  8. 如要安裝在 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
  9. 下載 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 /tmp/bootstrap_4.18.01.sh
  10. 安裝 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 安裝。JAVA_FIX 採用下列值:

    I = 安裝 OpenJDK 1.8 (預設)
    C = 繼續,不安裝 Java
    Q = 退出。如要使用這個選項,您必須自行安裝 Java。
  11. 使用 apigee-service 更新 apigee-setup 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-setup 更新
  12. 更新管理伺服器中的 apigee-validate 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-validate 更新
  13. 更新 apigee-provision 公用程式:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-provision 更新
  14. 請根據下方「機器順序更新」一節的說明在節點上執行更新公用程式:
    > /opt/apigee/apigee-setup/bin/update.sh -c 元件 -f configFile

    設定檔的唯一規定是,只有「Apigee」使用者可以存取或讀取設定檔。

    使用「-c」選項指定要更新的元件。提升提升提升提升網站處理網站處理網站處理網站處理製作製作製作製作製作製作製作製作製作製作通話通話通話通話通話通話通話通話通話通話通話通話通話通話通話美國伺服器使使使使影片提升提升影片提升網站提升影片提升影片中有影片使影片使影片可供影片運作運作運作通話運作這點











  15. 請按照「測試安裝作業」一節的說明,在管理伺服器執行 Apigee 驗證公用程式,藉此更新更新。
  16. 如果您安裝了新的 Postgres 待命節點,請按照上方「停用 Postgres 節點」一節的說明停用節點。

如要日後復原更新,請按照 4.18.01 復原程序中所述程序進行。

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

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

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

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

如何從本機 4.18.01 存放區更新:

  1. 如果您目前使用 Postgres 主版本複製功能,請按照上方「安裝新的 Postgres 待命節點」一節的說明安裝新的 Postgres 待命節點。
  2. 按照安裝 Edge Apigee-setup 公用程式中的「建立本機 Apigee 存放區」一節,建立本機 4.18.01 存放區。
    注意:如果您已有 4.16.09 存放區,可以按照「安裝 Edge Apigee 設定公用程式」的說明,新增 4.18.01 存放區至該存放區。
  3. 如要從 .tar 檔案安裝 apigee-service,請按照下列步驟操作:
    1. 在具有本機存放區的節點中,使用下列指令將本機存放區封裝至名為 /opt/apigee/data/apigee-鏡像/apigee-4 .18.01.tar.gz 的單一.tar 檔案:
      >
    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 公用程式」文章的說明,設定「ggxx 網路伺服器」一節的「使用 Nginx 網路伺服器從存放區安裝」一節。
    2. 在遠端節點上,將 Edge bootstrap_4.18.01.sh 檔案下載至 /tmp/bootstrap_4.18.01.sh:
      > /usr/bin/curl http://uName:pWord

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

  5. 透過 apigee-service 更新 Apigee 設定公用程式:
    > /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

    設定檔的唯一規定是,設定檔必須能讓使用者存取或讀取設定檔。

    使用「-c」選項指定要更新的元件。展示 和 有 成果 賽一律只要該計畫的情況











  9. 請按照「測試安裝作業」一節的說明,在管理伺服器執行 Apigee 驗證公用程式,藉此更新更新。
  10. 如果您安裝了新的 Postgres 待命節點,請按照上方「停用 Postgres 節點」一節的說明停用節點。

如要日後復原更新,請按照 4.18.01 復原程序中所述程序進行。

機器更新的順序

更新 Edge 邊緣機器的順序很重要。更新內容最重要的考量如下:

  • 您必須先更新所有 Cassandra 和 ZooKeeper 節點,才能更新其他節點。
  • 如有任何機器有多個邊緣元件 (管理伺服器、訊息處理器、路由器、QPID 伺服器,但而非 Postgres 伺服器),請使用「-c 邊緣」選項來同時更新所有元件。
  • 如果有步驟指定在多部機器上執行,請以指定的機器順序執行。
  • 更新營利管道沒有專屬步驟。只要指定「-c 邊緣」選項,系統就會更新這項設定。

一對一主機安裝

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

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

適用於雙人安裝的獨立安裝服務

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

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

    請持續檢查佇列,直到「msg」欄的計數為 0 為止。您必須先處理所有訊息,才能升級 Qpid。
  5. 更新機器 2 的 qpidd
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  6. 機器 2 的 Flush iptable:
    > sudo iptables -F
  7. 更新機器 1 的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c LDAP -f configFile
  8. 更新機器 1 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c 邊緣 -f configFile
  9. 更新機器 1 的使用者介面:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile?
  10. 更新機器 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
    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 邊緣 -f configFile

安裝 5 個主機叢集

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

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

    請持續檢查佇列,直到「msg」欄的計數為 0 為止。您必須先處理所有訊息,才能升級 Qpid。
  6. 更新機器 4 的 qpidd
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  7. 機器 4 的 Flush iptable:
    > sudo iptables -F
  8. 重複步驟 4 到 7。
  9. 更新機器 1 的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c LDAP -f configFile
  10. 更新機器 1、2、3 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c 邊緣 -f configFile
  11. 更新機器 1 的使用者介面:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  12. 更新機器 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/post-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-service Edge-qpid-server 啟動
    8. 執行下列指令,將 Postgres 設為待命節點:
      > cd /opt/apigee/data/apigee-postgresql/pgdata
      > rm -rf *
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup-replication-on-standby -f
      config
    9. 在兩個伺服器上發出下列指令碼,來確認複製狀態。系統應會在兩個伺服器上顯示相同的結果,以確保複製作業成功:

      在機器 4 上,主要節點會執行:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql post postgres-check-master

      驗證其是否為主要執行個體。

      在機器 5 中,待命節點:
      > /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql postgres-check-standby

      驗證其是待命。
  13. 更新機器 4、5 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile
  14. 請務必按照停用 Postgres 節點一節中的程序停用新待命節點。

9 主機叢集安裝

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

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

    請持續檢查佇列,直到「msg」欄的值為 0 為止。您必須先處理所有訊息,才能升級 Qpid。
  6. 更新機器 6 的 qpidd
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  7. 機器 6 的 ipush iptable:
    > sudo iptables -F
  8. 重複步驟 4 到 7。
  9. 更新機器 1 的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c LDAP -f configFile
  10. 以下列順序更新機器 6、7、1、4 和 5 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile
  11. 更新機器 1 的使用者介面:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  12. 更新機器 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 -f
    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

      確認其是待命。
  13. 更新機器 8 和 9 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile
  14. 請務必按照停用 Postgres 節點一節中的程序停用新待命節點。

安裝 13 個主機叢集

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

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

    請持續檢查佇列,直到「msg」欄的計數為 0 為止。您必須先處理所有訊息,才能升級 Qpid。
  6. 更新機器 12 的 qpidd
    > /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
  7. 機器 12 上的 Flush iptable:
    > sudo iptables -F
  8. 針對機器 13 重複步驟 4 到 7。
  9. 更新機器 4 和 5 的 LDAP:
    > /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
  10. 按照下列順序更新機器 12、13、6、7、10 和 11 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile
  11. 更新機器 6 和 7 的使用者介面:
    > /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
  12. 更新機器 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 -f
    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

      確認其是待命。
  13. 更新機器 8 和 9 的 Edge 元件:
    > /opt/apigee/apigee-setup/bin/update.sh -c Edge -f configFile?
  14. 請務必按照停用 Postgres 節點一節中的程序停用新待命節點。

安裝 12 個主機叢集

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

  1. 如果您已在 Edge 中啟用 SMTP,請在設定檔中設定 SMTPSMTPFROM。這個參數的格式如下:
    SMTPSMTPFROM="My Company <myco@company.com>"
  2. 確認您已安裝新的 Postgres 待命節點,如安裝新的 Postgres 待命節點一節所述。
  3. 更新 Cassandra 和 ZooKeeper:
    1. 資料中心 1 的機器 1、2 和 3:
      > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
    2. 資料中心 2、8 和 9 的資料中心 2
      > /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
  4. 更新 qpidd:
    1. 資料中心 1 中的 4,5 場
      1. 在機器 4 上設定下列 iptable 規則:
        > sudo iptables -A INPUT -p tcp --destination-port 5672 !-s 「主機名稱」-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 的 Flush iptable:
        > sudo iptables -F
      5. 針對機器 5 重複步驟 1 到 4。
    2. 機器 2 中的 10、11 機
      1. 在機器 10 上設定下列 iptable 規則:
        > sudo iptables -A INPUT -p tcp --destination-port 5672 !-s 「主機名稱」-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 上清除 iptable:
        > 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 邊緣 -f configFile
    2. 機器 2 中的機器 10、11、7、8、9
      > /opt/apigee/apigee-setup/bin/update.sh -c 邊緣 -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 停止
    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
    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 邊緣 -f configFile
  10. 請務必按照停用 Postgres 節點一節中的程序停用新待命節點。

7 主機 API BaaS 安裝服務

# For a single data center, specify the same value as BAAS_CASS_LOCALDC.
BAAS_CASS_DC_LIST="dc-1"

# Defines the initial contact points for members of the BaaS cluster. 
# Specify the IP address of no more than two Stack nodes. 
BAAS_CLUSTER_SEEDS="dc-1:$IP4,dc-1:$IP5"

# Specify the from address of generated emails.
SMTPMAILFROM="My Company <myco@company.com>"

如需完整的設定檔範例,請參閱 API BaaS 安裝

您必須確認所有 Stack 節點已開啟通訊埠 2551,才能存取所有其他 Stack 節點。

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

  1. 更新機器 5、6 和 7 的 Cassandra:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  2. 更新機器 1、2 和 3 的 ElasticSearch 和 API BaaS 堆疊:
    > /opt/apigee/apigee-setup/bin/update.sh -c e,b -f configFile

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

10 主機 API BaaS 安裝服務

# For a single data center, specify the same value as BAAS_CASS_LOCALDC.
BAAS_CASS_DC_LIST="dc-1"

# Defines the initial contact points for members of the BaaS cluster. 
# Specify the IP address of no more than two Stack nodes. 
BAAS_CLUSTER_SEEDS="dc-1:$IP4,dc-1:$IP5"

# Specify the from address of generated emails.
SMTPMAILFROM="My Company <myco@company.com>"

如需完整的設定檔範例,請參閱 API BaaS 安裝

您必須確認所有 Stack 節點已開啟通訊埠 2551,才能存取所有其他 Stack 節點。

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

  1. 更新機器 8、9 和 10 的 Cassandra:
    > /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
  2. 更新機器 1、2 和 3 的 ElasticSearch:
    > /opt/apigee/apigee-setup/bin/update.sh -c ec -f configFile
  3. 更新機器 4、5 和 6 的 API BaaS 堆疊:
    > /opt/apigee/apigee-setup/bin/update.sh -c b -f configFile
  4. 更新機器 7 的 API BaaS 入口網站:
    > /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile

適用於非標準安裝

如果您不採用標準安裝程序,請按照下列步驟更新 Edge 元件:

  1. ZooKeeper
  2. Cassandra
  3. qpidd、ps
  4. LDAP
  5. 邊緣,代表訂單中所有節點的「-c 邊緣」設定檔:具備 Qpid 伺服器、Postgres 伺服器、管理伺服器、訊息處理器和路由器的節點。
    注意:如果節點同時安裝 Qpid 伺服器和 Postgres 伺服器,請執行「-c Edge」設定檔步驟。
  6. Edge UI