Chef/Vagrant - how to point omnibus installer to an already downloaded file? -
every time vagrant destroy vagrant up vagrantfile processing goes out , fetches same old chef did last time.
config.omnibus.chef_version = :latest
how avoid downloading 34mb every single time? want restart scratch rather use vagrant provision.
i watched fetched chef from, downloaded myself to
/users/jluc/kds2/chef/vagrant/chef_11.14.6-1_amd64.deb
by commenting out chef_version directivei kinda hoping use install_url, doesn't seem happy file.
#config.omnibus.chef_version = :latest config.omnibus.install_url = '/users/jluc/kds2/chef/vagrant/chef_11.14.6-1_amd64.deb'
skipping install_url , pointing chef_version downloaded file did not either.
the doc (https://github.com/schisamo/vagrant-omnibus) says install_url should install script. how use normal install script, use downloaded file?
@peter
great. sounds work, having trouble getting to. have in install script reference in vagrantfile works vagrant ssh
#!/usr/bin/env bash dpkg --install /vagrant/chef_11.14.6-1_amd64.deb
but not vagrantfile:
config.omnibus.install_url = '/vagrant/utilities/chefinstall.sh'
the vagrant-omnibus plugin allows give script install chef. if put chef install folder vagrantfile is, point install script looks like:
#!/usr/bin/env bash dpkg --install /vagrant/chef_11.14.6-1_amd64.deb
put in same folder vagrantfile. in vagranfile:
config.omnibus.chef_version = '11.14.6' config.omnibus.install_url = './chefinstall.sh'
that should work. it's clever enough it'll check version of chef installed on box, , run script if that's missing.
you use vagrant cachier plugin, won't have download everytime, newest version of omnibus plugin hooks cache:
config.omnibus.cache_packages = true
so if main concern having download repeatably, check out vagrant-cachier
Comments
Post a Comment