I'm quite a newbie on Chef and I'm trying to do the first steps, so sorry for the simply question and for mistakes..
I've followed the official tutorial so I've concepts quite clear and I've seen how to build a cookbook, how to check using kitchen converge and how to upload it on Chef Server.
Now I'd like to build a simple cookbook that use the tomcat cookbook downloaded from chef supermarket.
I havent'd found a tutorial / examples for this so, you know something that could be useful please give me the link.
What I've tried to do:
- my cookbook name is
test
and I've generated it usingchef generate cookbook test
- I've modified the
kitchen.yml
file for my target platform that is CentOS 7 so- name: centos-7
- I've created my kitchen instance with the command
kitchen create
and then the commandkitchen converge
- tested if my SSH connection is working with the command
kitchen exec .c whoami
- all work fine untill now
- I've seen that on Chef supermarket there is a cookbook named
tomcat
(ref. https://supermarket.chef.io/cookbooks/tomcat) - I've modified
Berksfile
in this way
source 'https://supermarket.chef.io' metadata cookbook 'tomcat'
Then I've modified metadata.rb
adding depends 'tomcat', '~> 3.0.0'
Now, how have I to modify my default.rb
recipe (or other files ...), to obtain a working cookbook?