I am a beginner in Chef and AWS OpsWorks. I was trying to experiment with custom recipes. I created a git repository having a directory test_cookbook, and configured chef to get cookbooks from it. Inside that, I created files like below;
test_cookbook
|_metadata.rb
|_recipes
|_testrecipe.rb
below is the content of metadata.rb
depends 'magic_shell'
magic_shell is an open cookbook and is available in chef supermarket https://supermarket.chef.io/cookbooks/magic_shell
While I try to execute the testrecipe, I am getting below error;
[2021-01-12T09:52:23+00:00] INFO: HTTP Request Returned 412 Precondition Failed: No such cookbook: magic_shell
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: magic_shell
Can somebody tell me why this is happening and how to fix this?
The dependency is not packaged.
As per the documentation
OR pull the dependency using Berksfile and push them to your git source.
For example, I have a dependency for opsworks_helpers in metadata.rb
and my current directory structure is like this