-
Notifications
You must be signed in to change notification settings - Fork 51
/
Vagrantfile
148 lines (121 loc) · 4.6 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# -*- mode: ruby -*-
# vi: set ft=ruby :
CENTOS_8_BOX_URL = "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-20220913.0.x86_64.vagrant-libvirt.box"
CENTOS_9_BOX_URL = "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-Vagrant-9-latest.x86_64.vagrant-libvirt.box"
Vagrant.configure("2") do |config|
config.vm.box = "centos/stream9"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "puppet/data", "/tmp/vagrant-puppet/data", type: "rsync"
config.vm.provision "install puppet", type: "shell", inline: <<-SHELL
. /etc/os-release
yum -y install epel-release
yum -y install puppet7-release || yum -y install https://yum.puppetlabs.com/puppet7-release-el-${VERSION_ID}.noarch.rpm
yum -y install puppet-agent
SHELL
config.vm.provision "run puppet", type: 'puppet' do |puppet|
puppet.hiera_config_path = 'vagrant/hiera.yaml'
puppet.module_path = ["puppet/modules", "puppet/external_modules"]
puppet.manifests_path = "vagrant/manifests"
puppet.synced_folder_type = "rsync"
puppet.working_directory = "/tmp/vagrant-puppet"
end
config.vm.define "jenkins-controller" do |override|
override.vm.hostname = "jenkins-controller"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "2048"
provider.vm.box_url = CENTOS_9_BOX_URL
end
end
config.vm.define "jenkins-node-el7" do |override|
override.vm.hostname = "jenkins-node-el7"
override.vm.box = "centos/7"
override.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4096"
end
# Note that VAGRANT_EXPERIMENTAL=dependency_provisioners must be used for
# before: all to work.
override.vm.provision "PUP-10548 SELinux workaround", type: "shell", before: :all, inline: <<-SHELL
yum -y install centos-release-scl-rh
yum -y install rh-postgresql12-postgresql-server
SHELL
end
config.vm.define "jenkins-node-el8" do |override|
override.vm.hostname = "jenkins-node-el8"
override.vm.box = "centos/stream8"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "4096"
provider.vm.box_url = CENTOS_8_BOX_URL
end
end
config.vm.define "jenkins-node-el9" do |override|
override.vm.hostname = "jenkins-node-el9"
override.vm.box = "centos/stream9"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "4096"
provider.vm.box_url = CENTOS_9_BOX_URL
end
end
config.vm.define "jenkins-deb-node-debian11" do |override|
override.vm.hostname = "jenkins-deb-node-debian11"
override.vm.box = "debian/bullseye64"
override.vm.provider "libvirt" do |libvirt|
libvirt.memory = "4096"
end
override.vm.provision "install puppet", type: "shell", inline: <<-SHELL
. /etc/os-release
wget https://apt.puppet.com/puppet7-release-${VERSION_CODENAME}.deb
apt-get install -y ./puppet7-release-${VERSION_CODENAME}.deb
apt-get update
apt-get install -y puppet-agent
SHELL
end
config.vm.define "web" do |override|
override.vm.hostname = "web"
override.vm.box = "centos/7"
override.vm.provider "libvirt" do |libvirt|
libvirt.memory = "2048"
end
end
config.vm.define "backup" do |override|
override.vm.hostname = "backup"
override.vm.box = "centos/stream8"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "2048"
provider.vm.box_url = CENTOS_8_BOX_URL
end
end
config.vm.define "redmine" do |override|
override.vm.hostname = "redmine"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "2048"
provider.vm.box_url = CENTOS_9_BOX_URL
end
end
config.vm.define "discourse" do |override|
override.vm.hostname = "discourse"
override.vm.box = "centos/stream9"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "2048"
libvirt.machine_virtual_size = 40
provider.vm.box_url = CENTOS_9_BOX_URL
end
end
config.vm.define "repo-deb" do |override|
override.vm.hostname = "repo-deb"
override.vm.box = "centos/stream9"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "2048"
libvirt.machine_virtual_size = 40
provider.vm.box_url = CENTOS_9_BOX_URL
end
end
config.vm.define "repo-rpm" do |override|
override.vm.hostname = "repo-rpm"
override.vm.box = "centos/stream9"
override.vm.provider "libvirt" do |libvirt, provider|
libvirt.memory = "2048"
libvirt.machine_virtual_size = 40
provider.vm.box_url = CENTOS_9_BOX_URL
end
end
end