Afaik you can use multiple providers in a single Vagrantfile. That was
added in vagrant 1.7:
https://github.com/mitchellh/vagrant/issues/3812

HTH, Torben

On Tue, Oct 27, 2015 at 7:52 AM, Alvaro Miranda Aguilera <kiki...@gmail.com>
wrote:

> Hello,
>
> I am not sure if will be possible, but won't be easy.
>
> You can create 2 folders and have separate Vagrantfiles.
>
> The reason behind that, is Vagrant will load the Vagrantfile and
> create a secuence to run, and then will execute it.
>
> So if you define one VM to use one provider, I am not sure your will
> be able to cut that into 2 separate runs.
>
> What you can try is.
>
> Create a Vagranfile as in multi-machine
>
> and then start the VMs separately
>
> ie:
>
> vagrant up myawsbox --provider=aws
> vagrant up myvirtualbox --provder=virtualbox
>
> Once the VMs are created, vagrant halt/vagrant stop/vagrant up *should*
> work
>
> Alvaro
>
> On Tue, Oct 27, 2015 at 8:37 AM, Joe Reid <semisonic8...@gmail.com> wrote:
> > Hey guys,
> >
> > I want to create a hybrid development environment using local VMs and one
> > node on EC2.
> >
> > We have hit the memory limit of what we can run locally in Vagrant with
> our
> > workstations.  I am looking to break off a subset of the code (a service)
> > and provision it to EC2.
> >
> > Ideally, I would like to build a hybrid set up with the three VMs we have
> > now running locally (on VirtualBox) and a fourth node, configured in the
> > same Vagrantfile, running on AWS.  For extra credit, I would like to use
> > Consul to abstract away the EC2 IP for the three local nodes when they
> make
> > RESTful API requests to the fourth box (service).
> >
> > Essentially I want to build a box with one service on it, throw it on the
> > cloud, and let the three VMs access it via the service's API.
> >
> > Can I do this?  I have spent some time with the vagrant-aws plugin and
> > looking over the official docs.  I see how to build a Vagrantfile that
> can
> > deploy all nodes to AWS (using vagrant up --provider=aws) or all nodes to
> > Virtualbox.  But no examples of how to run a hybrid setup.  I can't find
> > anything on StackOverflow or in the official Vagrant docs.
> >
> > Is this a supported use case?  If so, what does the Vagrantfile need to
> look
> > like?
> >
> > For example, I build and deployed the following using the vagrant-aws
> docs:
> >
> >>   config.vm.box = "dummy"
> >>   config.vm.provider :aws do |aws, override|
> >>     aws.access_key_id = ENV['AWS_ACCESS_KEY']
> >>     aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
> >>     aws.keypair_name = "korrelate2012"
> >>     aws.ami = "ami-7747d01e"
> >>     override.ssh.username = "ubuntu"
> >>     override.ssh.private_key_path = "~/.ssh/test.pem"
> >>   end
> >
> >
> > How could I integrate that into a Vagrantfile defining three local VMs?
> >
> > --
> > 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/a269348e-4404-4f5a-a683-b636efcaec01%40googlegroups.com
> .
> > 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/CAHqq0ezR6PmqTErToQqJ0p9SYP-jnQLjBW49p_jOo%2BXOoGUoNg%40mail.gmail.com
> .
> 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_ZWFzJ%2B6RnFDtuubZ06AWCwjT3JbxhPpTV%2BgNLpqOEXRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to