In our current scenario we have a Vagrantfile that creates two machines - app1 and app2. I then have a puppet provisioning set up that installs a number of modules (all of our application components). The way that our applications work requires that both machines are up prior to any provisioning occurring.
The way we see our configuration behaving now is that app1 is brought up and then provisioned, then app2 is brought up and then provisioned. This causes our application to be unable to connect because it can't make connections with the appropriate services on the other server that has not yet been brought up.
Is there anyway to get our desired configuration where app1 and app2 are brought up and then provisioned? Below is our current Vagrantfile for reference
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.define "app1" do |app1|
app1.vm.box = "centos_base"
app1.vm.hostname = "app1.vagrant.test"
app1.vm.network "private_network", ip: "192.168.10.10"
app1.vm.network "forwarded_port", guest: 8080, host: 8000
end
config.vm.define "app2" do |app2|
app2.vm.box = "centos_base"
app2.vm.hostname = "app2.vagrant.test"
app2.vm.network "private_network", ip: "192.168.10.11"
app2.vm.network "forwarded_port", guest:8080, host: 8001
end
config.vm.provision "puppet" do |puppet|
puppet.module_path = "modules"
puppet.manifests_path = "manifests"
puppet.manifest_file = "default.pp"
end
end