Reputation: 983
Chef developed a Ruby gem for interacting with Artifactory that Chef cookbooks could use to download artifacts and perform other actions. I assumed it would be leveraged as a provider for resources like remote_file, however there is no example code provided, documentation on using it explicitly in Chef, or others who have taken this approach.
Upvotes: 1
Views: 1407
Reputation: 3931
Artifactory is a universal binary hosting software, and even if you don't need its various specific API compatible options (RubyGems /PyPi /Docker /etc), you can still create a "dumb" file repository that acts like a web server that can serve files anonymously or via authenticated methods.
It is also an excellent caching proxy, I often use it in front of other "dumb" file repositories like the NodeJS.org download directory for the NodeJS binary archives or other remote installers that I want to make sure I have a backup copy of any version I've used in our pipeline.
To use it for "remote_file" you can simply create a new repository called 'local-config-artifacts' and upload your files there. The really nice thing about Artifactory is it can perform the metadata calculations for you (md5/sha1/sha256/etc) and then you can enter that value in your cookbook recipe so that you can have an "idempotent" download that will only re-download if the checksum changes.
Upvotes: 1
Reputation: 3506
There is a wiki page on how to configure Chef repositories in Artifactory and how to configure your knife to install from Artifactory: https://www.jfrog.com/confluence/display/RTF/Chef+Cookbook+Repositories
Is that what you are looking for?
Upvotes: 0
Reputation: 54267
The two projects (the Artifactory gem and Chef) are not related and the former is not a cookbook. There is a a cookbook called artifact
with a custom resource for downloading from Artifactory but I'm not sure it is maintained anymore.
Upvotes: 1