-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
32 lines (30 loc) · 1.21 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.synced_folder ".", "/vagrant"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
end
config.vm.define :cd, primary: true do |cd|
cd.vm.network :forwarded_port, host: 8080, guest: 8080
cd.vm.network :forwarded_port, host: 5000, guest: 5000
cd.vm.network :forwarded_port, host: 2201, guest: 22, id: "ssh", auto_correct: true
cd.vm.network "private_network", ip: "192.168.50.91"
cd.vm.provision "shell", path: "bootstrap.sh"
cd.vm.provision :shell, inline: 'ansible-playbook /vagrant/ansible/cd.yml -c local -v'
cd.vm.hostname = "cd"
end
config.vm.define :prod do |prod|
prod.vm.network :forwarded_port, host: 2202, guest: 22, id: "ssh", auto_correct: true
prod.vm.network :forwarded_port, host: 9000, guest: 80
prod.vm.network :forwarded_port, host: 9001, guest: 9001
prod.vm.network :forwarded_port, host: 9002, guest: 9002
prod.vm.network "private_network", ip: "192.168.50.92"
prod.vm.hostname = "prod"
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
end