Information Technology Reference
In-Depth Information
Your First Cookbook: Message of the Day (Chef Client)
You'll be using a tool called knife to generate an initial cookbook directory structure for the
message of the day cookbook (motd). knife is a basic utility command for working with
Chef that you installed with Chef Client. On a command line, run the knife cookbook
create subcommand to create the cookbook directory scaffolding. knife will create a main
directory for your cookbook called motd as part of the process:
$ knife cookbook create motd --cookbook-path .
WARNING: No knife configuration file found
** Creating cookbook motd
** Creating README for cookbook: motd
** Creating CHANGELOG for cookbook: motd
** Creating metadata for cookbook: motd
Next, overlay all the files needed for your cookbook to enable Test Kitchen support, just like
you did in Chapter 5 :
$ cd motd
$ kitchen init --create-gemfile
create .kitchen.yml
create test/integration/default
create Gemfile
append Gemfile
append Gemfile
You must run `bundle install' to fetch any new gems.
Run bundle install to handle the extra Ruby dependencies:
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using mixlib-shellout (1.4.0)
Using net-ssh (2.9.1)
Using net-scp (1.2.1)
Using safe_yaml (1.0.3)
Using thor (0.19.1)
Using test-kitchen (1.2.1)
Installing kitchen-vagrant (0.15.0)
Using bundler (1.5.3)
Search WWH ::




Custom Search