macOS ◆ xterm ◆ zsh 3135 views

By customizing a ChefDK generator you can manipulate how you create new cookbooks and build_cookbooks within your enterprise.

In this example we are going to create a custom generator called enterprise_generator that will create a custom build_cookbook that will have a dependency on our own implementation of the delivery-truck build_cookbook for “Cookbook Workflow” called enterprise_delivery_truck instead of the default. (https://github.com/chef-cookbooks/delivery-truck)

NOTE: The enterprise_delivery_truck build_cookbook was previously created.

           You can find it at: https://github.com/afiune/enterprise_delivery_truck

We also can customize the .delivery/config.json to do a few things automatically:

  • Upload the cookbook to the Chef Server
  • Share our cookbook to our Private Supermarket
  • And finally skip a few phases that we are not using at this point.