-
Notifications
You must be signed in to change notification settings - Fork 5
/
Vagrantfile
139 lines (119 loc) · 4.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
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Define the Puppet Enterprise Version
pe_version = '3.7.1'
config.pe_build.version = pe_version
config.pe_build.download_root = "https://s3.amazonaws.com/pe-builds/released/#{pe_version}"
# Define the proper location to retrieve the Vagrant Box
config.vm.box = "centos-65-x64-nocm"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box"
# Puppet Master VM
# Define the Master VM Characteristics
config.vm.define 'master' do |master|
master.vm.network :private_network, :ip => '10.10.100.100'
master.vm.network "forwarded_port", guest: 443, host: 8443
master.vm.hostname = 'master.puppetlabs.vm'
# Configure Master VM Settings
master.vm.provider :virtualbox do |settings|
settings.memory = 4096
settings.name = "master_3.7"
settings.cpus = 2
end
# Add all hosts for environment
master.vm.provision :hosts do |entries|
entries.add_host '10.10.100.100', ['master.puppetlabs.vm', 'master']
entries.add_host '10.10.100.111', ['development.puppetlabs.vm', 'development']
entries.add_host '10.10.100.112', ['testing.puppetlabs.vm', 'testing']
entries.add_host '10.10.100.113', ['production.puppetlabs.vm', 'production']
end
# Set the PE Role of this node
master.vm.provision :pe_bootstrap do |provisioner|
provisioner.role = :master
end
master.vm.provision :shell, path: "master.sh"
end
####################
## Development VM ##
####################
# Define the Development VM Characteristics
config.vm.define 'development' do |development|
development.vm.network :private_network, :ip => '10.10.100.111'
development.vm.hostname = 'development.puppetlabs.vm'
# Configure Development VM Settings
development.vm.provider :virtualbox do |settings|
settings.memory = 512
settings.name = "development_3.7"
settings.cpus = 1
end
# Add all hosts for environment
development.vm.provision :hosts do |entries|
entries.add_host '10.10.100.100', ['master.puppetlabs.vm', 'master']
entries.add_host '10.10.100.111', ['development.puppetlabs.vm', 'development']
entries.add_host '10.10.100.112', ['testing.puppetlabs.vm', 'testing']
entries.add_host '10.10.100.113', ['production.puppetlabs.vm', 'production']
end
# Set the PE Role of this node
development.vm.provision :pe_bootstrap do |provisioner|
provisioner.role = :agent
provisioner.master = 'master.puppetlabs.vm'
end
development.vm.provision :shell, path: "development.sh"
end
################
## Testing VM ##
################
# Define the Testing VM Characteristics
config.vm.define 'testing' do |testing|
testing.vm.network :private_network, :ip => '10.10.100.112'
testing.vm.hostname = 'testing.puppetlabs.vm'
# Configure Testing VM Settings
testing.vm.provider :virtualbox do |settings|
settings.memory = 512
settings.name = "testing_3.7"
settings.cpus = 1
end
# Add all hosts for environment
testing.vm.provision :hosts do |entries|
entries.add_host '10.10.100.100', ['master.puppetlabs.vm', 'master']
entries.add_host '10.10.100.111', ['development.puppetlabs.vm', 'development']
entries.add_host '10.10.100.112', ['testing.puppetlabs.vm', 'testing']
entries.add_host '10.10.100.113', ['production.puppetlabs.vm', 'production']
end
# Set the PE Role of this node
testing.vm.provision :pe_bootstrap do |provisioner|
provisioner.role = :agent
provisioner.master = 'master.puppetlabs.vm'
end
testing.vm.provision :shell, path: "testing.sh"
end
###################
## Production VM ##
###################
# Define the Production VM Characteristics
config.vm.define 'production' do |production|
production.vm.network :private_network, :ip => '10.10.100.113'
production.vm.hostname = 'production.puppetlabs.vm'
# Configure Production VM Settings
production.vm.provider :virtualbox do |settings|
settings.memory = 512
settings.name = "production_3.7"
settings.cpus = 1
end
# Add all hosts for environment
production.vm.provision :hosts do |entries|
entries.add_host '10.10.100.100', ['master.puppetlabs.vm', 'master']
entries.add_host '10.10.100.111', ['development.puppetlabs.vm', 'development']
entries.add_host '10.10.100.112', ['testing.puppetlabs.vm', 'testing']
entries.add_host '10.10.100.113', ['production.puppetlabs.vm', 'production']
end
# Set the PE Role of this node
production.vm.provision :pe_bootstrap do |provisioner|
provisioner.role = :agent
provisioner.master = 'master.puppetlabs.vm'
end
production.vm.provision :shell, path: "production.sh"
end
end