This is ultimately about what is best for your workflow as both options are completely valid.
A major pro for option A is that it's what Vagrant recommends and as such it's super popular and (I would imagine) the most common use case in the wild largely due to how teams/developers develop on their individual machines. I use something closer to option B for running tests in Travis-CI but not development. On Monday, July 20, 2020 at 1:31:27 PM UTC-4, jason.wi...@gmail.com wrote: > > Heya. Thank you for your input. I spent a good amount of time testing this > over over the weekend and came up with the following. Be curious to hear > others thoughts: > 1. Use Packer to build a 'clean' image for whichever provider (Vmware, > virtualbox, GCE, AWS, Azure etc.) > 2. I pass that to Vagrant. > 3. Import the packer box with Vagrant. > 4. Using Vagrant now, I see two options. > a. One, I can use ansible within vagrant as my provisioner, to call > Ansible, do some stuff to the OS, install packages, setup etc. > or. > b. On the host box, I could call ansible directly, specify a inventorry > file with the virtualbox VM's, and call whichever playbooks I want. > > Does that seem about on par? > I can so pros and cons to both. > Much appreciated! > > > > > On Wednesday, July 15, 2020 at 2:00:13 PM UTC-7 dnmo...@gmail.com wrote: > >> Think of it like this. >> >> To test/use your Image locally: >> >> Vagrant => Creates a VM and Runs Ansible* => Provisions the Virtualbox >> in the exact way you want it. >> >> Virtualbox = VM Hypervisor (Could also be VMWare, Docker, etc) >> Vagrant = Programatically set up a VM with the amount of RAM, CPU, >> Networking, etc. you want >> Ansible = Set up the VM with the packages, scripts, files, users, >> permissions, etc ... you need to make your application run >> >> * I use Ansible, but as suggested by others, Salt, Chef, Puppet, CFEngine >> are all valid options as well >> >> To test/use your Image in the cloud or even locally: >> >> You could use Packer to create the Hypervisor Image (VMWare, Amazon EC2, >> Docker, SZure, GC, and even Vagrant) >> >> The pattern, I believe, is called the roll-up pattern where you use >> Packer to generate Machine (Hypervisor) Images for the cloud (Operating >> System, RAM, CPU, etc) and manage the OS level stuff (files, users, >> permissions, etc) with Ansible (or something like it). >> >> On Wed, Jul 15, 2020 at 12:44 AM Jason Williams <jason.wi...@gmail.com> >> wrote: >> >>> Thank you, yes. I would agree. I have am comfortable with Ansible and >>> how it works. now I just need to put it all together. >>> Per the above, i mentioned Packe ras well, not sure where that fits into >>> the flow of what I am trying. >>> >>> TY >>> >>> On Tuesday, July 14, 2020 at 3:08:32 PM UTC-7, Alexander Solla wrote: >>>> >>>> I'd say that the best practice is to pick some configuration management >>>> system like Ansible, Salt, or Puppet that Vagrant supports, and use that >>>> to >>>> keep your configuration files in version control. >>>> >>>> The idea would be to have Vagrant provision whatever system (Salt, etc) >>>> you end up using, and then have that system (Salt, etc) provision the >>>> configuration on your machine. >>>> >>>> On Tue, Jul 14, 2020 at 1:47 PM Jason Williams <jason.w...@gmail.com> >>>> wrote: >>>> >>>>> hello everyone. >>>>> I am starting to use Vagrant and Virtualbox more and more in my >>>>> testing/development work. The more I work with the two, the more ideas >>>>> and >>>>> questions I have. I was hoping for some guidance/clarification and maybe >>>>> best practices. >>>>> Let me start with what I am working on and what I have done. >>>>> >>>>> I use NGINX quite a bit for web servers, proxying and load balancing. >>>>> I have successfully setup a multi-vagrant setup using 2 servers to >>>>> serve content. Step in the right direction. >>>>> >>>>> Where my question is really at is, once I spin up my Vagrant >>>>> environment and start to do my testing, I see there are things that I >>>>> need >>>>> to change with the current boxes that I am using. >>>>> This could be things like additional software, specific configuration >>>>> file settings, copying over content etc. >>>>> >>>>> That all being said, is the best practices approach to then package up >>>>> one of my current boxes which will contain all my changes? If that is >>>>> true, >>>>> what if I have I have different boxes in a multi-vagrant setup? Do i just >>>>> package each one individually? >>>>> Lastly, how do I call/use these new boxes that I have created? Do i >>>>> need to edit the Vagrantfile and change the speciic image being used? >>>>> >>>>> This is where my rookiness to Vagrant is coming up short and was >>>>> hoping the more experienced users could shed some light. >>>>> >>>>> I appreciate the help! >>>>> >>>>> Cheers! >>>>> >>>>> -- >>>>> 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/hashicorp/vagrant/issues >>>>> Discuss: https://discuss.hashicorp.com/c/vagrant/24 >>>>> --- >>>>> 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 vagra...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/vagrant-up/506a795d-30ce-4e4b-b384-22850e3aac91o%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/vagrant-up/506a795d-30ce-4e4b-b384-22850e3aac91o%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> 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/hashicorp/vagrant/issues >>> Discuss: https://discuss.hashicorp.com/c/vagrant/24 >>> --- >>> 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+...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/vagrant-up/98bf52d1-ba71-4fc8-9007-98d0f06a65c7o%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/vagrant-up/98bf52d1-ba71-4fc8-9007-98d0f06a65c7o%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> -- 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/hashicorp/vagrant/issues Discuss: https://discuss.hashicorp.com/c/vagrant/24 --- 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/b0139ff0-650f-40ef-8788-3c9e147a3ceco%40googlegroups.com.