I am using Chef to create a customized cookbook for the ELK stack.
I found an ELK stack cookbook in the Chef supermarket and I'm trying to download it as a dependency using Berkshelf.
My Berksfile
contains:
source 'https://supermarket.chef.io'
metadata
cookbook 'elkstack', '~> 6.0.4'
And metadata.rb
:
name 'myelkstack'
maintainer 'YOUR_COMPANY_NAME'
maintainer_email 'YOUR_EMAIL'
license 'All rights reserved'
description 'Installs/Configures cmselkstack'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
depends 'elkstack'
I intend to run this cookbook locally so I'm using berks vendor
instead of berks install
. When I run berks vendor
I expect the dependencies to be downloaded, however it hangs:
$ berks vendor /home/pviana/berks
Resolving cookbook dependencies...
Fetching 'cmselk' from source at .
Fetching cookbook index from https://supermarket.chef.io...
However, if I run knife cookbook site download elkstack
, it works perfectly and downloads v6.0.4. Also, if I change the cookbook from elkstack
to another cookbook (and the appropriate version), the command works and all the dependencies are downloaded.
Is it possible that I'm missing something?
Thanks.
The cookbook I was trying to build is very complex (elkstack) and requires the user to manually edit Berksfile
before running berks vendor
. This hanging behavior is expected by default unless the dependencies are carefully worked out.