边缘配置文件参考

Edge for Private Cloud v. 4.17.01

下面显示了一个适用于 9 节点 Edge 安装的完整静默配置文件示例。根据需要修改此文件以进行配置。使用 -f 选项设置 setup.sh 以包含此文件。 下面还显示了每种 Edge 拓扑的示例配置文件。

# IP address or DNS name of nodes.
IP1=192.168.1.1  # Management Server, OpenLDAP, UI, ZooKeeper, Cassandra
IP2=192.168.1.2  # ZooKeeper, Cassandra
IP3=192.168.1.3  # ZooKeeper, Cassandra
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)

# 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.

BIND_ON_ALL_INTERFACES=y 

# 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. 

# 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.

# IP addresses (not DNS names) of the Cassandra hosts separated by spaces.
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=

# Set Postgres password. Default is postgres.
PG_PWD=postgres

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

# 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.

下表列出了有关这些属性的更多信息:

属性

备注

IP/DNS 名称

指定节点的 IP 地址时,请勿使用映射到 127.0.0.1 的主机名或 127.0.0.1 的 IP 地址。

ADMIN_EMAIL
APIGEE_ADMINPW

系统管理员密码必须至少有 8 个字符,且需要包含 1 个大写字母、1 个小写字母、1 个数字或 1 个特殊字符。如果您省略了密码,系统会提示您输入密码。

许可文件

许可文件的位置,必须可供“apigee”用户访问。 例如,存储在 /tmp 目录和文件的 chmod 777 中。该文件将被复制到 Edge 安装目录中。

APIGEE_LDAPPW

指定 OpenLDAP 密码。

USE_LDAP_REMOTE_HOST
LDAP_HOST
LDAP_PORT

如果 USE_LDAP_REMOTE_HOST 为 n,则 Edge 会在安装管理服务器时自动安装 OpenLDAP。

如果您要连接到远程 LDAP 服务器,请将 USE_LDAP_REMOTE_HOST 设为 y。管理服务器未安装 OpenLDAP。

如果您要连接到远程 OpenLDAP 服务器,请使用 LDAP_HOST
和 LDAP_PORT 指定主机的 IP 地址或 DNS 名称和端口号。

LDAP_TYPE
LDAP_SID
LDAP_PEER

为 OpenLDAP 设置 LDAP_TYPE=1,但不复制。LDAP_TYPE=2 对应于具有复制功能的 OpenLDAP。

如果您的边缘拓扑使用单个 OpenLDAP 服务器,请指定 1。如果您的 Edge 安装使用多个 OpenLDAP 节点(例如在包含 13 个节点的正式版安装中),请指定 2。

如果要启用复制功能,请设置以下属性:

  • LDAP_SID=1 - 此 LDAP 服务器的唯一 ID。每个 LDAP 节点都使用不同的 ID。 例如,如果 LDAP 对等网络设置为 2,则将此值设置为 2。
  • LDAP_PEER=10.0.0.1 - LDAP 对等方的 IP 或 DNS 名称。

BIND_ON_ALL_INTERFACES

如果设为“y”,则路由器/消息处理器会在所有接口 (IP) 上绑定(监听)。 如果设置为“n”,则路由器/消息处理器会在特定接口上绑定(监听),“hostname -i”命令返回的 IP 地址。

MP_POD

指定消息处理器和路由器 Pod 的名称。默认情况下,名称为网关。

区域

地区名称。按照惯例,名称通常采用 dc-# 格式,其中 # 与整数值相对应。例如,dc-1、dc-2 等。您可以使用 dc-1,除非在多数据中心环境中安装。

安装多个数据中心时,该值为 dc-1 或 dc-2 等,具体取决于您安装的数据中心。但是,您并非只能使用 dc-# 形式的名称。您可以为该区域使用任何名称。

ZK_HOSTS

ZooKeeper 节点的 IP 地址或 DNS 名称。所有 ZooKeeper 节点上的 IP 地址或 DNS 名称都必须以相同的顺序列出。

在多数据中心环境中,列出两个数据中心的所有 ZooKeeper 节点。

如多个 12 台主机安装中所述,仅在创建多个数据中心时,才能在 ZooKeeper 节点上指定“:observer”修饰符。安装单个数据中心时,请忽略该修饰符。

ZK_CLIENT_HOSTS

此数据中心使用的 ZooKeeper 节点的 IP 地址或 DNS 名称。所有 ZooKeeper 节点上的 IP 地址或 DNS 名称都必须以相同的顺序列出。

安装单个数据中心时,这些节点与 ZK_HOSTS 指定的节点相同。

在多数据中心环境中,仅列出此数据中心内的 ZooKeeper 节点。

CASS_CLUSTERNAME (可选)确定 Cassandra 集群的名称。默认名称为“Apigee”。

CASS_HOSTS

Cassandra 节点的 IP 地址(而非 DNS 名称)。前两个节点将用作种子服务器。IP 地址必须在所有 Cassandra 节点上以相同的顺序列出。

Cassandra 节点可以有可选的“:dc,ra”后缀,用于指定 Cassandra 节点的数据中心和机架。如 12 个主机的安装中所述,仅在创建多个数据中心时才指定此修饰符。安装单个数据中心时,请忽略该修饰符。

例如,“192.168.124.201:1,1 = 数据中心 1 和机架/可用性地区 1”,而“192.168.124.204:2,1 = 数据中心 2 和机架/可用性地区 1”。

在多数据中心环境中,为了解决防火墙问题,必须对 CASS_HOSTS 进行排序,使当前数据中心的节点位于开头。

CASS_AUTH
CASS_USERNAME

CASS_PASSWORD

如果您启用 Cassandra 身份验证,CASS_AUTH=y,则可以使用这些属性传递 Cassandra 用户名和密码。

PG_PWD

默认情况下,PostgreSQL 数据库定义了两个用户:“postgres”和“apigee”。两个用户的默认密码均为“postgres”。在安装时,使用 PG_PWD 将这两个用户的密码设置为不同的值。

PG_MASTER

PG_待机

设置为启用 Postgres 主实例备用复制,格式为:

PG_MASTER=IPORDNSofNewMaster

PG_STANDBY=IPorDNSofOldMaster

SKIP_SMTP
SMTPHost
SMTPUSER
SMTPPASSWORD
SMTPSSL
SMTPPORT

配置 SMTP,以便 Edge 针对密码丢失和其他通知发送电子邮件。

如果不需要 SMTP 用户凭据,请省略 SMTPUSERSMTPPASSWORD