Hey everyone.
More of a general question in using the three above.
is there a best practices approach?
Should I build a ‘base image’ for the OS’s i use with Packer, pass that off to vagrant and then use Ansible for provisioning (adding software, accounts, setting up sudo acces).
any drawbacks on that?
i know I can do that in Packer, but trying to find out IF there are any pros/cons using one method or the other.
Is one more ‘deployable’ than another? I am planning on building out a lot of boxes with ‘baked in software’ and provide that to my team members. Eventually, the plan is to have a multi-box setups that can easily be deployed to the team.
Much appreciated for the feedback!
Should I build a ‘base image’ for the OS’s i use with Packer, pass that off to vagrant and then use Ansible for provisioning (adding software, accounts, setting up sudo acces).
This. 
You could configure basic software, accounts and sudo to the base image, too. And specialize the vms later on for there needs using Ansible.
1 Like
It depends on what you want your “base image” to be. Are you making it a generalized virtual machine for all different kinds of use? Or is the baked in software, accounts, sudo access, etc, required for the work you’ll be doing with the base image? If it’s required, I think it’s probably smarter to let Packer provision and package your box one single time with these already baked in. Otherwise, you and your team will spend extra time every time bringing up the VM doing these operations over and over again when you could just vagrant up
the box with these configurations already in place.
Also, you can use both, of course.
1 Like
Thanks. I started to test some a few things and I came to the conclusion that if I use Packer to create a clean, ‘golden image’ with what I need, that gives me several advantages:
1.) less Packer boxes to maintain.
2.) I can use vagrant to call that base image several times within the Vagrantfile and then use Ansible to individually configure each box (like a web server, database etc.)
It seems like a much more organized way to do it.
Really appreciate your feedback!
Cheers!
1 Like
Yea, exactly. I think there will be times where I need Packer to build me different images based on the need. But the idea of a “core” box with the same settings baked in via packer, seems like a good choice.
Then I pass it off to Vagrant + Ansible to change/add as needed.
Much appreciated for the help!