不同的 sysadmin 憑證需要設定

Apigee Edge for Private Cloud 會在初始安裝期間建立系統管理員 (sysadmin) 使用者,並將該使用者的加密憑證儲存在 New Edge UI (edge-management-ui) 節點的設定檔中。新版 Edge UI 會使用這些儲存的憑證,驗證傳送至管理伺服器的後端要求。如果 sysadmin 使用者的密碼或電子郵件地址有所變更 (例如在外部 LDAP 中或重設密碼後),您必須更新儲存在新版 Edge UI 節點上的 sysadmin 憑證。

變更新版 Edge UI sysadmin 憑證

您可以使用下列任一方法,在 New Edge 使用者介面 (edge-management-ui) 更新儲存的系統管理員憑證:

  • 使用 ue 設定檔和靜默設定檔執行 apigee-setup 公用程式。
  • 使用 management-ui 二進位檔加密憑證,並在 /opt/apigee/customer/application/management-ui.properties 中設定 conf_uebe_mgmtCredential。

使用 apigee-setup 更新憑證

  1. 編輯您用來安裝新版 Edge UI 的靜音設定檔 (edge-management-ui),設定 sysadmin 和 SMTP 屬性:
    ADMIN_EMAIL=newUser
    APIGEE_ADMINPW=newPW
    SMTPHOST=smtp.gmail.com
    SMTPPORT=465
    SMTPUSER=foo@gmail.com
    SMTPPASSWORD=bar
    SMTPSSL=y
    SMTPMAILFROM="My Company <myco@company.com>"

    更新 sysadmin 憑證時,您必須加入 SMTP 屬性,因為 setup.sh 會重設自動設定檔中的所有新版 Edge UI 屬性。

  2. 在新 Edge UI 節點上,使用 ue 設定檔執行 apigee-setup 公用程式,更新 edge-management-ui 的憑證:
    /opt/apigee/apigee-setup/bin/setup.sh -p ue -f configFile

使用 management-ui.properties 更新憑證

  1. 在 New Edge UI 節點上,變更為 /opt/apigee/edge-management-ui 目錄,並使用 management-ui 二進位檔加密系統管理員使用者名稱和密碼:
    cd /opt/apigee/edge-management-ui && ./bin/management-ui --encrypt 'userName:PWord'
  2. 在編輯器中開啟 /opt/apigee/customer/application/management-ui.properties。如果檔案不存在,請建立檔案:
    vi /opt/apigee/customer/application/management-ui.properties
  3. 在 management-ui.properties 中,將 conf_uebe_mgmtCredential 權杖設為步驟 1 傳回的加密值:
    conf_uebe_mgmtCredential="STRING_RETURNED_IN_STEP_1"
  4. 將 management-ui.properties 的擁有者設為 apigee:apigee:
    chown apigee:apigee /opt/apigee/customer/application/management-ui.properties
  5. 設定並重新啟動 New Edge UI (edge-management-ui):
    /opt/apigee/apigee-service/bin/apigee-service edge-management-ui configure
    /opt/apigee/apigee-service/bin/apigee-service edge-management-ui restart

測試新版 Edge 使用者介面設定

  1. 在瀏覽器中透過通訊埠 3001 開啟新版 Edge UI:
    http://edge_UI_IP:3001/

    例如:

    http://192.168.52.100:3001/
  2. 使用更新後的 sysadmin 憑證登入。如果成功登入,即表示 New Edge UI 設定有效。

測試管理伺服器設定

執行下列 curl 指令,確認您可以存取管理伺服器上的中央 Pod:

curl -u sysAdminUser: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"
} ]