Edge 設定檔參考資料

以下是 9 個節點 Edge 安裝作業的完整靜默設定檔範例。視需要編輯這個檔案以設定。使用 -f 選項將 setup.sh 納入,以便加入這個檔案。如需各拓樸專屬設定檔的範例,請參閱「安裝 Edge 元件」。

# IP address or DNS name of nodes.
IP1=192.168.1.1  # Management Server, OpenLDAP, UI, ZooKeeper, Cassandra (IP address only; do not use a DNS name)
IP2=192.168.1.2  # ZooKeeper, Cassandra (IP address only; do not use a DNS name)
IP3=192.168.1.3  # ZooKeeper, Cassandra (IP address only; do not use a DNS name)
IP4=192.168.1.4  # Router, Message Processor
IP5=192.168.1.5  # Router, Message Processor
IP6=192.168.1.6  # Qpid
IP7=192.168.1.7  # Qpid
IP8=192.168.1.8  # Postgres
IP9=192.168.1.9  # Postgres

# Must resolve to IP address or DNS name of host - not to 127.0.0.1 or localhost.
HOSTIP=$(hostname -i)

# Specify "y" to check that the system meets the CPU and memory requirements
# for the component being installed. See Installation Requirements for requirements
# for each component. The default value is "n" to disable check.
ENABLE_SYSTEM_CHECK=n

# When "hostname -i" returns multiple IP addresses,
# set to "y", to have the installer prompt you to select the IP address to use.
ENABLE_DYNAMIC_HOSTIP=n

# Set Edge sys admin credentials.
ADMIN_EMAIL=your@email.com
APIGEE_ADMINPW=yourPassword    # If omitted, you are prompted for it.

# Location of Edge license file.
LICENSE_FILE=/tmp/license.txt

# Management Server information.
MSIP=$IP1    # IP or DNS name of Management Server node.
# Specify the port the Management Server listens on for API calls.
# APIGEE_PORT_HTTP_MS=8080    # Default is 8080.
# OpenLDAP information.
# Set to y if you are connecting to a remote LDAP server.
# If n, Edge installs OpenLDAP when it installs the Management Server.
USE_LDAP_REMOTE_HOST=n 

# If connecting to remote OpenLDAP server, specify the IP/DNS name and port.
# LDAP_HOST=$IP1    # IP or DNS name of OpenLDAP node.
# LDAP_PORT=10389   # Default is 10389.
APIGEE_LDAPPW=yourLdapPassword

# Specify OpenLDAP without replication, 1, or with replication, 2.
LDAP_TYPE=1

# Set only if using replication.
# LDAP_SID=1    # Unique ID for this LDAP server.
# LDAP_PEER=    # IP or DNS name of LDAP peer.

# The Message Processor and Router pod.
MP_POD=gateway

# The name of the region, corresponding to the data center name.
REGION=dc-1 # Use dc-1 unless installing in a
            # multi-data center environment.

# If you are using region names other than dc-1, dc-2 etc, set this property to map your region
# name to the appropriate dc-x format region name. This property is required by Management server
# to appropriately register Cassandra data stores based on Cassandra's data centers and regions.
REGION_MAPPING="<custom-region-1>:dc-1 <custom-region-2>:dc-2 ... <custom-region-x>:dc-x"

# ZooKeeper information.
# See table below if installing in a multi-data center environment.
ZK_HOSTS="$IP1 $IP2 $IP3"         # IP/DNS names of all ZooKeeper nodes.
ZK_CLIENT_HOSTS="$IP1 $IP2 $IP3"  # IP/DNS names of all ZooKeeper nodes.

# Cassandra information.
CASS_CLUSTERNAME=Apigee    # Default name is Apigee.

# Space-separated IP addresses of the Cassandra hosts (previously defined; do not use DNS names)
# Syntax is: IP_address:host_number,rack_number
CASS_HOSTS="$IP1:1,1 $IP2:1,1 $IP3:1,1"

# Set to enable Cassandra authentication.
# CASS_AUTH=y    # The default value is n.
# Cassandra uname/pword required if you enabled Cassandra authentication.
# CASS_USERNAME=
# CASS_PASSWORD=''

# Postgres username and password as set when you installed Edge.
# Default is apigee:postgres.
PG_USER=apigee
PG_PWD=postgres

# Use to enable Postgres master-standby replication
# when you have multiple Postgres nodes.
# PG_MASTER=IPofNewMaster
# PG_STANDBY=IPofOldMaster

# SMTP information.
SKIP_SMTP=n       # Skip now and configure later by specifying "y".
SMTPHOST=smtp.gmail.com
SMTPUSER=your@email.com
SMTPPASSWORD=yourEmailPassword
SMTPSSL=y
SMTPPORT=465      # If no SSL, use a different port, such as 25.
SMTPMAILFROM="My Company <myco@company.com>"

# The following four properties are only effective for Management server:
# Cassandra JMX uname/pword required if you enabled Cassandra JMX authentication.
# CASS_JMX_USERNAME =
# CASS_JMX_PASSWORD =

# Cassandra JMX SSL truststore details if you have enabled SSL based JMX in Cassandra.
# JMX Truststore file should be readable by Apigee user
# CASS_JMX_TRUSTSTORE =
# CASS_JMX_TRUSTSTORE_PASS =
    
# Use this property to enable logging of delta changes to configuration files. To disable, set the value to 'n'.
CONFIG_DELTA_LOG=y

下表列出這些屬性的其他資訊:

屬性 注意事項
IP/DNS 名稱 指定節點的 IP 位址時,請勿使用主機名稱對應至 127.0.0.1 或 IP 位址 127.0.0.1。

請注意,針對 Cassandra 主機定義,請只使用 IP 位址,不要使用 DNS 名稱。

ENABLE_SYSTEM_CHECK

如果是「y」,請確認系統符合所安裝元件的 CPU 和記憶體需求。如要瞭解各個元件的需求條件,請參閱「安裝需求」。

預設值為「n」,可停用檢查。

ENABLE_DYNAMIC_HOSTIP

如果伺服器有多個介面卡,「hostname -i」指令會傳回以空格分隔的 IP 位址清單。根據預設,Edge 安裝程式會使用傳回的第一個 IP 位址,但這在所有情況下可能都不是正確的。或者,您也可以在安裝設定檔中設定下列屬性。

將其設為「y」時,安裝程式會提示您選取要在安裝作業中使用的 IP 位址。預設值為「n」。

ADMIN_EMAIL
APIGEE_ADMINPW

系統管理員的密碼長度至少須為 8 個字元,且包含一個大寫字母、一個小寫字母、一個數字或一個特殊字元。如果您省略密碼,系統會提示您輸入密碼。

安裝完成後,Apigee 建議您從設定檔中移除密碼。

LICENSE_FILE

授權檔案的位置,必須是「apigee」使用者可存取的位置。例如,將檔案儲存在 /tmp 目錄中,並為檔案設定 chmod 777。檔案會複製到 Edge 安裝目錄。

APIGEE_LDAPPW

指定 OpenLDAP 密碼。

安裝完成後,Apigee 建議您從設定檔中移除密碼。

USE_LDAP_REMOTE_HOST
LDAP_HOST
LDAP_PORT

如果 USE_LDAP_REMOTE_HOST 為 n,Edge 會在安裝管理伺服器時自動安裝 OpenLDAP。

如果您要連線至遠端 LDAP 伺服器,請將 USE_LDAP_REMOTE_HOST 設為 y。未透過管理伺服器安裝 OpenLDAP。

如果您要連線至遠端 OpenLDAP 伺服器,請使用 LDAP_HOSTLDAP_PORT 指定主機的 IP 位址或 DNS 名稱和通訊埠號碼。

LDAP_TYPE
LDAP_SID
LDAP_PEER

如要為沒有複製功能的 OpenLDAP 設定 LDAP_TYPE=1,LDAP_TYPE=2 對應至具有複製功能的 OpenLDAP。

如果 Edge 拓撲使用單一 OpenLDAP 伺服器,請指定 1。如果 Edge 安裝作業使用多個 OpenLDAP 節點 (例如 13 節點的實際安裝作業),請指定 2。

如果啟用複製功能,請設定下列屬性:

  • LDAP_SID=1 - 此 LDAP 伺服器的專屬 ID。每個 LDAP 節點都會使用不同的 ID。例如,將 LDAP 同級機器設為 2。
  • LDAP_PEER=10.0.0.1 - LDAP 對等端的 IP 或 DNS 名稱。
MP_POD 指定訊息處理器和路由器 Pod 的名稱。預設名稱為 gateway。
REGION

區域名稱。按照慣例,名稱通常為 dc-# 的格式,其中 # 對應為整數值。例如 dc-1、dc-2 等。除非在多資料中心環境中安裝,否則可以使用 dc-1。

在多個資料中心安裝作業中,這個值會是 dc-1、dc-2 等,取決於您要安裝的資料中心。不過,您不必使用 dc-# 格式的名稱。您可以為區域使用任何名稱。

REGION_MAPPING

如果您使用的是 dc-1、dc-2 等以外的區域名稱,請設定這個屬性,將您的區域名稱對應至適當的 dc-x 格式區域名稱。管理伺服器需要這個屬性,才能根據 Cassandra 的資料中心和區域,適當註冊 Cassandra 資料儲存庫。

ZK_HOSTS

ZooKeeper 節點的 IP 位址或 DNS 名稱。所有 ZooKeeper 節點的 IP 位址或 DNS 名稱必須依序列出。

請為 HOSTIP 使用與 ZK_HOSTS 相同的格式。也就是說,如果您為 ZK_HOSTS 指定 IP 位址,請使用 HOSTIP 的 IP 位址。如果您使用 DNS,請為這兩者都使用 DNS 名稱。

在多資料中心環境中,列出兩個資料中心的所有 ZooKeeper 節點。

只有在建立多個資料中心時 (如 12 主機安裝程序所述),才要在 ZooKeeper 節點上指定「:observer」修飾符。在單一資料中心安裝作業中,請省略該修飾符。詳情請參閱12 主機叢集式安裝程序

ZK_CLIENT_HOSTS

這個資料中心使用的 ZooKeeper 節點 IP 位址或 DNS 名稱。所有 ZooKeeper 節點的 IP 位址或 DNS 名稱必須依序列出。

請為 HOSTIP 使用與 ZK_CLIENT_HOSTS 相同的格式。也就是說,如果您為 ZK_CLIENT_HOSTS 指定 IP 位址,請使用 HOSTIP 的 IP 位址。如果您使用 DNS,請為這兩者都使用 DNS 名稱。

在單一資料中心安裝作業中,這些節點與 ZK_HOSTS 指定的節點相同。

在多資料中心環境中,只列出這個資料中心的 ZooKeeper 節點。詳情請參閱12 主機叢集安裝程序

CASS_CLUSTERNAME 您可以選擇指定 Cassandra 叢集的名稱。預設名稱為「Apigee」。
CASS_HOSTS

指定以逗號分隔的 Cassandra 節點主機 IP 位址清單 (不是 DNS 名稱),以及視需要的資料中心編號和所屬機架

對於正式版拓樸圖,此清單中至少必須有三個節點。前兩個節點會用做「種子伺服器」。因此,所有 Cassandra 節點的 IP 位址必須依相同順序列出。

清單中每個項目的語法如下:

IP_address[:data_center_number,rack_number]

Cassandra 節點可選擇指定 Cassandra 節點的資料中心和機架。請僅在建立多個資料中心時指定 data_center_number 修飾符,如 12 主機安裝程序所述。在單一資料中心安裝作業中,請省略該修飾符。

例如 '192.168.124.201:1,1 = 資料中心 1 和機架/可用性區域 1,以及 '192.168.124.204:2,1 = 資料中心 2 和機架/可用性區域 1。

在多資料中心環境中,為解決防火牆問題,CASS_HOSTS 必須以某種方式排序 (如上例所示),讓目前資料中心的節點置於最前方。詳情請參閱12 個主機叢集安裝程序

如要瞭解如何為 Cassandra 主機指定 rack_number,請參閱「新增 Cassandra 機架支援」。

CASS_AUTH
CASS_USERNAME
CASS_PASSWORD

如果您啟用 Cassandra 驗證 (CASS_AUTH=y),可以使用這些屬性傳遞 Cassandra 使用者名稱和密碼。

安裝完成後,Apigee 建議您從設定檔中移除密碼。

CONFIG_DELTA_LOG

CONFIG_DELTA_LOG 會控制如何記錄設定檔的變更。如果您設定 CONFIG_DELTA_LOG=y,則元件的設定變更不會記錄。

PG_USER
PG_PWD

根據預設,PostgreSQL 資料庫有兩個使用者定義:'postgres' 和 'apigee'。

PG_USER 可讓您變更「apigee」使用者的使用者名稱。您無法變更「postgres」使用者的名稱。

根據預設,PostgreSQL 資料庫會定義兩個使用者:'postgres' 和 'apigee'。 兩者的預設密碼都是「postgres」。使用 PG_PWD 為兩位使用者在安裝時設定不同的密碼。

安裝完成後,Apigee 建議您從設定檔中移除密碼。

PG_MASTER
PG_STANDBY

設定為啟用 Postgres 主機備援複寫功能,格式如下:

PG_MASTER=IPofNewMaster
PG_STANDBY=IPofOldMaster
SKIP_SMTP
SMTPHOST
SMTPUSER
SMTPPASSWORD
SMTPSSL
SMTPPORT
SMTPMAILFROM

設定 SMTP,讓 Edge 能夠傳送遺失密碼和其他通知的電子郵件。

如果不需要 SMTP 使用者憑證,請省略 SMTPUSERSMTPPASSWORD

SMTPMAILFROM」是必填欄位。

CASS_JMX_USERNAME Cassandra JMX 使用者名稱。如果您已啟用 Cassandra JMX 驗證,則必須使用此選項。
CASS_JMX_PASSWORD Cassandra JMX 密碼。如果您已啟用 Cassandra JMX 驗證,則必須使用此選項。
CASS_JMX_TRUSTSTORE Cassandra JMX SSL 信任存放區使用者名稱 (如果您已在 Cassandra 中啟用 SSL 的 JMX)。 Apigee 使用者應可讀取 JMX Truststore 檔案。
CASS_JMX_TRUSTSTORE_PASS Cassandra JMX SSL 信任庫密碼 (如果您已在 Cassandra 中啟用 SSL 的 JMX)。
CONFIG_DELTA_LOG 控制設定變更記錄。將這個值設為「y」,即可列印設定變更。將值設為「n」可停用列印設定變更的功能。

除了這裡列出的屬性之外,還有用於設定 Apigee mTLS 的屬性。詳情請參閱「設定 Apigee mTLS」。