0
votes

I am trying to install custom cookbook on opwswork. SO I cloned the FFMPEG COOKBOOK in to my repository and executed the update cookbooks and then executed the ffmpeg recipe with the command ffmpeg::package. But I am always getting error as below

[Wed, 09 Oct 2013 10:49:29 +0000] DEBUG: Loading Recipe ffmpeg::package via include_recipe [Wed, 09 Oct 2013 10:49:29 +0000] ERROR: Caught exception during execution of custom recipe: ffmpeg::package: Chef::Exceptions::CookbookNotFound - Cookbook ffmpeg not found - /opt/aws/opsworks/releases/20130926122929_138/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/cookbook/cookbook_collection.rb:38:in initialize' /opt/aws/opsworks/releases/20130926122929_138/vendor/bundle/ruby/1.8/gems/ohai-6.16.0/lib/ohai/mash.rb:77:incall' /opt/aws/opsworks/releases/20130926122929_138/vendor/bundle/ruby/1.8/gems/ohai-6.16.0/lib/ohai/mash.rb:77:in `default'

3
from what I understand, it seems like you have not registered the cookbook in the VagrantfileVinh Tran
Did you find a solution to this problem? Please don't forget to mark an answer as correct! :)sethvargo

3 Answers

1
votes

It looks like OpsWorks isn't finding your cookbook in your repository.

What does your cookbook repository look like? Opsworks only looks at one repo and all of your cookbooks need to be subfolders of that repo, for example.

cookbooks <-- repo root
 -nginx    <--cookbook
  --attributes
  --definitions
  --files
  --recipes
  --templates
 -ffmpeg   <--cookbook
  --attributes
  --libraries
  --recipes
  --templates

I find it easiest to have chef installed on my local machine and use a full chef-repo and create a separate git repo in my cookbooks folder. This way I can use knife to download my cookbooks.

knife cookbook site download ffmpeg
tar -xvzf .\ffmpeg-0.2.1.tar.gz -C .\cookbooks

Then I push my cookbook repository to my git server (I'm using github) and run the Update Cookbooks command.

It all also depend on which step you have included your ffmpeg recipe the OpsWorks docs will explain it much better than I can. http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-executing.html

0
votes

You need to upload that cookbook to your repository, to be sure

knife cookbook upload --all

double check if your coookbook (ffmeg) is already uploaded

knife cookbook list

though you download the source or your "site install" the coookbook you still need to upload it

0
votes

Look in the Deploy section to verify that the "update_custom_cookbooks" was successful.

I've had issues in the past where the cookbooks never updated.

The best solution to this problem is to start a new instance to verify that the recipes are running correctly. New instances will use the new cookbooks.