為機構註冊

Edge for Private Cloud 4.18.05 版

使用 setup-org 指令碼執行新手上路程序。您必須在管理伺服器節點上執行指令碼。

如要將機構加入平台,請按照下列步驟操作:

  1. 在管理伺服器節點上安裝 apigee-provision:
    /opt/apigee/apigee-service/bin/apigee-service apigee-provision install
  2. 在管理伺服器節點上執行 setup-org 指令碼:
    /opt/apigee/apigee-service/bin/apigee-service apigee-provision setup-org -f configFile

    設定檔必須可由「apigee」使用者讀取。如需設定檔範例,請參閱「新手上路設定檔」。

  3. 確認您已成功將組織加入。其中一種方法是在瀏覽器中要求下列網址,登入 UI:
    http://IP_address:9000/login

    其中 IP_address 是安裝 Edge UI 的伺服器 IP 位址。

    如需其他驗證步驟,請參閱「驗證新手上路程序」。

  4. 建立第一個 Proxy!

新手上路設定檔

如要使用 setup-org 指令碼執行靜默設定,請透過 -f 選項傳遞設定檔,如以下範例所示:

/opt/apigee/apigee-service/bin/apigee-service apigee-provision setup-org -f configFile

本節提供範例設定檔,說明如何使用 setup-org 註冊機構。

在組織的新手上路階段,setup-org 指令碼會執行下列操作:

  • 建立新組織。
  • 建立環境。
  • 為環境建立虛擬主機。
  • 將指定使用者設為組織管理員。請注意:
    • 您可以使用現有使用者,或為組織管理員建立新使用者。
    • 機構管理員不得與系統管理員相同。
  • 將組織與「閘道」Pod 建立關聯。(這是預設值,無法變更)。
  • 將環境與所有訊息處理器建立關聯。
  • 啟用數據分析。

複製下列範例,並視需要編輯,為貴組織設定這項功能:

IP1=192.168.1.1

# Specify the IP or DNS name of the Management Server.
MSIP="$IP1"

# Specify the Edge sys admin credentials.
ADMIN_EMAIL="admin@email.com"
APIGEE_ADMINPW=admin_password  # If omitted, you are prompted for it.

# Specify organization name.
ORG_NAME=myorg  # lowercase only, no spaces, underscores, or periods.

# Specify the organization administrator user.
# Either specify an existing user, or specify the information
# necessary to create a new user.
# Do not use the sys admin as the organization administrator.
#
# Create a new user for the organization administrator.
NEW_USER="y"
# New user information if NEW_USER="y".
USER_NAME=new@user.com
FIRST_NAME=new
LAST_NAME=user
# Org admin password must be at least 8 characters long and contain one uppercase
# letter, one lowercase letter, and one digit or special character
USER_PWD="newUserPword"
ORG_ADMIN=new@user.com
#
# Or, specify an existing user as the organization admin,
# omit USER_NAME, FIRST_NAME, LAST_NAME, USER_PWD.
# NEW_USER="n"
# ORG_ADMIN=existing@user.com

# Specify environment name.
ENV_NAME=prod  # lowercase only

# Specify virtual host information.
VHOST_PORT=9001
VHOST_NAME=default

# If you have a DNS entry for the virtual host.
VHOST_ALIAS=myorg-test.apigee.net

# If you do not have a DNS entry for the virtual host,
# specify the IP and port of each router as a space-separated list:
# VHOST_ALIAS="firstRouterIP:9001 secondRouterIP:9001"

# Optionally configure TLS/SSL for virtual host.
# VHOST_SSL=y     # Set to "y" to enable TLS/SSL on the virtual host.
# KEYSTORE_JAR=   # JAR file containing the cert and private key.
# KEYSTORE_NAME=  # Name of the keystore.
# KEYSTORE_ALIAS= # The key alias.
# KEY_PASSWORD=   # The key password, if it has one.

# Specify the analytics group.
# AXGROUP=axgroup-001 # Default name is axgroup-001.

注意事項:

  • 如果是 VHOST_ALIAS,且您已有用於存取虛擬主機的 DNS 記錄,請指定主機別名和通訊埠 (選用),例如「myapi.example.com」。如果您還沒有 DNS 記錄,可以使用路由器的 IP 位址。

    如要進一步瞭解如何設定虛擬主機,請參閱「設定虛擬主機」。

  • 如要瞭解 TLS/SSL 設定,請參閱「KeyStore 和 TrustStore」和「設定私有雲 API 的 TLS 存取權」,進一步瞭解如何建立 JAR 檔案,以及設定 TLS/SSL 的其他方面。
  • 如要進一步瞭解如何設定虛擬主機,請參閱「設定私有雲 API 的 TLS 存取權」。
  • 您無法建立兩個名稱相同的組織。在這種情況下,第二次建立作業會失敗。

如要進一步瞭解如何使用 Management API 將組織納入管理,請參閱「建立組織、環境和虛擬主機」。

驗證新手上路流程

完成新手上路程序後,請在管理伺服器節點上發出下列 CURL 指令,驗證系統狀態:

  1. 執行下列指令,檢查管理伺服器上的使用者和組織狀態:
    curl -u adminEmail:admin_passwd http://localhost:8080/v1/users
    curl -u adminEmail:admin_passwd http://localhost:8080/v1/organizations
    curl -u adminEmail:admin_passwd http://localhost:8080/v1/organizations/org_name/deployments
  2. 執行下列指令,查看數據分析:
    curl -u adminEmail:admin_password http://localhost:8080/v1/organizations/org_name/environments/env_name/provisioning/axstatus
  3. 在節點 2 執行下列指令,檢查 PostgreSQL 資料庫狀態 (如安裝拓撲所示):
    psql -h /opt/apigee/var/run/apigee-postgresql -U apigee apigee

    在命令提示字元中輸入下列指令,查看貴組織的數據分析資料表:

    \d analytics."org_name.env_name.fact"

    使用下列指令退出 psql:

    \q
  4. 使用網路瀏覽器存取 Apigee Edge UI。請注意,您在安裝結束時已記下管理控制台網址。
    1. 啟動偏好的瀏覽器,然後輸入 Edge UI 的網址。畫面會與下方類似,其中 IP 位址是節點 1 (如安裝拓撲所示),或您安裝 UI 的任何節點 (用於替代設定):
      http://192.168.56.111:9000/login

      9000 是 UI 使用的通訊埠編號。

      如果您直接在託管 Edge UI 的伺服器上啟動瀏覽器,則可以使用以下格式的網址:

      http://localhost:9000/login
    2. 在控制台登入頁面中,指定 Apigee 系統管理員使用者名稱/密碼。
  5. 註冊新的 Apigee 新使用者帳戶,並使用新的使用者憑證登入。在控制台登入頁面中,按一下「Sign In」(登入) 按鈕。

    瀏覽器會重新導向至 http://192.168.56.111:9000/platform/#/org_name/,並開啟資訊主頁,讓您設定建立的組織 (如果您使用 Apigee 管理員憑證登入)。

建立第一個 Proxy

新組織完成新手上路程序,且您確認程序成功後,即可建立第一個 Proxy。詳情請參閱「建構第一個 API Proxy」。

其他實用資源包括: