Closed torson closed 5 years ago
chef forked it and renamed the gem to chef-sugar-ng
so the cookbook needs to be updated to point to the new fork.
Thanks, I've solved it for myself. The gem got renamed, but not the cookbook name itself. The Chef guys resolved it in a way you don't need to change anything I think if you're running Chef v13 or above. I'm still using Chef v12 and fortunately they've migrated also version 4.2.2 that supports it, so I've pulled down the elasticsearch cookbook and set the version to 4.2.2 in its metadata.rb and in Chef environment file.
@torson would you mind sharing the changes you did to the cookbook? I ran into same issue and I am trying to sort it out. Thanks!
@andresp99999 do these steps:
download the elasticsearch cookbook and make this modification in metadata.rb
depends 'chef-sugar', '= 4.2.2'
upload elasticsearch cookbook to your Chef server
knife cookbook upload elasticsearch
add the same line to your project Berksfile
fetch the cookbook and upload it to Chef server
berks update chef-sugar
berks install
berks upload
set version in project environment/*.json files, inside variable cookbook_versions :
"chef-sugar": "= 4.2.2"
upload environment files
for file in environments/* ; do knife environment from file $file ; done
At this point it started working for me, Chef client pulled chef-sugar cookbook v4.2.2 which then installed chef-sugar-ng gem v4.2.2 . I am using an old version of this elasticsearch cookbook - v2.0.1 , though I don't think that makes any difference regarding cookbook/gem versioning.
@torson, this helps. Thanks a lot!
This cookbook relies on chef-sugar, but chef-sugar was removed by the author due to personal reasons: https://github.com/sethvargo/chef-sugar/ Is there an easy fix for this?