Hi Chris,

here is a slightly different approach: instread of using packer to create a
new vagrant basebox, you could simply export the virtualbox .ova file after
vagrant up.

Example here:
https://github.com/tknerr/linus-kitchen#packaging

I use this method to build a full .ova image for each major release of my
automated developer VMs. This keeps vagrant out of the way for developers
(in some cases you may really want that), and they simply get a plain VM
image.

Updates are handled from within the VM (there is a `update-vm` command
which pulls from the repo and applies the chef recipes), see here:
https://github.com/tknerr/linus-kitchen#updating-linus-kitchen

If you want updateability and idempotence, I would really recommend to get
started with a configuration management tool like Ansible or Chef. The
learning curve will pay out very quickly if you are automating
infrastructure

HTH,
Torben



On Tue, Nov 8, 2016 at 8:17 PM, Alvaro Miranda Aguilera <kiki...@gmail.com>
wrote:

> packer.io can help to build base boxes.
>
> My own personal cycle goes like this.
>
> start with a basic Vagrant file.
> add a provision script. (ensure its idempotent, so you can run it twice
> with no negative issues)
> Split in to 2 the script one for pre-requirement and other for run time.
> Once the pre-requirement script is complete, create a base box with packer
> using this script
> update Vagrantfile to use this new box
>
> then if you need update the scripts, or vagrant file, you can just do it,
> test with Vagrant provision, and if all good, rebuild the base box.
>
> The packer project can go to a separate git repo, and the Vagrantfile can
> be included with the application.
>
> Alvaro
>
> On Mon, Nov 7, 2016 at 9:56 PM, Chris Saunders <slaphead...@gmail.com>
> wrote:
>
>> Hello all,
>>
>> I have my own opinions but I'd like to know what the recommended way is
>> when working with Vagrant on a team of developers. There appear to be two
>> ways:
>>
>> 1. Every developer builds from a common Vagrantfile (typically embedded
>> in source control). Changes to the vagrant instance are released as changes
>> to the Vagrantfile (then requiring a destroy and build).
>>
>> 2. Every developer consumes a box that has been built and verified
>> (typically published by specialists/architects).
>>
>>    1. Minimal effort required by consumers. No build required. Just
>>    re-download box for updates.
>>    2. Further reduced risk of "it worked on my machine" - everyone uses
>>    the exact instance that the specialist built and verified.
>>    3. Less need for setup scripts*
>>
>> * Some people seem to feel safe with scripts i.e. "BASH scripts can
>> automate a lot of the build for developers and ensure consistency". I
>> wouldn't put my trust in a script to ensure standardized environments over
>> sharing a build (no scripts required!!!!).
>>
>> What do you think?
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/vagrant/issues
>> IRC: #vagrant on Freenode
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Vagrant" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vagrant-up+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/vagrant-up/3a2bb442-39f2-43f0-b339-311ee9709e40%40googlegroups.com
>> <https://groups.google.com/d/msgid/vagrant-up/3a2bb442-39f2-43f0-b339-311ee9709e40%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Alvaro
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/CAHqq0eyxspqGpnfWpN9Rm2dEnR0y3r2%3DjVxSMT5t%2BD-R-swJVQ%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyxspqGpnfWpN9Rm2dEnR0y3r2%3DjVxSMT5t%2BD-R-swJVQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CACN%2Ba_ZD_usgJ2UyyUy%2BzPzT%3DCGoijfZSEXLKyM84KYkyggrtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to