【发布时间】:2023-09-02 21:31:01
【问题描述】:
我是 Chef 的新手,从 Robin Beck 的教程 Lynda 学习。我正在使用 Windows 10 并按照教程中的说明安装了 ChefDk。树形结构如下:
C:.
├───.chef
├───cookbooks
│ └───apache
│ ├───.delivery
│ │ └───build_cookbook
│ │ ├───data_bags
│ │ │ └───keys
│ │ ├───recipes
│ │ ├───secrets
│ │ └───test
│ │ └───fixtures
│ │ └───cookbooks
│ │ └───test
│ │ └───recipes
│ ├───recipes
│ ├───spec
│ │ └───unit
│ │ └───recipes
│ ├───templates
│ │ └───default
│ └───test
│ └───recipes
└───roles
我正在尝试使用刀命令上传食谱:
knife cookbook upload apache
我正在从“chef-repo”目录运行命令,但出现如下错误:ERROR: Errno::ENOENT: No such file or directory
请在屏幕截图下方查看更多信息。
请帮忙,提前谢谢!
编辑:
请在下面找到刀.rb 文件的输出。
#See http://docs.chef.io/config_rb_knife.html for more information on knife configuration options
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "hakiuser"
client_key "#{current_dir}/hakiuser.pem"
chef_server_url "https://api.chef.io/organizations/cheflynda"
cookbook_path ["#{current_dir}/../cookbooks"]
【问题讨论】:
-
食谱本身可能缺少一些东西。不幸的是,您的
tree仅显示目录而不显示文件。可能是metadata.rb是错误的还是缺失的?
标签: chef-infra knife cookbook