Manually package Chef cookbooks for use in Artifactory/Supermarket

#1

We have a specific need in our environment to manually package a chef cookbook for eventual publishing to an internally hosted Supermarket site, however we can't use the standard publishing commands to do so (internal requirement). Thus, is there a way to pre-package a Chef cookbook for a Supermarket repository, including all of the required metadata such as version and dependency data, without actually publishing the cookbook? The commands that we see available all seem to include this packaging and publishing step in one go, with no ability to redirect the packaged artifact to the file system instead of uploading/publishing it directly.

Is this possible and does anyone know how one would go about doing this?

0 Likes

#2

The answer is.... not with a Supermarket setup. You have to publish it, somehow, for people to load it onto a Chef server or even load it into a chef-zero setup.

The simpler approach is to use a git repo and upload the git tags containing the cookbook directly to the Chef server. In my experience, there is really no point to an internal Supermarket, except to provide a locked mirror of upstream cookbooks. Uploading internal cookbooks can be done directly to the Chef server.

0 Likes