Skip to content

Instantly share code, notes, and snippets.

@kmf
Forked from erichelgeson/.kitchen.local.yml
Created June 22, 2017 14:03
Show Gist options
  • Save kmf/e148ecc5f38dedd890beb70676123a26 to your computer and use it in GitHub Desktop.
Save kmf/e148ecc5f38dedd890beb70676123a26 to your computer and use it in GitHub Desktop.
kitchen.local.yml cache chef package (simple)
driver:
synced_folders: [
["./chef-installer", "/tmp/chef-installer"]
]
provisioner:
chef_omnibus_url: file:///tmp/chef-installer/install.sh # curl can accept a local file:// url

Very simple .kitchen.local.yml that syncs a folder with your package in it (in this case it's just RPM, but script could be made smarter) and runs the package command to install.

Will save hours of your life and some S3 billing for Chef Inc.

Assumes you have a folder in your cookbooks dir called chef-installer with your packages and install.sh in.

TODO:

  • Make this work with a global .kitchen.local.yml with ~/.chef-insallers or something.
# Stub install.sh
# TODO: make this smarter, though works
# sudo dpkg etc.
sudo rpm -ivh /tmp/chef-installer/chef-11.12.8-1.el6.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment