我试图用现有的盐分公式提供使用salt的迷途VM。为了访问gitfs_remotes:https://github.com/borgstrom/salt-vagrant-saltconf2014/blob/master/presentation.md,我遵循了这个演示文稿。
盐/
master: 127.0.0.1
state_verbose: False盐类/主盐:
# listen on the loopback in open mode
interface: 127.0.0.1
auto_accept: True
# use both the local roots as well as gitfs remotes
fileserver_backend:
- roots
- git
# map our project specific files to the local roots
file_roots:
base:
- /vagrant/salt/roots
pillar_roots:
base:
- /vagrant/salt/pillar
# setup our salt formulas as gitfs remotes
gitfs_remotes:
- https://github.com/saltstack-formulas/mysql-formulaVagrantfile (部分):
config.vm.synced_folder "salt/roots/", "/srv/salt/"
config.vm.synced_folder "salt/pillar", "/srv/pillar/"
config.vm.provision :salt do |salt|
salt.minion_config = "salt/minion"
salt.master_config = "salt/master"
salt.bootstrap_options = "-F -c /tmp/ -P"
salt.run_highstate = true
end/salt/roots/top.sls:
base:
'*':
- mysql但我知道错误是:
信息SaltReqTimeoutError: 60秒后。(尝试7中的7)试图与盐主验证失败
发布于 2016-03-09 21:36:09
没有主从的仆从可以使用gitfs而不需要显式配置的母版。有一个盐栈/盐的问题。
看看这个盐栈/盐类引导中的问题,了解为什么要使用bash配置在前面安装一些东西。
下面是一个使用节点公式的工作配置。
Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
# mount state tree and pillar
config.vm.synced_folder ".saltstack/salt/", "/srv/salt/", type: "rsync"
config.vm.synced_folder ".saltstack/pillar/", "/srv/pillar/", type: "rsync"
# install those to be able to use gitfs for node formula
# @see https://github.com/saltstack/salt-bootstrap/issues/245
config.vm.provision :shell, :inline => "sudo apt-get -y install git-core"
config.vm.provision :shell, :inline => "sudo apt-get -y install python-setuptools"
config.vm.provision :shell, :inline => "sudo easy_install GitPython"
config.vm.provision :salt do |salt|
# Workaround for:
# Copying salt minion config to /etc/salt
# Failed to upload a file to the guest VM via SCP due to a permissions
# error. [...]; @see:
# https://github.com/mitchellh/vagrant/issues/5973#issuecomment-137276605
salt.bootstrap_options = '-F -c /tmp/ -P'
salt.masterless = true
salt.minion_config = ".saltstack/minion"
salt.run_highstate = true
salt.verbose = true
end
# sync working dir
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: [".git/", ".saltstack"]
end.saltstack/minion
state_verbose: True
file_client: local
gitfs_provider: gitpython
fileserver_backend:
- roots
- git
gitfs_remotes:
- https://github.com/saltstack-formulas/node-formula.git发布于 2015-11-16 11:21:28
你会得到这个错误,因为当一个仆从连接到“盐主”时,这个请求必须得到盐主的批准。这就像一种安全机制--第一次周围需要批准,第二次继续使用机器的指纹。在你的盐业大师跑:
sudo salt-key你应该看到类似的东西,你会注意到新机器的钥匙还没有被接受。
Accepted Keys: Denied Keys: Unaccepted Keys: xyz.hostname.com Rejected Keys:
继续运行命令:
sudo salt-key -A确认时说是,钥匙就会被接受,错误应该消失。此外,要测试该仆从是否可访问,请在主服务器上运行命令:
sudo salt '*' test.ping这应该是从奴才那里返回的。
https://stackoverflow.com/questions/33381113
复制相似问题