-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
executable file
·52 lines (50 loc) · 1.23 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => "gitlab",
:eth1 => "192.168.33.10",
:mem => "4096",
:cpu => "2",
:folder => "./gitlab",
:shell => "./gitlab/bootstrap.sh"
},
{
:name => "gitlab_dns",
:eth1 => "192.168.33.13",
:mem => "1024",
:cpu => "1",
:folder => "./gitlab_dns",
:shell => "./gitlab_dns/bootstrap.sh"
},
{
:name => "gitlab_ci",
:eth1 => "192.168.33.11",
:mem => "2048",
:cpu => "2",
:folder => "./gitlab_ci",
:shell => "./gitlab_ci/bootstrap.sh"
},
{
:name => "gitlab_cd",
:eth1 => "192.168.33.12",
:mem => "2048",
:cpu => "2",
:folder => "./gitlab_ci",
:shell => "./gitlab_ci/bootstrap.sh"
},
]
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
boxes.each do |opts|
config.vm.define opts[:name] do |config|
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", opts[:mem]]
v.customize ["modifyvm", :id, "--cpus", opts[:cpu]]
end
config.vm.network :private_network, ip: opts[:eth1]
config.vm.synced_folder opts[:folder], "/mnt", type: "nfs"
config.vm.provision "shell", path: opts[:shell]
end
end
end