Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

chef generate cookbook: documentation on customizing output #62

Closed
andrewhavens opened this issue Jun 3, 2014 · 4 comments
Closed

chef generate cookbook: documentation on customizing output #62

andrewhavens opened this issue Jun 3, 2014 · 4 comments
Labels
Aspect: Documentation How do we use this project?

Comments

@andrewhavens
Copy link

Hello,

I'm trying to find some documentation on what the chef generate cookbook command does and how you are supposed to customize it. The readme only mentions that it generates a cookbook (which is kind of obvious). There was a conversation started at test-kitchen/test-kitchen#425 which led us to believe that ChefDK was designed to allow us to customize the cookbook generator so that our .kitchen.yml file could be generated to our liking. How can we customize the generator and where can I find more documentation about this?

@sersut
Copy link

sersut commented Jun 3, 2014

We have an unreleased change that makes this custimization possible @andrewhavens.

https://github.com/opscode/chef-dk/blob/master/CHANGELOG.md#added-option-to-generate-subcommand

We definitely should have more documentation about this. Can you check out if this fulfills the need for you guys?

@andrewhavens
Copy link
Author

Yes, that looks like the feature I am asking about. From what I understand, it looks like it provides the ability to specify a path to a directory to use as the template. It's unfortunate that the name of the option is --generator-cookbook, and that the default is code_generator, and that the name applies to more than just the cookbook generator. It will definitely require some documentation because that naming is not very intuitive.

@sersut
Copy link

sersut commented Jun 3, 2014

Thanks for the note @andrewhavens. The reason why it's called generator-cookbook is because you need to write a cookbook in order to customize a generator.

Basically this option gives you the ability to generate anything you want with a custom cookbook since the generator infrastructure utilizes Chef under the cover to generate things.

@danielsdeleo
Copy link
Contributor

We recently fixed the behavior of --generator-cookbook so it expects the full path to the cookbook (but is compatible with the code_generator thing from before).

The option is documented here: http://docs.chef.io/ctl_chef.html#chef-generate-app so I'm going to close this. If you have ideas to improve that documentation, file an issue on https://github.com/chef/chef-docs and our documentation writer will have a look.

A pull request to document the option in the README would also be welcomed.

Thanks

@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
@tas50 tas50 added Aspect: Documentation How do we use this project? and removed Type: Documentation labels Jan 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Aspect: Documentation How do we use this project?
Development

No branches or pull requests

5 participants