I have freshly installed ChefDK on my workstation, downloaded the starter kit and modified .kitchen.yml to follows:
---
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 is provided with the Chef. (use the built-in kitchen/gem/bundle etc)
And I ran kitchen test
it gives the following message:
>>>>>> ------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
returns /opt/chefdk/bin/chef-solo
If I change chef-solo
to chef-zero
, it is omitting the same error during a 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.>"
I have already installed kitchen-opennebula gem, but I suspect this problem is nothing related to that.
What is going on?
I found out that it was a typo:
chef-solo
should be chef_solo
in the yml.
Solved.
I had another similar problem that blocked me some time try to find out why (data_bag_path
vs data_bags_path
, it should have an 's')