Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

cafe (5) Versions 2.0.0

Installs/Configures cafe

Policyfile
Berkshelf
Knife
cookbook 'cafe', '~> 2.0.0', :supermarket
cookbook 'cafe', '~> 2.0.0'
knife supermarket install cafe
knife supermarket download cafe
README
Dependencies
Quality 17%

cafe

This cookbook installs and configures cafe, an application that exists to make running Chef more delightful.

It has been tested on Windows 2008, 2012, and 2016 and will update the latest version of cafe.

Recipes

I recommend managing cafe through the custom resources in the cookbook. However, if you want to use the default recipe and the cookbook attributes to keep cafe up and running, you may.

The attributes that are important are all under the cafe subheading:

Attribute Description
chef_interval How often (in seconds) you want to run chef
port which port you want to use to run cafe on
install_root which drive you want cafe and chef installed on
version the cafe version you want installed
version_github the cafe github version you want installed

Resources

cafe resource

To install and configure Cafe, you should use the cafe resource, for example:

cafe 'cafe' do
  download_source 'https://github.com/mhedgpeth/cafe/releases/download/0.9.2-beta/cafe-win10-x64-0.9.2.0.zip'
  download_checksum '75707978E48B51EC9564D209A9B6CA8F4B563AC4B128C34614435899FAD787C7'
  version '0.9.2.0'
  installer 'cafe-win10-x64-0.9.2.0.zip'
  cafe_install_root 'D:'
  chef_interval 1800
  service_port 59320
end

See the Cafe Releases page to get the download_source, version, and installer that you need to use. You'll have to calculate your own checksum at the moment. The last three properties are configuration elements of Cafe itself; if you omit them, the resource will use sensible default values.

You should also notice that this resource is very friendly to air-gapped environments; you can use any URL you need to use here, as long as you get it downloaded and it matches the checksum. We use artifactory for our artifacts and love it.

If you are introducing Cafe to existing Chef nodes because you want to manage Chef that way now, and your cafe_install_root is set to D:, it will dutifully install Cafe for the first time in D:\chef. On an upgrade, the cafe service asks its cafe Updater service friend to update cafe for it, because services can't update themselves. This all happens after the Chef run is finished, assuming that Cafe is running Chef.

cafe_chef resource

You'll also want to keep the chef-client application up to date and consistent on all of your nodes. You'll want to make sure you do this when Chef is not running as well. Fortunately, Cafe has you covered in this regard. Simply declare what you want Chef to look like on the machine, and Cafe handles the rest:

cafe_chef 'chef-client' do
  download_source 'https://packages.chef.io/files/stable/chef/13.0.118/windows/2012r2/chef-client-13.0.118-1-x64.msi'
  installer 'chef-client-13.0.118-1-x64.msi'
  download_checksum 'c594965648e20a2339d6f33d236b4e3e22b2be6916cceb1b0f338c74378c03da'
  version '13.0.118'
  cafe_install_root 'D:'
end

As with the scenario above, you can use any source you want from a private repository like artifactory. This is the equivalent of running cafe chef download 13.0.118 and then cafe install chef 13.0.118 but gives you more control to download the file.

Also, you can omit the cafe_install_root if you want to install everything on C:.

It's important to understand what exactly is happening here, because this is at the genesis of why Cafe exists. You would expect Cafe to be running Chef at this moment, so you don't want it to upgrade Chef immediately. So here we're not upgrading Chef, we're requesting that Cafe upgrade Chef after the Chef client runs. The desired state of the system is "I want Cafe to make the Chef client be on version 13.0.118". Cafe handles the rest!

So you don't need to worry about timing here. Cafe runs all of its jobs sequentially because it knows that you don't want things stepping on other things. So sleep peacefully, my friend!

Dependent cookbooks

vcruntime >= 0.0.0
windows >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

2.0.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

2.0.0 failed this metric

FC066: Ensure chef_version is set in metadata: cafe/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

2.0.0 passed this metric

Testing File Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number