配置集群¶
要配置或重新配置现有集群,请运行:
$ adam provision -n [cluster-name]
示例:要配置名为“cluster”的集群:
$ adam provision -n cluster
自定义配置命令-高级¶
默认情况下,命令:adam provision
- 检查 SSH 连接。
- 创建默认用户。
- 安装盐。
- 同步公式。
- 配置启用的插件和在集群配置文件中定义的安全设置。
要仅运行此供应过程的一部分,请使用
选项和子命令来控制供应期间发生的情况。adam provision
运行以查看可用选项和子命令:adam provision --help
$ adam provision --help
Usage: adam provision [OPTIONS] COMMAND [ARGS]...
Execute all the provisioning steps for a cluster
See subcommands help for more info. Usage: adam provision -n
Options:
-n, --cluster TEXT Cluster name [required]
--flush-iptables Flush IPTables [default: False]
--selinux-permissive Set SELinux to permissive [default:
False]
--selinux-context Set SELinux contexts [default: False]
--plugins Install enabled plugins on provision
[default: False]
-h, --help Show this message and exit.
Commands:
anaconda-user Create the default anaconda user in all
the nodes
check-ssh Check SSH connection to the nodes
flush-iptables Flush IPTables
plugins Provision enabled plugins
roles Set roles on the cluster nodes
salt Provision Salt
security-settings Execute the security settings
selinux-context Set SELinux contexts
selinux-permissive Set SELinux to permissive
sync Sync formulas and settings
示例:要检查与现有集群中所有节点的 SSH 连接:
$ adam provision -n cluster check-ssh
Checking SSH connection to nodes
2016-10-03 22:10:49,327 - adam.models - DEBUG - Checking ssh
connection for 54.88.20.164
2016-10-03 22:10:50,905 - adam.models - DEBUG - SSH
connection to 54.88.20.164: OK
2016-10-03 22:10:51,008 - adam.models - DEBUG - Checking ssh
connection for 52.90.168.130
2016-10-03 22:10:51,996 - adam.models - DEBUG - SSH
connection to 52.90.168.130: OK
+---------------+---------------+
| Node IP | SSH Available |
+---------------+---------------+
| 54.88.20.164 | True |
| 52.90.168.130 | True |
+---------------+---------------+
| All nodes | True |
+---------------+---------------+