无法从加载路径加载'chef-solo'配置程序

时间:2015-11-11 14:30:12

标签: chef test-kitchen

我已经在我的工作站上新安装了ChefDK,下载了入门套件并修改了.kitchen.yml如下:

---
driver:
  name: opennebula
  opennebula_endpoint: http://10.1.1.1/zonea
  oneauth_file: /home/local/.one/one_auth
  template_name: CHEF-TESTVM
  vm_hostname: CHEF-TESTVM-FRONT-END
  public_key_path: /home/local/.ssh/id_rsa.pub
  username: root
  memory: 4096
  require_chef_omnibus: false
  user_variables:
    FILEHOME: http://10.1.1.2/~dev/repo/

provisioner:
  name: chef-solo
  environments_path: /home/local/chef-repo/cookbooks/init/environments/
  role_path: /home/local/chef-repo/cookbooks/init/roles/

platforms:
  - name: ubuntu-12.04

suites:
  - name: default
    provisioner:
      solo_rb:
        environment: dev
    run_list:
      - recipe[wfe]
      - role[common]
    attributes:

厨师提供厨师。 (使用内置厨房/宝石/捆绑等)

我跑kitchen test时会发出以下消息:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'chef-solo' provisioner from the load path. Please ensure that your provisioner is installed as a gem or included in your Gemfile if using Bundler.
>>>>>> ----------------------

which chef-solo返回/opt/chefdk/bin/chef-solo

如果我将chef-solo更改为chef-zero,则会在kitchen diagnose期间忽略相同的错误:

exception: "#<Kitchen::ClientError: Could not load the 'chef-zero' provisioner
  from the load path. Please ensure that your provisioner is installed as a gem
  or included in your Gemfile if using Bundler.>"

我已经安装了kitchen-opennebula gem,但我怀疑这个问题与此无关。

发生了什么事?

1 个答案:

答案 0 :(得分:0)

我发现这是一个错字:

chef-solo应该是yml中的chef_solo

解决。

我遇到了另一个类似的问题,阻止了我一段时间试图找出原因(data_bag_path vs data_bags_path,它应该有's')