1.

Differentiate between “knife supermarket download “ and “knife supermarket install” command

Answer»

“Knife supermarket download” command is used to download the cookbook available in Chef Supermarket be it private or public supermarket.

The cookbooks downloaded are in the form of tar.gz files and are downloaded to the current WORKING directory. If the specified cookbook is deprecated in the Chef Supermarket the user is notified the same and provides the details of the most recent version of the non-deprecated cookbook. For eg :
knife supermarket download httpd 
downloads “httpd “cookbook from Chef Supermarket.

“knife supermarket INSTALL “ command is used to COMMUNICATE with cookbooks in public or private Chef Supermarket. The downloaded cookbooks are installed in the LOCAL git repository unlike in the case of “knife supermarket download” command.“knife supermarket install “ command does the following steps

  • A new vendor BRANCH is created for the cookbook 
  • The cookbook is downloaded in tar.gz format and then untarred and committed to the vendor branch creating a tag
  • The new branch is automatically merged with the master branch. This helps the Chef practitioner to modify the community cookbook in the master branch but still can pull down newer versions of the community cookbook available in Chef Supermarket

Hence this command allows updated upstream versions to be used without losing the local modifications done to the cookbook.



Discussion

No Comment Found