-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVagrantfile
74 lines (65 loc) · 2.05 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.omnibus.chef_version = :latest
config.berkshelf.enabled = true
config.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
config.vm.define "server", primary: true do |server|
server.vm.hostname = "gitlabci"
server.vm.box = "precise"
server.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
server.vm.network :forwarded_port, guest: 80, host: 8080
server.vm.provision :chef_solo do |chef|
chef.json = {
:gitlabci => {
:database_adapter => "postgresql",
:database_password => "datapass",
:env => "production",
:production => {
:gitlab => {
:server => ["https://dev.gitlab.org/" , "https://staging.gitlab.org/"]
}
}
},
:mysql => {
:server_root_password => "rootpass",
:server_repl_password => "replpass",
:server_debian_password => "debianpass"
},
:postgresql => {
:password => {
:postgres => "psqlpass"
}
},
}
chef.run_list = [
"apt",
"gitlabci::server"
]
end
end
# we use raring because it has better docker support
config.vm.define "runner", primary: true do |runner|
runner.vm.hostname = "gitlabci"
runner.vm.box = "raring"
runner.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
#runner.vm.network :forwarded_port, guest: 80, host: 8080
runner.vm.provision :chef_solo do |chef|
chef.json = {
:gitlabci => {
:runner => {
:ciserver => "https://ci.example.com",
:ciregistrationtoken => "replaceme"
}
}
}
chef.run_list = [
"apt",
"gitlabci::runner"
]
end
end
end