BaaS 設定檔參考資料

私有雲版本 4.17.05 版本

以下是 10 個節點 API BaaS 安裝的靜音設定檔範例。視需要編輯這個檔案,以便進行設定。使用 -f 選項 setup.sh 以納入這個檔案。

# Specify IP address or DNS name of node.
IP1=192.168.1.1   # ElasticSearch
IP2=192.168.1.2   # ElasticSearch
IP3=192.168.1.3   # ElasticSearch
IP4=192.168.1.4   # API BaaS Stack
IP5=192.168.1.5   # API BaaS Stack
IP6=192.168.1.6   # API BaaS Stack
IP7=192.168.1.7   # API BaaS Portal
IP8=192.168.1.8   # Cassandra (shared with Edge or standalone)
IP9=192.168.1.9   # Cassandra (shared with Edge or standalone)
IP10=192.168.1.10  # Cassandra (shared with Edge or standalone)

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

# Define the API BaaS administrator account.  
AS_ADMIN="superuser"    # User name - default is "superuser".
AS_ADMIN_EMAIL=stackAdmin@email.com
AS_PASSWD=stackAdminPWrod

# Only if you are installing Cassandra.
# Specify Cassandra data center and rack suffix.
# Must use IP addresses for CASS_HOSTS, not DNS names.
# CASS_HOSTS="$IP8:1,1 $IP9:1,1 $IP10:1,1"

# If connecting to existing Cassandra nodes, 
# specify Cassandra IPs.
# Must use IP addresses for CASS_HOSTS, not DNS names.
CASS_HOSTS="$IP8 $IP9 $IP10"

# Cassandra uname/pword.
# Even if Cassandra authentication is disabled,
# you must still pass values for these properties.
CASS_USERNAME=cassandra    # Default value
CASS_PASSWORD=cassandra    # Default value

# Specify BaaS Cassandra connection information.
# Specify the data center name.
BAAS_CASS_LOCALDC=dc-1    # Default is dc-1.

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

# Replication is in the form "dataCenterName:#CassandraNodes". 
# For example, for dc-1 with three Cassandra nodes, it is dc-1:3.
BAAS_CASS_REPLICATION=dc-1:3

# Defines the initial contact points for members of the BaaS cluster. 
# For a single node install, specify the IP address of the node. 
BAAS_CLUSTER_SEEDS="dc-1:$IP1"

# ElasticSearch IPs or DNS names, separated by spaces.
ES_HOSTS="$IP1 $IP2 $IP3"

# API BaaS Stack information.
# Default cluster name is "apigee_baas"
BAAS_USERGRID_CLUSTERNAME="apigee_baas" 

# URL and port of the load balancer for the API BaaS Stack nodes, 
# or IP/DNS and port 8080 of a single Stack node with no load balancer.
BAAS_USERGRID_URL=http://myloadbalancer:8443

# API BaaS Portal information.
# URL and port number of load balancer, if there is one in front of the Portal,
# or the URL and port of the Portal node.  
BAAS_PORTAL_URL="http://$IP7:9000"

# Portal port. Default value is 9000.
BAAS_PORTAL_LISTEN_PORT=9000 

# SMTP information. BaaS requires an SMTP server.
SMTPHOST=smtp.gmail.com
SMTPPORT=465
SMTPUSER=your@email.com
SMTPPASSWORD=yourEmailPassword
SMTPSSL=y

下表提供這些屬性的其他資訊:

屬性

注意

CASS_主機

如要安裝 Cassandra,請指定 Cassandra 節點 IP (而非 DNS 名稱),並加入 :dc,ra" 修飾符,指定 Cassandra 節點的資料中心和機架。

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

CASS_Username
CASS_PASSWORD

Cassandra 使用者名稱和密碼。

如果 Cassandra 驗證已停用,您還是必須傳遞這些值。不過系統會忽略這些值。

基本號碼

區域名稱的格式必須為 dc-#,其中 # 代表整數值。

例如 dc-1、dc-2 等。如要連線至使用 Edge 安裝的 Cassandra 叢集,可以向 Edge 系統管理員要求這個值。在 Edge Edge 資料中心安裝中,預設值為 dc-1。

如果您安裝 Cassandra 時一併安裝 API BaaS,並在 Cassandra 安裝中將「:dc,ra」修飾符新增至 Cassandra IP 位址。 第一個值「dc」是資料中心編號。資料中心名稱是「dc-」字串,後置字串是後置字串。

基本值

指定與 BAAS_CASS_LOCALDC 相同的值。

基本規定

格式為 dataCenterName:#CassandraNodes,且不含引號。例如,如果是含有三個 Cassandra 節點的 dc-1,則為 dc-1:3。

如要安裝第二個資料中心,請指定這兩個資料中心的資訊:

BAAS_CASS_REPLICATION=dc-1:3,dc-2:3

基本叢集

定義 BaaS 叢集成員的初始聯絡窗口。請指定資料中心的 BaaS 堆疊種子節點清單,以逗號分隔,格式為「dc-#:nodeIP」,其中 dc-# 是 BAAS_CASS_LOCALDC 定義的資料中心名稱。

如果是單一節點安裝,請指定節點的 IP 位址。

在實際工作環境中,資料中心內至少三個 BaaS 堆疊節點的情況下,請將兩個堆疊節點指定為種子值。即使您有三個以上的堆疊節點,也請勿指定超過兩個節點。

如有多個資料中心,請只指定該資料中心的種子節點。

BAAS_USERGRID_URL

在實際工作環境中,這會是 API BaaS 堆疊節點前方的負載平衡器網址和通訊埠,格式如下:

http://myStackLoadBalancer:8443

在測試或開發環境中,如果只有一個 API BaaS 堆疊節點,可以是 API BaaS 堆疊節點的網址和通訊埠號碼,格式如下:

http://stackIPorDNS:8080

API BaaS 堆疊伺服器的通訊埠編號為 8080。

基本號碼

如果入口網站前方有負載平衡器的網址和通訊埠號碼,格式如下:

http://myPortalLoadBalancer:8443

如果沒有負載平衡器,入口網站節點的網址和通訊埠編號,格式如下:

http://portalIPorDNS:9000
B 入口網站的入口網站號碼為 B0

基本規格

API BaaS 入口網站伺服器的通訊埠號碼為 9000。如果沒有這個通訊埠,請指定其他通訊埠。

如果您將 BAAS_PORTAL_URL 設定為入口網站節點的網址,兩個屬性的通訊埠編號必須相同。