forked from logicalclocks/hopsworks-chef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
245 lines (234 loc) · 7.46 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.box = "bento/ubuntu-16.04"
config.vm.box_version = "2.3.5"
config.vm.box_check_update = false
config.vm.boot_timeout =3600
# Enable Hostmanager to manage /etc/hosts
config.hostmanager.enabled = true
config.hostmanager.manage_host = false
config.hostmanager.manage_guest = true
config.hostmanager.ignore_private_ip = false
config.vm.define 'hopsworks0' do |node|
node.vm.hostname = 'hopsworks0'
node.vm.network "private_network", ip: "10.0.2.15"
end
config.vm.network :forwarded_port, guest: 22, host: 10022, id: "ssh"
# MySQL Server
config.vm.network(:forwarded_port, {:guest=>3306, :host=>3306})
# karamel http
config.vm.network(:forwarded_port, {:guest=>9090, :host=>9090})
# Hopsworks http
config.vm.network(:forwarded_port, {:guest=>8080, :host=>8080})
# Glassfish debug port
config.vm.network(:forwarded_port, {:guest=>9009, :host=>9009})
# Glassfish admin UI
config.vm.network(:forwarded_port, {:guest=>4848, :host=>4848})
# Yarn RM
config.vm.network(:forwarded_port, {:guest=>8088, :host=>8088})
# Kibana
config.vm.network(:forwarded_port, {:guest=>5601, :host=>5601})
# Grafana Webserver
config.vm.network(:forwarded_port, {:guest=>3000, :host=>3000})
# Nodemanager
config.vm.network(:forwarded_port, {:guest=>8083, :host=>8083})
# Influx DB admin (because of clash with nodemanager)
config.vm.network(:forwarded_port, {:guest=>8084, :host=>8084})
# Influx DB REST API
config.vm.network(:forwarded_port, {:guest=>8086, :host=>8086})
# Graphite Endpoint
config.vm.network(:forwarded_port, {:guest=>2003, :host=>2003})
# Jupyter
config.vm.network(:forwarded_port, {:guest=>8888, :host=>8888})
# membrane proxy
config.vm.network(:forwarded_port, {:guest=>11112, :host=>11112})
config.vm.provision "file", source: "~/.vagrant.d/insecure_private_key", destination: "~/.ssh/id_rsa"
config.vm.provision "shell", inline: "cp /home/vagrant/.ssh/authorized_keys /home/vagrant/.ssh/id_rsa.pub && sudo chown vagrant:vagrant /home/vagrant/.ssh/id_rsa.pub"
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 7000]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
v.customize ["modifyvm", :id, "--nictype1", "virtio"]
v.customize ["modifyvm", :id, "--name", "hopsworks0"]
v.customize ["modifyvm", :id, "--cpus", "3"]
end
config.vm.provision :chef_solo do |chef|
chef.channel = "stable"
chef.cookbooks_path = "cookbooks"
chef.json = {
"ntp" => {
"install" => "true",
},
"install" => {
"user" => "vagrant",
"dir" => "/srv/hops",
},
"ndb" => {
"mgmd" => {
"private_ips" => ["10.0.2.15"]
},
"ndbd" => {
"private_ips" => ["10.0.2.15"]
},
"mysqld" => {
"private_ips" => ["10.0.2.15"]
},
"memcached" => {
"private_ips" => ["10.0.2.15"]
},
"public_ips" => ["10.0.2.15"],
"private_ips" => ["10.0.2.15"],
"enabled" => "true",
},
"hopsworks" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
"war_url" => "http://snurran.sics.se/hops/hopsworks/0.1.0/hopsworks-jim.war",
"ear_url" => "http://snurran.sics.se/hops/hopsworks/0.1.0/hopsworks-ear-jim.ear",
"user_envs" => "false",
"twofactor_auth" => "false",
# "anaconda_enabled" => "false",
},
"zeppelin" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"elastic" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"public_ips" => ["10.0.2.15"],
"private_ips" => ["10.0.2.15"],
"hops" => {
"use_hopsworks" => "true",
"rm" => {
"private_ips" => ["10.0.2.15"]
},
"nn" => {
"private_ips" => ["10.0.2.15"]
},
"dn" => {
"private_ips" => ["10.0.2.15"]
},
"nm" => {
"private_ips" => ["10.0.2.15"]
},
"jhs" => {
"private_ips" => ["10.0.2.15"]
},
},
"hadoop_spark" => {
"master" => {
"private_ips" => ["10.0.2.15"]
},
"worker" => {
"private_ips" => ["10.0.2.15"]
}
},
"kzookeeper" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"livy" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"epipe" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"kibana" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"hopsmonitor" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"hopslog" => {
},
"drelephant" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"dela" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"kagent" => {
"network" => {
"interface" => "eth0"
},
"allow_ssh_access" => "true",
"enabled" => "true",
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"kkafka" => {
"default" => {
"private_ips" => ["10.0.2.15"]
},
},
"cuda" => {
"enabled": "false",
},
"conda" => {
"user": "vagrant",
},
"vagrant" => "true",
}
chef.add_recipe "kagent::install"
chef.add_recipe "hopsworks::install"
chef.add_recipe "tensorflow::install"
chef.add_recipe "hops::install"
chef.add_recipe "hopslog::install"
chef.add_recipe "hopsmonitor::install"
chef.add_recipe "ndb::install"
chef.add_recipe "hadoop_spark::install"
chef.add_recipe "flink::install"
chef.add_recipe "zeppelin::install"
chef.add_recipe "elastic::install"
chef.add_recipe "kzookeeper::install"
chef.add_recipe "epipe::install"
chef.add_recipe "livy::install"
chef.add_recipe "adam::install"
chef.add_recipe "drelephant::install"
chef.add_recipe "kkafka::install"
chef.add_recipe "kagent::default"
chef.add_recipe "ndb::mgmd"
chef.add_recipe "ndb::ndbd"
chef.add_recipe "ndb::mysqld"
chef.add_recipe "hops::ndb"
chef.add_recipe "hops::rm"
chef.add_recipe "hops::nn"
chef.add_recipe "hops::jhs"
chef.add_recipe "hadoop_spark::yarn"
chef.add_recipe "hadoop_spark::historyserver"
chef.add_recipe "flink::yarn"
chef.add_recipe "elastic::default"
chef.add_recipe "livy::default"
chef.add_recipe "zeppelin::default"
chef.add_recipe "kzookeeper::default"
chef.add_recipe "kkafka::default"
chef.add_recipe "epipe::default"
chef.add_recipe "hopsworks::default"
chef.add_recipe "hopsworks::dev"
chef.add_recipe "hopsmonitor::default"
chef.add_recipe "hopslog::default"
chef.add_recipe "hops::dn"
chef.add_recipe "hops::nm"
chef.add_recipe "tensorflow::default"
chef.add_recipe "hopsmonitor::telegraf"
end
end