Chef infra 流浪者盒子上的厨师:罐头盒';找不到加密的数据包机密
在使用(托管)chef设置流浪者箱时,我遇到以下错误:Chef infra 流浪者盒子上的厨师:罐头盒';找不到加密的数据包机密,chef-infra,vagrant,Chef Infra,Vagrant,在使用(托管)chef设置流浪者箱时,我遇到以下错误: No such file or directory - file not found '/tmp/encrypted_data_bag_secret' 以下是导致错误的调用: ssl = Chef::EncryptedDataBagItem.load("ssl", s[:id]) 我在/etc/chef中也找不到通常位于我的其他服务器上的加密数据\u bag\u secret 我是否缺少上传数据包机密的配置 以下是堆栈跟踪的其余部分:
No such file or directory - file not found '/tmp/encrypted_data_bag_secret'
以下是导致错误的调用:
ssl = Chef::EncryptedDataBagItem.load("ssl", s[:id])
我在/etc/chef
中也找不到通常位于我的其他服务器上的加密数据\u bag\u secret
我是否缺少上传数据包机密的配置
以下是堆栈跟踪的其余部分:
[2013-02-14T16:51:15+00:00] ERROR: Running exception handlers
[2013-02-14T16:51:15+00:00] FATAL: Saving node information to /srv/chef/file_store/failed-run-data.json
[2013-02-14T16:51:15+00:00] ERROR: Exception handlers complete
[2013-02-14T16:51:15+00:00] FATAL: Stacktrace dumped to /srv/chef/file_store/chef-stacktrace.out
[2013-02-14T16:51:15+00:00] FATAL: Errno::ENOENT: No such file or directory - file not found '/tmp/encrypted_data_bag_secret'
当设置一个流浪者箱时,如果您想使用加密的数据包,您必须提供数据包密钥的路径
config.vm.provision :chef_solo do |chef|
[...]
chef.encrypted_data_bag_secret_key_path = '/etc/chef/encrypted_data_bag_secret'
[...]
end
快速修正Thomas Obermüller对Draco Ater上述回答的回应。在Vagrant 1.5.1到Vagrant 1.6.5中(可能早于1.5.1;我没有尝试过),有几个变化:
chef.encrypted_data_bag_secret
已弃用,设置它无效/tmp/Vagrant-chef-2/encrypted_data_bag_secret_key
,而不是像最初那样默认为/etc/chef/encrypted_data_bag_secret
好人!我哪儿也找不到这条消息。这很奇怪,因为在knife.rb文件中,该设置被称为“加密的\u数据\u包\u密钥”。谢谢请注意,您必须在本地计算机上为chef.encrypted_data_bag_secret_key_path提供路径。然后,它会将密钥放入chef.encrypted_data_bag_secret,默认情况下为“/etc/chef/encrypted_data_bag”。我在托马斯的评论中添加了一个更新,作为下面的一个单独答案。它总是vagrant-chef-2吗?在我第一次运行时,它将其放在vagrant-chef-1。那么您可能正在使用vagrant 1?看起来我使用的是
1.6.5
。但它也告诉我最新版本是1.7.1
。奇怪的