-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
93 lines (75 loc) · 2.17 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*- mode: ruby -*-
# vi: set ft=ruby :
boxes = [
{
:name => "jenkinsci",
:eth1 => "192.168.205.10",
:mem => "512",
:cpu => "1",
:box => "scottpgallagher/ubuntu-14_04-jenkins"
},
{
:name => "worker64-ubuntu-14.04",
:eth1 => "192.168.205.11",
:mem => "512",
:cpu => "1",
:box => "chef/ubuntu-14.04"
},
{
:name => "worker64-ubuntu-12.04",
:eth1 => "192.168.205.12",
:mem => "512",
:cpu => "1",
:box => "chef/ubuntu-12.04"
},
{
:name => "worker64-centos-6.4",
:eth1 => "192.168.205.13",
:mem => "512",
:cpu => "1",
:box => "danmikita/centos"
},
{
:name => "worker64-centos-6.5",
:eth1 => "192.168.205.14",
:mem => "512",
:cpu => "1",
:box => "chef/centos-6.5"
},
{
:name => "worker64-centos-7.0",
:eth1 => "192.168.205.15",
:mem => "512",
:cpu => "1",
:box => "chef/centos-7.0"
},
]
Vagrant.configure(2) do |config|
boxes.each do |opts|
config.vm.define opts[:name] do |config|
config.vm.box = opts[:box]
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", opts[:mem]]
v.customize ["modifyvm", :id, "--cpus", opts[:cpu]]
end
if opts[:name].eql? "jenkinsci"
config.vm.network :forwarded_port, guest: 8080, host: 9090
#fixes stdin: is not a tty
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
#bug workaround https://github.com/mitchellh/vagrant/issues/5973
# config.vm.provision :salt do |salt|
# salt.minion_config = "salt/minion"
# salt.run_highstate = true
# end
#end
#fixes GPG error: http://get.docker.io docker Release: The following signatures...
config.vm.provision "shell", path: "remove_docker_list.sh"
config.vm.provision "shell", path: "install_salt_minion.sh"
config.vm.provision "shell", path: "install_brightbox_ruby.sh"
config.vm.provision "shell", path: "install_jenkins_api_client.sh"
config.vm.synced_folder "salt/roots/", "/srv/salt/"
end
config.vm.network :private_network, ip: opts[:eth1]
end
end
end