forked from facebookarchive/fbctf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile-multi
56 lines (49 loc) · 1.95 KB
/
Vagrantfile-multi
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
# MySQL Server
config.vm.define "mysql" do |mysql|
mysql.vm.network "private_network", ip: "10.10.10.6"
mysql.vm.hostname = "mysql"
mysql.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type mysql", privileged: false
mysql.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
end
# Cache Server
config.vm.define "cache" do |cache|
cache.vm.network "private_network", ip: "10.10.10.8"
cache.vm.hostname = "cache"
cache.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type cache", privileged: false
cache.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
end
# HHVM Server
config.vm.define "hhvm" do |hhvm|
hhvm.vm.network "private_network", ip: "10.10.10.7"
hhvm.vm.hostname = "hhvm"
hhvm.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type hhvm --mysql-server 10.10.10.6 --cache-server 10.10.10.8", privileged: false
hhvm.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
end
# Nginx Server
config.vm.define "nginx" do |nginx|
nginx.vm.network "private_network", ip: "10.10.10.5"
nginx.vm.network "forwarded_port", guest: 80, host: 80
nginx.vm.network "forwarded_port", guest: 443, host: 443
nginx.vm.hostname = "nginx"
nginx.vm.provision "shell", path: "extra/provision.sh", args: "ENV['FBCTF_PROVISION_ARGS'] --multiple-servers --server-type nginx --hhvm-server 10.10.10.7", privileged: false
nginx.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
end
end