effortless
effortless copied to clipboard
[scaffolding-chef-infra] Bundle Gems inside the Habitat artifact
When running Effortless Config in a Habitat Artifact, the chef-infra
client downloads Gems from rubygems.org
are still trying to be downloaded and that download fails in an airgapped environment.
One of the benefits of using an Effortless Config is having artifacts which are immutable and easily portable as hart
s ability to be used in environments that a regular chef-infra
client is harder to use in.
Can these cookbook gems be cached when building and then referenced at runtime without the call-out to rubygems.org?
@fifthecho That is a great question/issue at this time I'm not sure, I believe the answer is yes though I'm not sure how. In order to test this can you share a cookbook or and example recipe where you see this issue?
Any recipe is showing this behavior of trying to update from RubyGems when trying to converge.
This is an interesting concept. I solved this previously by making the rubygems URL configurable so it could leverage an on-prem ruby gems mirror.
Vendoring the gems right into the package would be a much better solution but I'm not sure there is an elegant way to do that. You could look at the metadata.rb
and/or Berksfile
for the the required gems but it would be nice if the policyfile build handled this by default!