測試安裝結果

Edge for Private Cloud 4.17.05 版

Apigee 提供測試指令碼,可用來驗證安裝作業。

執行驗證測試

驗證測試程序的每個步驟都會傳回 HTTP 20X 回應代碼,表示測試成功。

如何執行測試指令碼:

  1. 在管理伺服器節點上安裝 apigee-validate:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-validate install
  2. 在管理伺服器節點上執行設定指令,叫用測試指令碼:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-validate setup -f configFile

    configFile 檔案必須包含下列屬性:
    APIGEE_ADMINPW=sysAdminPword

    如省略,系統會提示您輸入密碼。

    根據預設,apigee-validate 公用程式會在路由器上建立使用通訊埠 59001 的虛擬主機。如果路由器未開啟該通訊埠,您可以在設定檔中加入 VHOST_PORT 屬性來設定通訊埠。例如:
    VHOST_PORT=9000
  3. 接著,指令碼會執行下列動作:
    • 建立組織並與 Pod 建立關聯。
    • 建立環境,並將訊息處理器與環境建立關聯。
    • 建立虛擬主機。
    • 匯入簡易健康狀態檢查 Proxy,並將應用程式部署至「測試」環境。
    • 匯入 SmartDocs Proxy。
    • 執行測試,確保一切運作正常。

如果測試成功,系統會傳回 20X HTTP 回應。

如要移除測試指令碼建立的組織、環境和其他構件,請按照下列步驟操作:

  1. 執行下列指令:
    > /opt/apigee/apigee-service/bin/apigee-service apigee-validate clean -f configFile

    其中 configFile 是您用來執行測試的檔案。

    注意:如果測試和疑難排解方法發生錯誤,請與 Apigee 支援團隊聯絡,並提供錯誤記錄。

驗證 Pod 安裝

安裝 Apigee Analytics 後,建議您執行下列基本但重要的驗證:

  1. 確認管理伺服器位於中央 POD。在管理伺服器上執行下列 CURL 指令:
    > curl -u sysAdminEmail:password http://localhost:8080/v1/servers?pod=central

    您應該會看到以下格式的輸出內容:
    [ {
    "internalIP" : "192.168.1.11",
    "isUp" : true,
    "pod" : "central",
    "reachable" : true,
    "region" : "dc-1",
    "tags" : {
    "property" : [ ]
    },
    "type" : [ "application-datastore", "scheduler-datastore", "management-server", "auth-datastore", "apimodel-datastore", "user-settings
    datastore", "audit-datastore" ],
    "uUID" : "d4bc87c6-2baf-4575-98aa-88c37b260469"
    }, {
    "externalHostName" : "localhost",
    "externalIP" : "192.168.1.11",
    "internalHostName" : "localhost",
    "internalIP" : "192.168.1.11",
    "isUp" : true,
    "pod" : "central",
    "reachable" : true,
    "region" : "dc-1",
    "tags" : {
    "property" : [ {
    "name" : "started.at",
    "value" : "1454691312854"
    }, ... ]
    },
    "type" : [ "qpid-server" ],
    "uUID" : "9681202c-8c6e-4da1-b59b-23e3ef092f34"
    } ]
  2. 確認路由器和訊息處理器位於閘道 POD 中。在管理伺服器上執行下列 CURL 指令:
    > curl -u sysAdminEmail:password http://localhost:8080/v1/servers?pod=gateway

    您會看到與中央 Pod 類似的輸出內容,但適用於路由器和訊息處理器。
  3. 確認 Postgres 位於數據分析 Pod 中。在管理伺服器上執行下列 CURL 指令:
    > curl -u sysAdminEmail:password http://localhost:8080/v1/servers?pod=analytics

    您會看到類似中央 Pod 的輸出內容,但適用於 Postgres。