Skip to content

chrisroberts/berkshelf_ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Berkshelf Ext

Berkshelf extensions to add features to berkshelf.

Usage

Via Bundler

If using via bundler, just add an entry in the Gemfile:

gem 'berkshelf_ext'

and it will auto inject itself.

Direct

Since bundler does some special loading that rubygems proper does not, we can't auto-inject ourselves in. Instead, just call the custom executable:

berks_ext

Which will add the extensions to berkshelf, and then initialize it as usual.

Current extensions

These extensions are auto loaded by default.

  • Resolution via nested berksfiles (nested_berksfiles)[1]
  • Proper berksfile path when loading berksfiles (berksfile_loader_context)[2]
  • Proper dependency resolution (dependency_chains)[3]
  • Do not include recommends entries in cookbook dependencies (non_recommends_depends)

Prevent extension loading

You can explicitly define what is allowed or not allowed to load via environment variables

  • BERKSHELF_EXT_EXCEPT="nested_berksfiles"
  • BERKSHELF_EXT_ONLY="nested_berksfiles,berksfile_loader_context"

Current addons

Addons are extensions that must be explicitly enabled via environment variable:

  • BERKSHELF_EXT_ADDONS="knife_uploader"

It is important to note that these addons will generally make use of Chef internals to do things.

Available addons

  • Knife based cookbook uploading (disables Ridley)[4]
  • Faster dependency resolution via faster cached cookbook handling (fast_resolution)

Load all the things!

If you want to just load everything that is available without explicitly defining all the addons, just set the everything env variable:

  • BERKSHELF_EXT_EVERYTHING="true"

References

  1. berkshelf/berkshelf#304
  2. berkshelf/berkshelf#304
  3. berkshelf/berkshelf#302
  4. berkshelf/berkshelf#291

Contributors

Info

About

Extensions for berkshelf

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages