盐主盐云不起作用幂等 [英] salt-master salt-cloud not acting idempotent

查看:117
本文介绍了盐主盐云不起作用幂等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试测试salt-cloud saltify在目标计算机上部署/安装盐小兵.

I am trying to test salt-cloud saltify to deploy/install salt-minions on target machines.

我创建了三台无业游民的机器,并将其命名为 master minion-01 minion-02 .

I created three vagrant machines and names them master, minion-01and 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 安装Salt-master(当然是手动的).

then on master I followed this http://repo.saltstack.com/#ubuntu to install salt-master(manually ofcourse).

然后在主服务器中,我添加了这三个文件.

then in master I added these three files.

/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 这很慢,但是没有错误地运行. 盐大师接受了minion-01和minion-02的密钥.

then on minion I ran salt-cloud -m /etc/salt/saltify-map It was very slow but It ran without errors. keys of both minion-01 and minion-02 was accepted by salt master.

我可以这样做:

   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 盐大师重新执行了整个执行,然后我有了这个;

Now when I again executed this salt-cloud -m /etc/salt/saltify-map salt-master re-ran the whole execution and then I had this;

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:

简而言之,盐云并没有表现出幂等.

In short salt-cloud is not acting idempotent.

我在做什么错了?

第二个问题是,尽管第一次运行salt-cloud -m /etc/salt/saltify-map安装并接受了盐大师上的 minion-01 minion-02 密钥,但是小仆机器安装了所有这些东西以及salt-minion

The second problem is, though on the first run salt-cloud -m /etc/salt/saltify-map installs and accepts key of minion-01 and minion-02 on salt-master, but the minion machines have all these things installed along with 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)

推荐答案

您写道:速度非常慢" :

您已将script_args设置为从源安装Github的所有内容的值.您可能想要删除参数(或使用其他参数)以快速安装预打包版本.请参阅 https://github.com/saltstack/salt-bootstrap ,尤其是bootstrap-salt.sh可用的选项.

You have set script_args to values that install everything from Github from source. You might want to remove the parameters (or use different parameters) to have a fast installation of a pre-packaged version. Please see https://github.com/saltstack/salt-bootstrap and specifically bootstrap-salt.sh for the available options.

您写的是:盐云未发挥幂等作用" :

您做的一切正确. salt-cloud不是幂等的.据我所知,它并非设计为幂等的.

You're doing everything correctly. salt-cloud is not idempotent. As far as I know it is not designed to be idempotent.

您写道:小兵机器将所有这些东西与盐小兵一起安装了"

可能是由于使用git参数并从源代码安装而导致的.请尝试盐的预包装版本.

It might be the case due to using the git parameters and installing it from source. Please try a pre-packaged version of Salt.

这篇关于盐主盐云不起作用幂等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆