effortless icon indicating copy to clipboard operation
effortless copied to clipboard

[scaffolding-chef-infra] Bundle Gems inside the Habitat artifact

Open fifthecho opened this issue 5 years ago • 3 comments

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 harts 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 avatar Aug 01 '19 20:08 fifthecho

@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?

TheLunaticScripter avatar Aug 01 '19 20:08 TheLunaticScripter

Any recipe is showing this behavior of trying to update from RubyGems when trying to converge.

fifthecho avatar Aug 14 '19 14:08 fifthecho

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!

gscho avatar May 13 '20 20:05 gscho