-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
37 lines (27 loc) · 1.06 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- mode: ruby -*-
# vi: set ft=ruby :
required_plugins = %w( vagrant-hostsupdater vagrant-berkshelf )
required_plugins.each do |plugin|
exec "vagrant plugin install #{plugin};vagrant #{ARGV.join(" ")}" unless Vagrant.has_plugin? plugin || ARGV[0] == 'plugin'
end
Vagrant.configure("2") do |config|
config.vm.define "web" do |web|
web.vm.box = "ubuntu/xenial64"
web.vm.network "private_network", ip: "192.168.10.100"
web.hostsupdater.aliases = ["development.local"]
web.vm.synced_folder ".", "/home/ubuntu/app"
web.vm.provision "shell", inline: 'echo "export DB_HOST=mongodb://192.168.10.200/posts" >> .bashrc'
web.vm.provision "chef_solo" do |chef|
chef.run_list= ["recipe[web::default]"]
end
end
config.vm.define "db" do |db|
db.vm.box = "ubuntu/xenial64"
db.vm.network "private_network", ip: "192.168.10.200"
db.hostsupdater.aliases = ["development.local"]
db.vm.synced_folder ".", "/home/ubuntu/app"
db.vm.provision "chef_solo" do |chef|
chef.run_list= ["recipe[db::default]"]
end
end
end