【发布时间】:2013-12-10 00:36:39
【问题描述】:
我正在通过the SaltStack walk through 在我的 ec2 集群上设置 salt。我刚刚编辑了/etc/salt/minion 并添加了我的盐大师的公共 dns。
master: ec2-54-201-153-192.us-west-2.compute.amazonaws.com
然后我重新启动了奴才。在调试模式下,这会输出以下内容
$ sudo salt-minion -l debug
[DEBUG ] Reading configuration from /etc/salt/minion
[INFO ] Using cached minion ID: localhost.localdomain
[DEBUG ] loading log_handlers in ['/var/cache/salt/minion/extmods/log_handlers', '/usr/lib/python2.6/site-packages/salt/log/handlers']
[DEBUG ] Skipping /var/cache/salt/minion/extmods/log_handlers, it is not a directory
[DEBUG ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG ] Configuration file path: /etc/salt/minion
[INFO ] Setting up the Salt Minion "localhost.localdomain"
[DEBUG ] Created pidfile: /var/run/salt-minion.pid
[DEBUG ] Chowned pidfile: /var/run/salt-minion.pid to user: root
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.6/site-packages/salt/grains']
[DEBUG ] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
[DEBUG ] Attempting to authenticate with the Salt Master at 172.31.21.27
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
果然172.31.21.27是master的私网ip。到目前为止,这看起来还可以。根据演练,下一步是在 master 上接受 minions 键:
"Now that the minion is started it will generate cryptographic keys and attempt to
connect to the master. The next step is to venture back to the master server and
accept the new minion's public key."
但是,当我转到主节点并查找新密钥时,我没有看到任何待处理的请求。
$ sudo salt-key -L
Accepted Keys:
Unaccepted Keys:
Rejected Keys:
而且 ping 测试也没有看到 minion:
$ sudo salt '*' test.ping
这就是我卡住的地方,接下来我应该怎么做才能启动和运行?
【问题讨论】:
-
"Salt Master 需要绑定到系统上的 2 个 TCP 网络端口,这些端口是 4505 和 4506"(来自演练)...允许访问安全组中的这些?如果所有机器都在同一个安全组中,您应该能够将安全组 (sg-xxxxxxxx) 指定为“源”地址而不是 IP 地址。此外,您不需要有 iptables 或其他任何阻塞连接的东西。
-
啊,当然,当我启动我的 ops 框时,我忘了刷新 ip 表。非常感谢,我刚刚接受了第一个minion的key,ping测试通过了。
标签: amazon-web-services amazon-ec2 salt-stack