配置Nuodb管理员

NuoDB Admin (nuoadmin) uses nuoadmin.conf file to secure the domain and configure membership connection attributes. The nuoadmin.conf configuration file is located in the $NUODB_CFGDIR directory. See also the the sample $NUODB_HOME/etc/nuoadmin.conf.sample file shipped with NuoDB.

有关环境变量的信息,请参阅 环境变量.

配置管理进程

也称为管理服务或管理服务器的管理过程(AP)作为诺福银域中的域成员参与,并由其IP地址和端口号标识。 每个AP都有一个具有字母数字字符串值的唯一服务器ID。 To configure an AP for a given host machine, there are some important properties (located in nuoadmin.conf) that require review and/or configuration.

  • ThisServerId

  • initialMembership

  • peer

  • altAddr

有关可以为管理过程和示例配置设置的其他属性的信息,请参阅 主机属性(nuoadmin.conf).

下面描述在特定主机上配置NOODB管理进程的最小步骤。

第1步 - 配置thingserverid

ThisServerId 是永久分配的特定AP的唯一标识符。 它应该是稳定的并且可以’t be changed without removing the durable Raft state (the raftlog file located in $NUODB_VARDIR) for that AP. 有关更多信息,请参阅 在多主机配置中取消取消寄存器(缩放).

If a DNS name is used as ThisServerId, it should not change after a host restart or re-provision.

第2步 - 配置InitialMembership

一个特殊的启动过程 引导 当Nuodb域第一次启动时执行。 为了防止跨域通信,由大多数初始域成员生成并确认唯一域ID。 To define one or more NuoDB APs capable of performing domain bootstrap or allowing non-initial member peers to enter a domain, set a value for the initialMembership property in nuoadmin.conf. 每个键都是一个服务器ID,其值具有相应的RAFT协议版本和该服务器的连接详细信息。 If the domain has not been bootstrapped yet, then it can only be bootstrapped by a majority of the servers configured in the initialMembership. All domain members that specify an initial membership must have the same initialMembership value configured.

为防止创建不相交的域,在引导域之后,无法添加不在初始成员身份中的管理服务器。

The initialMembership is immutable during the domain lifecycle. 更改它需要销毁域并引导新的域。

有关更多信息和示例配置,请参阅 关于设置对等体和初始示例性质的注意事项

步骤3 - 配置对等体(可选)

The peer can be the address of a specific admin server in the membership or a load-balancer that is routing traffic to existing admin servers. The newly started admin servers will try to fetch the initial membership from the peer endpoint if specified. Otherwise, the configured initialMembership in nuoadmin.conf will be used when joining the domain.

When peer is set to load-balancer, it is not recommend to use an empty initialMembership, because it can lead to servers bootstrapping disjoint domains.

有关更多信息和示例配置,请参阅 关于设置对等体和初始示例性质的注意事项

步骤4 - 配置AltAddr(可选)

默认情况下,AP将其主机名存储在耐用的成员身份中(然后可以使用该APS与其通信)。 In situations when a different hostname or IP address should be advertized by a particular admin process, altAddr can be configured. 例如,具有公共和私有IP地址的AP主机,可能需要宣传公共地址。

The address specified in the transport field of the initialMembership entry for ThisServerId must be the same as the hostname configured in altAddr if an altAddr is specified). Once the domain is bootstrapped, the altAddr can be changed.

第5步 - 配置传输层安全性

必须在启动AP之前配置传输层安全性(TLS)使用的证书和密钥库文件。 By default, TLS is enabled in nuoadmin.conf by the line "ssl": "true",. It can be disabled by setting "ssl": false", in nuoadmin.conf. 如果禁用TLS,则将忽略密钥库和信任库属性。

有关如何生成证书的信息,请参阅 启用TLS加密.

第6步 - 启动NuodB管理服务

管理服务 启动命令 可以根据NOODB安装类型而有所不同。

步骤7 - 验证NuodB管理域状态

使用nuodb命令(nuocmd)命令行工具并运行 Nuocmd显示领域 显示所有管理流程及其状态。 Make sure that all APs are reported as Connected and a leader is elected.

有关扩展现有域的信息,请参阅 跨第二主机扩展数据库(缩放), 和 管理过程.