berkshelf / vagrant-berkshelf

A Vagrant plugin to add Berkshelf integration to the Chef provisioners
Other
379 stars 100 forks source link

Provision update cookbooks for rsync providers #281

Open yoshiwaan opened 9 years ago

yoshiwaan commented 9 years ago

Hi,

We use Amazon Linux on AWS and thus do not have an image to use in a local Virtualbox provider. I'm using the vagrant-aws plug-in to spool up Amazon Linux EC2 instances with vagrant instead, which is a little slower but does the job.

The problem I'm having is that vagrant provision isn't updating the shelf on the remote system, meaning I have to destroy and up my instance every time I make a change. The reason for this is that when using a local provider the shelf for that instance is mounted on the Vagrant box and vagrant provision updates the local shelf. With vagrant-aws the shelf is rsynced on initial up but not again when vagrant provision is run.

I'm not sure if the solution needs to come from this plug-in or vagrant-aws, or a collaboration of both, but there seems to be no activity on the vagrant-aws plug-in so I was hoping something could be done here.

yoshiwaan commented 9 years ago

I'm not sure if it's an option but adding a hook to sync the shelf to the node via rsync after the berkshelf hook runs would fix the problem. The /vagrant directory rsyncs when running provision (when using vagrant-aws at least) so there must be some way of determining if the directory is a mount or rsync.