New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor InSpec gem #112

chris-rock opened this Issue Oct 14, 2016 · 3 comments


None yet
5 participants

chris-rock commented Oct 14, 2016

Instead of requiring Chef to install the InSpec gem, we vendor the gem into the cookbook. This allows users to update easier.

Cookbook version


@chris-rock chris-rock added this to the 2.0 milestone Oct 14, 2016

@arlimus arlimus added the ready label Oct 17, 2016

@chris-rock chris-rock removed this from the 2.0 milestone Oct 19, 2016


This comment has been minimized.


jeremymv2 commented Oct 28, 2016

The vendoring approach can be problematic for a couple of reasons that come to mind:

  • cookbook size - as of inspec 1.3.0 the size is 27MB of core libs + all deps
~/Downloads$ gem install --no-rdoc --no-ri --install-dir files/default/vendor --no-user-install inspec
~/Downloads$ du -sk files
27480   files  # 27MB
  • typically you'd manipulate ruby's $LOAD_PATH to prepend your custom vendor lib path from the cookbook; however, if certain gem libs are already present from Chef-client's lib path, the gem library from the chef-client install is ALWAYS used instead of the vendored one. This is because the chef-client already has the gem activated prior to loading/activating the one from the vendored path. I've witnessed this behavior even when manipulating $LOAD_PATH like so:
$LOAD_PATH.push *Dir[File.expand_path('../../files/default/vendor/gems/**/lib', __FILE__)]
$LOAD_PATH.unshift *Dir[File.expand_path('..', __FILE__)]

@jeremymv2 jeremymv2 referenced this issue Nov 4, 2016


adding support for alternate gem source #146

4 of 4 tasks complete

This comment has been minimized.


chris-rock commented Nov 7, 2016

As discussed with @grdnrio @jeremymv2 @alexpop:

  • We identified that at least 90% of the customers do not have their own gem repository
  • for now, we added alternative gem source: #146
  • If we are going to vendor, we should eliminate all non-required dependencies (eg. winrm or docker for train )

This comment has been minimized.


chris-rock commented Apr 26, 2017

InSpec is part of Chef 13 now. Therefore we do not need to vendor inspec anymore.

@chris-rock chris-rock closed this Apr 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment