@@ -40,7 +40,7 @@ ec2_keypair_file = nil
40
40
41
41
ec2_region = "us-east-1"
42
42
ec2_az = nil # Uses set by AWS
43
- ec2_ami = "ami-905730e8 "
43
+ ec2_ami = "ami-29ebb519 "
44
44
ec2_instance_type = "m3.medium"
45
45
ec2_spot_instance = ENV [ 'SPOT_INSTANCE' ] ? ENV [ 'SPOT_INSTANCE' ] == 'true' : true
46
46
ec2_spot_max_price = "0.113" # On-demand price for instance type
@@ -52,6 +52,9 @@ ec2_subnet_id = nil
52
52
# are running Vagrant from within that VPC as well.
53
53
ec2_associate_public_ip = nil
54
54
55
+ jdk_major = '8'
56
+ jdk_full = '8u202-linux-x64'
57
+
55
58
local_config_file = File . join ( File . dirname ( __FILE__ ) , "Vagrantfile.local" )
56
59
if File . exists? ( local_config_file ) then
57
60
eval ( File . read ( local_config_file ) , binding , "Vagrantfile.local" )
@@ -75,15 +78,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
75
78
76
79
if Vagrant . has_plugin? ( "vagrant-cachier" )
77
80
override . cache . scope = :box
78
- # Besides the defaults, we use a custom cache to handle the Oracle JDK
79
- # download, which downloads via wget during an apt install. Because of the
80
- # way the installer ends up using its cache directory, we need to jump
81
- # through some hoops instead of just specifying a cache directly -- we
82
- # share to a temporary location and the provisioning scripts symlink data
83
- # to the right location.
84
- override . cache . enable :generic , {
85
- "oracle-jdk8" => { cache_dir : "/tmp/oracle-jdk8-installer-cache" } ,
86
- }
87
81
end
88
82
end
89
83
@@ -169,7 +163,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
169
163
name_node ( zookeeper , name , ec2_instance_name_prefix )
170
164
ip_address = "192.168.50." + ( 10 + i ) . to_s
171
165
assign_local_ip ( zookeeper , ip_address )
172
- zookeeper . vm . provision "shell" , path : "vagrant/base.sh"
166
+ zookeeper . vm . provision "shell" , path : "vagrant/base.sh" , env : { "JDK_MAJOR" => jdk_major , "JDK_FULL" => jdk_full }
173
167
zk_jmx_port = enable_jmx ? ( 8000 + i ) . to_s : ""
174
168
zookeeper . vm . provision "shell" , path : "vagrant/zk.sh" , :args => [ i . to_s , num_zookeepers , zk_jmx_port ]
175
169
end
@@ -186,7 +180,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
186
180
# host DNS isn't setup, we shouldn't use hostnames -- IP addresses must be
187
181
# used to support clients running on the host.
188
182
zookeeper_connect = zookeepers . map { |zk_addr | zk_addr + ":2181" } . join ( "," )
189
- broker . vm . provision "shell" , path : "vagrant/base.sh"
183
+ broker . vm . provision "shell" , path : "vagrant/base.sh" , env : { "JDK_MAJOR" => jdk_major , "JDK_FULL" => jdk_full }
190
184
kafka_jmx_port = enable_jmx ? ( 9000 + i ) . to_s : ""
191
185
broker . vm . provision "shell" , path : "vagrant/broker.sh" , :args => [ i . to_s , enable_dns ? name : ip_address , zookeeper_connect , kafka_jmx_port ]
192
186
end
@@ -198,7 +192,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
198
192
name_node ( worker , name , ec2_instance_name_prefix )
199
193
ip_address = "192.168.50." + ( 100 + i ) . to_s
200
194
assign_local_ip ( worker , ip_address )
201
- worker . vm . provision "shell" , path : "vagrant/base.sh"
195
+ worker . vm . provision "shell" , path : "vagrant/base.sh" , env : { "JDK_MAJOR" => jdk_major , "JDK_FULL" => jdk_full }
202
196
end
203
197
}
204
198
0 commit comments