Last active
August 29, 2015 14:04
-
-
Save charlesjohnson/80ccb7c87fedfa3324e5 to your computer and use it in GitHub Desktop.
Trying to use custom generator cookbooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ Development chef generate cookbook --generator-cookbook ~/Development/code_generator/ testcookbook | |
[2014-07-22T09:57:58-07:00] WARN: found a directory files in the cookbook path, but it contains no cookbook files. skipping. | |
[2014-07-22T09:57:58-07:00] WARN: found a directory templates in the cookbook path, but it contains no cookbook files. skipping. | |
Compiling Cookbooks... | |
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize': Cookbook code_generator not found. If you're loading code_generator from another cookbook, make sure you configure the dependency in your metadata (Chef::Exceptions::CookbookNotFound) | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `yield' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `default' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `default' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:277:in `[]' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:277:in `each_cookbook_dep' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:255:in `add_cookbook_with_deps' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:88:in `block in cookbook_order' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:86:in `each' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:86:in `cookbook_order' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context.rb:89:in `load' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/chef_runner.rb:40:in `run_context' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/chef_runner.rb:36:in `converge' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/command/generator_commands.rb:207:in `run' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/command/generate.rb:71:in `run' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/command/base.rb:57:in `run_with_default_options' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/cli.rb:66:in `run' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/bin/chef:25:in `<top (required)>' | |
from /opt/chefdk/embedded/bin/chef:23:in `load' | |
from /opt/chefdk/embedded/bin/chef:23:in `<main>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef generate cookbook --generator-cookbook ~/Development/custom_generator/ testcookbook | |
[2014-07-22T09:24:24-07:00] WARN: found a directory files in the cookbook path, but it contains no cookbook files. skipping. | |
[2014-07-22T09:24:24-07:00] WARN: found a directory templates in the cookbook path, but it contains no cookbook files. skipping. | |
Compiling Cookbooks... | |
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize': Cookbook code_generator not found. If you're loading code_generator from another cookbook, make sure you configure the dependency in your metadata (Chef::Exceptions::CookbookNotFound) | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `yield' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `default' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ohai-7.2.0.rc.2/lib/ohai/mash.rb:77:in `default' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:277:in `[]' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:277:in `each_cookbook_dep' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:255:in `add_cookbook_with_deps' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:88:in `block in cookbook_order' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:86:in `each' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:86:in `cookbook_order' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/run_context.rb:89:in `load' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-11.14.0.rc.2/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/chef_runner.rb:40:in `run_context' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/chef_runner.rb:36:in `converge' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/command/generator_commands.rb:207:in `run' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/command/generate.rb:71:in `run' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/command/base.rb:57:in `run_with_default_options' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/lib/chef-dk/cli.rb:66:in `run' | |
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.2.0/bin/chef:25:in `<top (required)>' | |
from /opt/chefdk/embedded/bin/chef:23:in `load' | |
from /opt/chefdk/embedded/bin/chef:23:in `<main>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ Development tree custom_generator | |
custom_generator | |
├── files | |
│ └── default | |
│ ├── Berksfile | |
│ ├── chefignore | |
│ ├── converge_spec.rb | |
│ ├── gitignore | |
│ └── spec_helper.rb | |
├── metadata.rb | |
├── recipes | |
│ ├── app.rb | |
│ ├── attribute.rb | |
│ ├── cookbook.rb | |
│ ├── cookbook_file.rb | |
│ ├── lwrp.rb | |
│ ├── recipe.rb | |
│ └── template.rb | |
└── templates | |
└── default | |
├── README.md.erb | |
├── attribute.rb.erb | |
├── cookbook_file.erb | |
├── default_recipe.rb.erb | |
├── kitchen.yml.erb | |
├── metadata.rb.erb | |
├── provider.rb.erb | |
├── recipe.rb.erb | |
├── resource.rb.erb | |
└── template.erb | |
5 directories, 23 files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you been able to fix this?