This repository has been archived by the owner on Oct 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathVagrantfile
71 lines (55 loc) · 1.75 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
# -*- mode: ruby -*-
# vim:ft=ruby:ts=2:et:sw=2
require 'yaml'
Vagrant.require_version ">= 1.7.2"
default_settings = YAML.load_file(File.expand_path(File.join(File.dirname(__FILE__), "hackathons/default.yml")))
domain = default_settings['domain']
plugins = [
'vagrant-hostmanager',
]
plugins.each do |plugin|
if !Vagrant.has_plugin?(plugin)
puts "Please execute: vagrant plugin install #{plugin}"
exit 1
end
end
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.hostmanager.enabled = true
config.hostmanager.manage_host = false
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.vm.box = "debian/jessie64"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "site.yml"
ansible.extra_vars = {
'is_vagrant' => 1,
}
end
config.vm.define "monitoring" do |config|
config.vm.host_name = "monitoring.#{domain}"
config.vm.network "private_network", ip: "10.11.12.10"
config.hostmanager.aliases = [
"graphite.#{domain}",
"grafana.#{domain}",
"kibana.#{domain}",
"elasticsearch.#{domain}",
]
end
config.vm.define "apps" do |config|
config.vm.host_name = "apps.#{domain}"
config.vm.network "private_network", ip: "10.11.12.11"
end
config.vm.define "nexus" do |config|
config.vm.host_name = "nexus.#{domain}"
config.vm.network "private_network", ip: "10.11.12.13"
end
config.vm.define "jenkins" do |config|
config.vm.host_name = "jenkins.#{domain}"
config.vm.network "private_network", ip: "10.11.12.14"
end
config.vm.define "rundeck" do |config|
config.vm.host_name = "rundeck.#{domain}"
config.vm.network "private_network", ip: "10.11.12.15"
end
end