if metadata.rb is present, and it specifies a different name than
the cookbook archive filename, which is the name considered by
cookbook dependency resolution alg during a chef-run?
Assume metadata.rb is required. I am not 100% sure if Chef can operate
without one in the cookbook, but you should set up a commit hook so that it
forces the metadata.rb file to exist.
The name is metadata.rb is respected. All dependency resolvers should
unpack the cookbooks and parse the metadata file to find the name.
For an example check out "cookbook-elasticsearch".
The name in metadata.rb is "elasticsearch" and that is how it is referred
to internally.
if metadata.rb is present, and it specifies a different name than
the cookbook archive filename, which is the name considered by
cookbook dependency resolution alg during a chef-run?
In fact, I believe the cookbook name in metadata.rb is actually honored
over the directory name...
On Fri, Oct 11, 2013 at 8:08 AM, Andrew Gross andrew@yipit.com wrote:
Assume metadata.rb is required. I am not 100% sure if Chef can operate
without one in the cookbook, but you should set up a commit hook so that it
forces the metadata.rb file to exist.
The name is metadata.rb is respected. All dependency resolvers should
unpack the cookbooks and parse the metadata file to find the name.
For an example check out "cookbook-elasticsearch".
if metadata.rb is present, and it specifies a different name than
the cookbook archive filename, which is the name considered by
cookbook dependency resolution alg during a chef-run?
Thanks, I asked this because I'm seeing all kinds of community
content. For example cookbook 'subversion' got a name attribute in
metadata.rb only 11 months ago.
In fact, I believe the cookbook name in metadata.rb is actually honored over
the directory name...
On Fri, Oct 11, 2013 at 8:08 AM, Andrew Gross andrew@yipit.com wrote:
Assume metadata.rb is required. I am not 100% sure if Chef can operate
without one in the cookbook, but you should set up a commit hook so that it
forces the metadata.rb file to exist.
The name is metadata.rb is respected. All dependency resolvers should
unpack the cookbooks and parse the metadata file to find the name.
For an example check out "cookbook-elasticsearch".
if metadata.rb is present, and it specifies a different name than
the cookbook archive filename, which is the name considered by
cookbook dependency resolution alg during a chef-run?
In case it helps anyone, here is a test using chef-solo that shows
that the name in metadata.rb is not used by chef-solo, as opposed to
the name of the cookbook folder. This is true also for naming
dependencies, use the cookbook root folder and not the name in
metadata.
This seems to contradict the specs.
[root@localhost cookbooks]# chef-solo --version
Chef: 11.4.4
[root@localhost cookbooks]# ls -l | grep test
drwxr-xr-x 7 root root 4096 Oct 22 04:55 test_compliance
[root@localhost cookbooks]# cat test_compliance/metadata.rb
version "1.0"
supports 'windows'
name 'fake_name'
[root@localhost cookbooks]# chef-solo -o fake_name::echo
Starting Chef Client, version 11.4.4
[2013-10-22T04:58:39+00:00] WARN: Run List override has been provided.
[2013-10-22T04:58:39+00:00] WARN: Original Run List:
[2013-10-22T04:58:39+00:00] WARN: Overridden Run List: [recipe[fake_name::echo]]
Compiling Cookbooks...
[2013-10-22T04:58:39+00:00] ERROR: Running exception handlers
[2013-10-22T04:58:39+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-10-22T04:58:39+00:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2013-10-22T04:58:39+00:00] FATAL: Chef::Exceptions::CookbookNotFound:
Cookbook fake_name not found. If you're loading fake_name from another
cookbook, make sure you configure the dependency in your metadata
Thanks, I asked this because I'm seeing all kinds of community
content. For example cookbook 'subversion' got a name attribute in
metadata.rb only 11 months ago.
In fact, I believe the cookbook name in metadata.rb is actually honored over
the directory name...
On Fri, Oct 11, 2013 at 8:08 AM, Andrew Gross andrew@yipit.com wrote:
Assume metadata.rb is required. I am not 100% sure if Chef can operate
without one in the cookbook, but you should set up a commit hook so that it
forces the metadata.rb file to exist.
The name is metadata.rb is respected. All dependency resolvers should
unpack the cookbooks and parse the metadata file to find the name.
For an example check out "cookbook-elasticsearch".
if metadata.rb is present, and it specifies a different name than
the cookbook archive filename, which is the name considered by
cookbook dependency resolution alg during a chef-run?
In case it helps anyone, here is a test using chef-solo that shows
that the name in metadata.rb is not used by chef-solo, as opposed to
the name of the cookbook folder. This is true also for naming
dependencies, use the cookbook root folder and not the name in
metadata.
This seems to contradict the specs.
[root@localhost cookbooks]# chef-solo --version
Chef: 11.4.4
[root@localhost cookbooks]# ls -l | grep test
drwxr-xr-x 7 root root 4096 Oct 22 04:55 test_compliance
[root@localhost cookbooks]# cat test_compliance/metadata.rb
version "1.0"
supports 'windows'
name 'fake_name'
[root@localhost cookbooks]# chef-solo -o fake_name::echo
Starting Chef Client, version 11.4.4
[2013-10-22T04:58:39+00:00] WARN: Run List override has been provided.
[2013-10-22T04:58:39+00:00] WARN: Original Run List:
[2013-10-22T04:58:39+00:00] WARN: Overridden Run List:
[recipe[fake_name::echo]]
Compiling Cookbooks...
[2013-10-22T04:58:39+00:00] ERROR: Running exception handlers
[2013-10-22T04:58:39+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-10-22T04:58:39+00:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2013-10-22T04:58:39+00:00] FATAL: Chef::Exceptions::CookbookNotFound:
Cookbook fake_name not found. If you're loading fake_name from another
cookbook, make sure you configure the dependency in your metadata
Thanks, I asked this because I'm seeing all kinds of community
content. For example cookbook 'subversion' got a name attribute in
metadata.rb only 11 months ago.
In fact, I believe the cookbook name in metadata.rb is actually honored
over
the directory name...
On Fri, Oct 11, 2013 at 8:08 AM, Andrew Gross andrew@yipit.com wrote:
Assume metadata.rb is required. I am not 100% sure if Chef can
operate
without one in the cookbook, but you should set up a commit hook so
that it
forces the metadata.rb file to exist.
The name is metadata.rb is respected. All dependency resolvers
should
unpack the cookbooks and parse the metadata file to find the name.
For an example check out "cookbook-elasticsearch".
if metadata.rb is present, and it specifies a different name than
the cookbook archive filename, which is the name considered by
cookbook dependency resolution alg during a chef-run?