-
Notifications
You must be signed in to change notification settings - Fork 147
/
Vagrantfile
48 lines (37 loc) · 1.7 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
Vagrant.configure(2) do |config|
# main & default: normal OS series...
config.vm.define "main", primary: true do |node|
node.vm.box = "ubuntu/bionic64"
#node.vm.box = "ubuntu/xenial64"
#node.vm.box = "ubuntu/trusty64"
#node.vm.box = "debian/jessie64"
#node.vm.box = "debian/wheezy64"
#node.vm.box = "bento/centos-7.2"
node.vm.provision "ansible" do |ansible|
ansible.playbook = "test.yml"
#ansible.sudo = true
###ansible.verbose = "vvv"
end
# Prometheus server UI port
node.vm.network :forwarded_port, guest: 9090, host: 9090
# Alertmanager UI port
node.vm.network :forwarded_port, guest: 9093, host: 9093
node.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
end
# docker: for auto build & testing (e.g., Travis CI)
config.vm.define "docker" do |node|
node.vm.box = "williamyeh/ubuntu-trusty64-docker"
node.vm.provision "shell", inline: <<-SHELL
cd /vagrant
docker build -f test/Dockerfile-ubuntu14.04 -t prometheus_trusty .
docker build -f test/Dockerfile-debian8 -t prometheus_jessie .
docker build -f test/Dockerfile-debian7 -t prometheus_wheezy .
docker build -f test/Dockerfile-centos7 -t prometheus_centos7 .
docker build -f test/Dockerfile-ubuntu14.04-git -t prometheus_trusty_git .
docker build -f test/Dockerfile-debian8-git -t prometheus_jessie_git .
docker build -f test/Dockerfile-centos7-git -t prometheus_centos7_git .
SHELL
end
end