I am using chef version 11.16.4 and packer v 0.7.1 with docker v1.3.0
I am having trouble getting chef-solo to run the chef-solo provisioner after it installs chef-solo.
I am getting the following error:
ERROR: Unable to determine node name: configure node_name or configure the system's hostname and fqdn
I poked around on the internet trying to figure what was happening, and this error seems rare since node_name is usually given a default value by the system, or is assigned in solo.rb, which seemed to me can not be overwritten directly in the packer config template.
Am I doing something wrong with my packer config or is this an incompatiblity issue between chef-solo and docker provisioning?
I am using the following packer config:
{
"variables": {
"version": "",
"base-image-version": ""
},
"builders":[{
"type": "docker",
"image": "centos:latest",
"pull": true,
"export_path": "zookeeper-base-{{user `version`}}.tar"
}],
"provisioners":[
{
"type": "chef-solo",
"cookbook_paths": ["../chef-simple/cookbooks"],
"install_command":"curl -L https://www.opscode.com/chef/install.sh | bash",
"execute_command":"chef-solo --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
"run_list":["recipe[zookeeper::install]"],
"json":{"node_name":"zookeeper-box","env_name":"dev","ip":"10.10.10.10"},
"prevent_sudo":true
}],
"post-processors": [{
"type": "docker-import",
"repository": "ed-sullivan/zookeeper-base",
"tag": "{{user `version`}}"
}]
}