joshmccall221 / dotvagrant

You put the lime in the coconut and shake it all up!
4 stars 2 forks source link

Generate multiple VM's from the same directory #11

Closed cgideon closed 9 years ago

cgideon commented 9 years ago

Is there a way we could spin up multiple VM's from the same directory without having to re-clone the entire project? I'd like to do this so that it would be easier to have say a server VM, an app VM and a network monitoring VM and have them be able to talk to each other.

We would provide the user with the ability to say "I want VM 1 to have these packages and VM 2 to have these others and VM 3 to come barebones" without having to modify the provisioning script for the boxes (see issue #10 )

What do you guys think? This one could be pretty tricky.

joshmccall221 commented 9 years ago

I believe if you named the boxes or used different box images (which could be identical except the name) this would behave like you are saying.

Vagrant up then checkout a different branch when you run vagrant up it will check to see if the box is already up, if not it creates a new box... I believe this is so sympton we saw when we had too many vm running or dev box on pair-1.

Another option is to have you provisioning scripts in the parent directory and have the vagrant files in sub directories.

Thoughts?

I like the idea of setting up a vm network. Pfsense boxes here we come ;)

cgideon commented 9 years ago

That's basically what I was thinking, but in one Vagrantfile. I'm lazy, I don't want to create multiple Vagrantfile's ;-)

cgideon commented 9 years ago

I wonder if there's a way to have something similar to docker-compose but for vagrant? @dragon788 Any ideas?

cgideon commented 9 years ago

Can do this through the Vagranfile itself http://docs.vagrantup.com/v2/multi-machine/ going to close the issue, will hopefully get to working on this sometime this week.