我正在尝试测试salt-cloud saltify在目标计算机上部署/安装盐分仆从。
我创建了三台流浪机器,并将它们命名为master、minion 01和minion 02。
所有的机器都是这样;
root@master:/home/vagrant# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty然后,在主服务器上,我遵循这个http://repo.saltstack.com/#ubuntu安装盐母(当然是手动的)。
然后我在师父里面添加了这三个文件。
在/etc/salt/cloud.providers:中
root@master:/etc/salt/cloud.providers.d# cat bare_metal.conf
my-saltify-config:
minion:
master: 192.168.33.10
driver: saltify在/etc/salt/cloud.profiles.d:中
root@master:/etc/salt/cloud.profiles.d# cat saltify.conf
make_salty:
provider: my-saltify-config
script_args: git v2016.3.1/etc/salt/saltify-map
root@master:/etc/salt# cat saltify-map
make_salty:
- minion-01:
ssh_host: 192.168.33.11
ssh_username: vagrant
password: vagrant
- minion-02:
ssh_host: 192.168.33.12
ssh_username: vagrant
password: vagrant然后在走狗上,我运行了salt-cloud -m /etc/salt/saltify-map,它运行得非常慢,但是它运行时没有错误。分-01和分-02的钥匙都被盐大师接受.
我可以这么做:
root@master:/home/vagrant# salt 'minion*' test.ping
minion-01:
True
minion-02:
True还有这个;
root@master:/home/vagrant# salt-key
Accepted Keys:
minion-01
minion-02
Denied Keys:
Unaccepted Keys:
Rejected Keys:问题;
现在,当我再次执行这个salt-cloud -m /etc/salt/saltify-map盐母程序时,重新运行了整个执行过程,然后我得到了这个;
root@master:/home/vagrant# salt 'minion*' test.ping
minion-02:
Minion did not return. [No response]
minion-01:
Minion did not return. [No response]还有这个;
root@master:/etc/salt# salt-key
Accepted Keys:
minion-01
minion-02
Denied Keys:
minion-01
minion-02
Unaccepted Keys:
Rejected Keys:简而言之,盐云并不是幂等的。
我做错什么了?
第二个问题是,虽然在第一次运行时,salt-cloud -m /etc/salt/saltify-map在盐母上安装并接受了 minion -01和minion-02的密钥,但这些设备都与salt-minion一起安装。
root@minion-02:/home/vagrant# salt
salt salt-call salt-cp salt-master salt-proxy salt-ssh salt-unity
salt-api salt-cloud salt-key salt-minion salt-run salt-syndic 如何确保只安装salt-minion。
谢谢。
PS:
root@master:/etc/salt# salt-master --version
salt-master 2016.3.1 (Boron)发布于 2016-07-15 08:43:48
您可以这样写:“非常慢”,:
您已经将script_args设置为从Github源安装所有内容的值。您可能希望删除参数(或使用不同的参数),以便快速安装预打包版本。有关可用选项,请参见https://github.com/saltstack/salt-bootstrap,特别是bootstrap-salt.sh。
你写的:“盐云不是幂等的”。
你做的一切都很正确。salt-cloud不是幂等的。据我所知,它不是设计成幂等的。
你写的:“仆从机器安装了所有这些设备,同时安装了盐- minion”。
由于使用git参数并从源安装它,可能会出现这种情况。请试一试预先包装的盐。
发布于 2016-07-23 18:12:39
流浪汉不会在运行过程中摧毁机器,对吧?
从外观看,在第二轮,盐仆从已经开始了新的钥匙和重新注册的主人。因为他们的名字是一样的--这都搞糊涂了.
试着在运行前“流浪汉毁灭”,让机器每次都是新鲜的?
发布于 2016-07-25 01:57:38
FWIW,这也是盐中的一个bug,尽管目前它不能被复制:https://github.com/saltstack/salt/issues/34687
https://stackoverflow.com/questions/38390216
复制相似问题