DevOps Classroom Series – 08/Sept/2020

Chef Supermarket

  • Supermarket is collection of community cookbooks
  • Developers of supermarket cookbooks follow two ways of development
    • They will ask you to include their recipes in your run_list
    • They will give some new custom resources
  • Lets use some of the popular cookbooks Refer Here

mysql cookbook from supermarket

  • Refer Here for supermarket page
  • Refer Here for the chef cookbook written and hosted in github
  • Lets create a new cookbook called as supermarketdemo
  • Lets make changes in metadata.rb and add the following statement
depends 'mysql', '~> 8.7.3'
  • Chef versioning will have the following operators
    • depends ‘mysql’, ‘= 8.7.3’
    • depends ‘mysql’, ‘< 8.7.3’
    • depends ‘mysql’, ‘> 8.7.3’
    • depends ‘mysql’, ‘~> 8.7.3’
  • Now execute berks install command
  • Berks install command will download the dependencies from supermarket into workstation generally in a folder ~/.berkshelf/cookbooks
  • Refer Here for cookbook created in class
  • We need to learn how to create custom resources in chef.
  • Lets create tomcat9 custom resource to install tomcat in ubuntu & redhat machines

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin