@@ -145,8 +145,9 @@ def __init__(self, revision, effective_start_date, target_host, root_dir, config
145
145
146
146
147
147
class ReleaseCommand (BaseCommand ):
148
- def __init__ (self , effective_start_date , target_host , root_dir , distribution_version , configuration_name , tag ):
148
+ def __init__ (self , effective_start_date , target_host , plugins , root_dir , distribution_version , configuration_name , tag ):
149
149
super ().__init__ (effective_start_date , target_host , root_dir )
150
+ self .plugins = plugins
150
151
self .configuration_name = configuration_name
151
152
self .pipeline = "from-distribution"
152
153
self .distribution_version = distribution_version
@@ -167,6 +168,12 @@ def command_line(self, track, challenge, car):
167
168
"--user-tag=\" {9}\" " .format (self .distribution_version , self .ts , track , challenge , car ,
168
169
self .report_path (track , challenge , car ), self .pipeline ,
169
170
self .target_host , self .configuration_name , self .tag (), RALLY_BINARY )
171
+ if self .plugins :
172
+ cmd += " --elasticsearch-plugins=\" %s\" " % self .plugins
173
+ if "x-pack:security" in self .plugins :
174
+ cmd += " --cluster-health=yellow " \
175
+ "--client-options=\" use_ssl:true,verify_certs:false,basic_auth_user:'rally',basic_auth_password:'rally-password'\" "
176
+
170
177
return cmd
171
178
172
179
def tag (self ):
@@ -352,6 +359,10 @@ def parse_args():
352
359
"--target-host" ,
353
360
help = "The Elasticsearch node that should be targeted" ,
354
361
required = True )
362
+ parser .add_argument (
363
+ "--elasticsearch-plugins" ,
364
+ help = "Elasticsearch plugins to install for the benchmark (default: None)" ,
365
+ default = None )
355
366
parser .add_argument (
356
367
"--fixtures" ,
357
368
help = "A comma-separated list of fixtures that have been run" ,
@@ -391,8 +402,15 @@ def main():
391
402
adhoc_mode = args .mode == "adhoc"
392
403
nightly_mode = args .mode == "nightly"
393
404
405
+ plugins = args .elasticsearch_plugins
406
+
394
407
tag = args .tag
395
- release_tag = "env:ear" if "encryption-at-rest" in args .fixtures else "env:bare"
408
+ if "encryption-at-rest" in args .fixtures :
409
+ release_tag = "env:ear"
410
+ elif "x-pack:security" in plugins :
411
+ release_tag = "env:x-pack"
412
+ else :
413
+ release_tag = "env:bare"
396
414
docker_benchmark = args .release .startswith ("Docker " )
397
415
release = args .release .replace ("Docker " , "" )
398
416
@@ -403,20 +421,26 @@ def main():
403
421
# use always the same name for release comparison benchmarks
404
422
env_name = sanitize (args .mode )
405
423
if docker_benchmark :
424
+ if plugins :
425
+ raise RuntimeError ("User specified plugins [%s] but this is not supported for Docker benchmarks." % plugins )
406
426
logger .info ("Running Docker release benchmarks for release [%s] against [%s]." % (release , args .target_host ))
407
427
command = DockerCommand (args .effective_start_date , args .target_host , root_dir , release , env_name )
408
428
tag = command .tag ()
409
429
else :
410
430
logger .info ("Running release benchmarks for release [%s] against [%s] (release tag is [%s])."
411
431
% (release , args .target_host , release_tag ))
412
- command = ReleaseCommand (args .effective_start_date , args .target_host , root_dir , release , env_name , release_tag )
432
+ command = ReleaseCommand (args .effective_start_date , args .target_host , plugins , root_dir , release , env_name , release_tag )
413
433
tag = command .tag ()
414
434
elif adhoc_mode :
435
+ if plugins :
436
+ raise RuntimeError ("User specified plugins [%s] but this is not supported for adhoc benchmarks." % plugins )
415
437
logger .info ("Running adhoc benchmarks for revision [%s] against [%s]." % (args .revision , args .target_host ))
416
438
# copy data from templates directory to our dedicated output directory
417
439
env_name = sanitize (args .release )
418
440
command = AdHocCommand (args .revision , args .effective_start_date , args .target_host , root_dir , env_name , args .tag , args .override_src_dir )
419
441
else :
442
+ if plugins :
443
+ raise RuntimeError ("User specified plugins [%s] but this is not supported for nightly benchmarks." % plugins )
420
444
logger .info ("Running nightly benchmarks against [%s]." % args .target_host )
421
445
env_name = NightlyCommand .CONFIG_NAME
422
446
command = NightlyCommand (args .effective_start_date , args .target_host , root_dir , args .override_src_dir )
0 commit comments