forked from amonapp/amonagent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
69 lines (51 loc) · 1.64 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
$deb = <<SCRIPT
rm *.deb
apt-get update
apt-get install -y sysstat
apt-get remove -y amonagent
rm -rf /etc/opt/amonagent
rm -rf /var/log/amonagent/amonagent.log
dpkg -i /vagrant/amonagent.deb
echo '{"api_key": "test", "amon_instance": "https://demo.amon.cx"}' >> /etc/opt/amonagent/amonagent.conf
/opt/amonagent/amonagent -test
service amonagent start
service amonagent status
cat /var/log/amonagent/amonagent.log
service amonagent stop
SCRIPT
$rpm = <<SCRIPT
rm *.rpm
yum install /vagrant/amonagent.rpm -y
echo '{"api_key": "test", "amon_instance": "https://demo.amon.cx"}' >> /etc/opt/amonagent/amonagent.conf
/opt/amonagent/amonagent -test
service amonagent start
service amonagent status
cat /var/log/amonagent/amonagent.log
service amonagent stop
SCRIPT
# vagrant plugin install vagrant-vbguest
Vagrant.configure("2") do |config|
config.vm.synced_folder "~/go/src/github.com/amonapp/amonagent/",
"/vagrant/",
:mount_options => [ "dmode=777", "fmode=777" ]
config.vm.define "ubuntu1404" do |ubuntu1404|
ubuntu1404.vm.box = "ubuntu/trusty64"
ubuntu1404.vm.provision "shell", inline: $deb
end
config.vm.define "debian8" do |debian8|
debian8.vm.box = "debian/jessie64"
debian8.vm.provision "shell", inline: $deb
end
config.vm.define "debian7" do |debian7|
debian7.vm.box = "debian/wheezy64"
debian7.vm.provision "shell", inline: $deb
end
config.vm.define "centos6" do |centos6|
centos6.vm.box = "puphpet/centos65-x64"
centos6.vm.provision "shell", inline: $rpm
end
config.vm.define "centos7" do |centos7|
centos7.vm.box = "bento/centos-7.1"
centos7.vm.provision "shell", inline: $rpm
end
end