1.

Explain the difference between “knife upload” and “berkshelf upload” commands.

Answer»

The “KNIFE upload” command is used to upload the cookbooks to the Chef server. It does not help in MANAGING the cookbook dependencies. So knife command is not chosen for very complicated and large cookbooks with dependencies that in turn might be dependent on others and so on. For eg: Assume that a cookbook called “my-app” depends on community cookbook “nginx” which in turn depends on another community cookbook “ohai”. When we try to upload “my-app” to Chef Server USING the “knife upload” command, we have to make sure all other dependent cookbooks are uploaded manually to Chef Server. This problem is solved using “berkshelf upload”

Berkshelf command is similar to knife command and helps to upload cookbooks to Chef Server. But it ALSO helps in the MANAGEMENT of cookbooks outside of Chef repository. This is quite useful in case of large and complex cookbooks with lots of dependencies. “berkshelf upload” will upload all dependent cookbooks to the Chef server automatically. All the dependent cookbooks are fetched using the “berks install” command of the Berkshelf tool.



Discussion

No Comment Found