An opinionated cookbook creator.
Julia makes it easy to generate full-featured starting cookbooks, recipes, templates, etc. with testing already set up (e.g. ChefSpec).
Julia is a special type of Chef cookbook that is designed to generate code (cookbooks, recipes, templates, etc.).
Generated Cookbooks will contain:
- Rakefile with RuboCop, Foodcritic, and ChefSpec tasks.
- RSpec spec_helper.rb file set up to disallow global monkey-patching and allow focusing single tests.
- .rspec file which auto-requires spec_helper.rb in specs
- .rubocop.yml file with line length set to 100.
- InSpec set up for integration testing instead of ServerSpec
ChefDK version 0.10 or greater must already be installed.
> chef gem install chefdk-julia
Add these lines to your ~/.chef/config.rb
or ~/.chef/knife.rb
configuration file:
# Paste lines below into ~/.chef/config.rb or knife.rb
if defined?(ChefDK::CLI)
require 'chefdk/julia'
chefdk.generator_cookbook ChefDK::Julia.path
end
Once chefdk-julia is installed, you should be able to generate a cookbook with the chef generate cookbook
command:
> chef generate cookbook the_art_of_french_cooking
where 'the_art_of_french_cooking' is the name of the cookbook you want to create.
chefdk-julia: A custom cookbook generator based on ChefDK's built-in generator.
Orion Ifland, Doug Ireton
Copyright (c) 2015 Nordstrom, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.