redisbench-admin 0.11.41__py3-none-any.whl → 0.11.43__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redisbench_admin/run_remote/args.py +1 -1
- redisbench_admin/run_remote/run_remote.py +27 -0
- redisbench_admin/run_remote/standalone.py +120 -6
- {redisbench_admin-0.11.41.dist-info → redisbench_admin-0.11.43.dist-info}/METADATA +1 -1
- {redisbench_admin-0.11.41.dist-info → redisbench_admin-0.11.43.dist-info}/RECORD +8 -8
- {redisbench_admin-0.11.41.dist-info → redisbench_admin-0.11.43.dist-info}/LICENSE +0 -0
- {redisbench_admin-0.11.41.dist-info → redisbench_admin-0.11.43.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.11.41.dist-info → redisbench_admin-0.11.43.dist-info}/entry_points.txt +0 -0
|
@@ -148,7 +148,7 @@ def create_run_remote_arguments(parser):
|
|
|
148
148
|
"--spin-test",
|
|
149
149
|
default=False,
|
|
150
150
|
action="store_true",
|
|
151
|
-
help="Setup standalone Redis server, run INFO SERVER, print output as markdown and exit",
|
|
151
|
+
help="Setup standalone Redis server, run INFO SERVER, print output as markdown and exit (reads install_steps from defaults.yml)",
|
|
152
152
|
)
|
|
153
153
|
|
|
154
154
|
return parser
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# All rights reserved.
|
|
5
5
|
#
|
|
6
6
|
import logging
|
|
7
|
+
import os
|
|
7
8
|
import random
|
|
8
9
|
import string
|
|
9
10
|
import sys
|
|
@@ -270,6 +271,31 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
270
271
|
logging.error("❌ --spin-test requires server_public_ip in --inventory")
|
|
271
272
|
exit(1)
|
|
272
273
|
|
|
274
|
+
# Load benchmark config from defaults.yml
|
|
275
|
+
benchmark_config = None
|
|
276
|
+
|
|
277
|
+
# Try to load defaults.yml
|
|
278
|
+
defaults_file = (
|
|
279
|
+
args.defaults_filename
|
|
280
|
+
if hasattr(args, "defaults_filename")
|
|
281
|
+
else "defaults.yml"
|
|
282
|
+
)
|
|
283
|
+
if os.path.exists(defaults_file):
|
|
284
|
+
try:
|
|
285
|
+
import yaml
|
|
286
|
+
|
|
287
|
+
with open(defaults_file, "r") as config_file:
|
|
288
|
+
defaults_config = yaml.safe_load(config_file)
|
|
289
|
+
if defaults_config:
|
|
290
|
+
benchmark_config = defaults_config
|
|
291
|
+
logging.info(f"📋 Loaded configuration from {defaults_file}")
|
|
292
|
+
except Exception as e:
|
|
293
|
+
logging.warning(f"⚠️ Failed to load defaults config: {e}")
|
|
294
|
+
else:
|
|
295
|
+
logging.info(
|
|
296
|
+
f"📋 No {defaults_file} found - proceeding without install_steps"
|
|
297
|
+
)
|
|
298
|
+
|
|
273
299
|
# Run spin test
|
|
274
300
|
success = spin_test_standalone_redis(
|
|
275
301
|
server_public_ip=server_public_ip,
|
|
@@ -282,6 +308,7 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
282
308
|
modules_configuration_parameters_map=None,
|
|
283
309
|
custom_redis_conf_path=args.redis_conf,
|
|
284
310
|
custom_redis_server_path=args.redis_server_binary,
|
|
311
|
+
benchmark_config=benchmark_config,
|
|
285
312
|
)
|
|
286
313
|
|
|
287
314
|
exit(0 if success else 1)
|
|
@@ -457,6 +457,86 @@ def generate_remote_standalone_redis_cmd(
|
|
|
457
457
|
return full_logfile, initial_redis_cmd
|
|
458
458
|
|
|
459
459
|
|
|
460
|
+
def execute_install_steps(
|
|
461
|
+
benchmark_config, server_public_ip, username, private_key, db_ssh_port
|
|
462
|
+
):
|
|
463
|
+
"""
|
|
464
|
+
Execute install_steps from dbconfig and clientconfig sections.
|
|
465
|
+
|
|
466
|
+
Args:
|
|
467
|
+
benchmark_config: The benchmark configuration dictionary
|
|
468
|
+
server_public_ip: IP address of the remote server
|
|
469
|
+
username: SSH username
|
|
470
|
+
private_key: Path to SSH private key
|
|
471
|
+
db_ssh_port: SSH port
|
|
472
|
+
"""
|
|
473
|
+
install_commands = []
|
|
474
|
+
|
|
475
|
+
# Extract install_steps from dbconfig
|
|
476
|
+
if "dbconfig" in benchmark_config:
|
|
477
|
+
dbconfig = benchmark_config["dbconfig"]
|
|
478
|
+
if isinstance(dbconfig, list):
|
|
479
|
+
for config_item in dbconfig:
|
|
480
|
+
if "install_steps" in config_item:
|
|
481
|
+
steps = config_item["install_steps"]
|
|
482
|
+
if isinstance(steps, list):
|
|
483
|
+
install_commands.extend(steps)
|
|
484
|
+
logging.info(f"📦 Found {len(steps)} install steps in dbconfig")
|
|
485
|
+
elif isinstance(dbconfig, dict):
|
|
486
|
+
if "install_steps" in dbconfig:
|
|
487
|
+
steps = dbconfig["install_steps"]
|
|
488
|
+
if isinstance(steps, list):
|
|
489
|
+
install_commands.extend(steps)
|
|
490
|
+
logging.info(f"📦 Found {len(steps)} install steps in dbconfig")
|
|
491
|
+
|
|
492
|
+
# Extract install_steps from clientconfig
|
|
493
|
+
if "clientconfig" in benchmark_config:
|
|
494
|
+
clientconfig = benchmark_config["clientconfig"]
|
|
495
|
+
if isinstance(clientconfig, list):
|
|
496
|
+
for config_item in clientconfig:
|
|
497
|
+
if "install_steps" in config_item:
|
|
498
|
+
steps = config_item["install_steps"]
|
|
499
|
+
if isinstance(steps, list):
|
|
500
|
+
install_commands.extend(steps)
|
|
501
|
+
logging.info(
|
|
502
|
+
f"📦 Found {len(steps)} install steps in clientconfig"
|
|
503
|
+
)
|
|
504
|
+
elif isinstance(clientconfig, dict):
|
|
505
|
+
if "install_steps" in clientconfig:
|
|
506
|
+
steps = clientconfig["install_steps"]
|
|
507
|
+
if isinstance(steps, list):
|
|
508
|
+
install_commands.extend(steps)
|
|
509
|
+
logging.info(f"📦 Found {len(steps)} install steps in clientconfig")
|
|
510
|
+
|
|
511
|
+
# Execute all install commands
|
|
512
|
+
if install_commands:
|
|
513
|
+
logging.info(f"🔧 Executing {len(install_commands)} installation commands...")
|
|
514
|
+
for i, command in enumerate(install_commands, 1):
|
|
515
|
+
logging.info(f"📋 Step {i}/{len(install_commands)}: {command}")
|
|
516
|
+
|
|
517
|
+
install_result = execute_remote_commands(
|
|
518
|
+
server_public_ip, username, private_key, install_commands, db_ssh_port
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
# Check results
|
|
522
|
+
for i, (recv_exit_status, stdout, stderr) in enumerate(install_result):
|
|
523
|
+
if recv_exit_status != 0:
|
|
524
|
+
logging.warning(
|
|
525
|
+
f"⚠️ Install step {i+1} returned exit code {recv_exit_status}"
|
|
526
|
+
)
|
|
527
|
+
logging.warning(f"Command: {install_commands[i]}")
|
|
528
|
+
if stderr:
|
|
529
|
+
logging.warning(f"STDERR: {''.join(stderr).strip()}")
|
|
530
|
+
if stdout:
|
|
531
|
+
logging.warning(f"STDOUT: {''.join(stdout).strip()}")
|
|
532
|
+
else:
|
|
533
|
+
logging.info(f"✅ Install step {i+1} completed successfully")
|
|
534
|
+
|
|
535
|
+
logging.info("🎯 All installation steps completed")
|
|
536
|
+
else:
|
|
537
|
+
logging.info("📦 No install_steps found in configuration")
|
|
538
|
+
|
|
539
|
+
|
|
460
540
|
def spin_test_standalone_redis(
|
|
461
541
|
server_public_ip,
|
|
462
542
|
username,
|
|
@@ -468,6 +548,7 @@ def spin_test_standalone_redis(
|
|
|
468
548
|
modules_configuration_parameters_map=None,
|
|
469
549
|
custom_redis_conf_path=None,
|
|
470
550
|
custom_redis_server_path=None,
|
|
551
|
+
benchmark_config=None,
|
|
471
552
|
):
|
|
472
553
|
"""
|
|
473
554
|
Setup standalone Redis server, run INFO SERVER, print output as markdown and exit.
|
|
@@ -494,6 +575,12 @@ def spin_test_standalone_redis(
|
|
|
494
575
|
server_public_ip, username, private_key, create_dir_commands, db_ssh_port
|
|
495
576
|
)
|
|
496
577
|
|
|
578
|
+
# Execute install_steps from dbconfig and clientconfig if present
|
|
579
|
+
if benchmark_config is not None:
|
|
580
|
+
execute_install_steps(
|
|
581
|
+
benchmark_config, server_public_ip, username, private_key, db_ssh_port
|
|
582
|
+
)
|
|
583
|
+
|
|
497
584
|
# Ensure Redis server is available (only if not using custom binary)
|
|
498
585
|
if custom_redis_server_path is None:
|
|
499
586
|
ensure_redis_server_available(
|
|
@@ -509,6 +596,11 @@ def spin_test_standalone_redis(
|
|
|
509
596
|
remote_redis_server_path = None
|
|
510
597
|
|
|
511
598
|
if custom_redis_conf_path:
|
|
599
|
+
# Convert relative paths to absolute paths
|
|
600
|
+
custom_redis_conf_path = os.path.abspath(
|
|
601
|
+
os.path.expanduser(custom_redis_conf_path)
|
|
602
|
+
)
|
|
603
|
+
|
|
512
604
|
if not os.path.exists(custom_redis_conf_path):
|
|
513
605
|
logging.error(
|
|
514
606
|
f"❌ Custom redis.conf file not found: {custom_redis_conf_path}"
|
|
@@ -516,7 +608,9 @@ def spin_test_standalone_redis(
|
|
|
516
608
|
return False
|
|
517
609
|
|
|
518
610
|
remote_redis_conf_path = f"{temporary_dir}/redis.conf"
|
|
519
|
-
logging.info(
|
|
611
|
+
logging.info(
|
|
612
|
+
f"📁 Copying custom redis.conf from {custom_redis_conf_path} to {remote_redis_conf_path}"
|
|
613
|
+
)
|
|
520
614
|
|
|
521
615
|
copy_result = copy_file_to_remote_setup(
|
|
522
616
|
server_public_ip,
|
|
@@ -532,8 +626,17 @@ def spin_test_standalone_redis(
|
|
|
532
626
|
if not copy_result:
|
|
533
627
|
logging.error("❌ Failed to copy redis.conf to remote host")
|
|
534
628
|
return False
|
|
629
|
+
else:
|
|
630
|
+
logging.info(
|
|
631
|
+
f"✅ Successfully copied redis.conf to {remote_redis_conf_path}"
|
|
632
|
+
)
|
|
535
633
|
|
|
536
634
|
if custom_redis_server_path:
|
|
635
|
+
# Convert relative paths to absolute paths
|
|
636
|
+
custom_redis_server_path = os.path.abspath(
|
|
637
|
+
os.path.expanduser(custom_redis_server_path)
|
|
638
|
+
)
|
|
639
|
+
|
|
537
640
|
if not os.path.exists(custom_redis_server_path):
|
|
538
641
|
logging.error(
|
|
539
642
|
f"❌ Custom redis-server binary not found: {custom_redis_server_path}"
|
|
@@ -541,7 +644,9 @@ def spin_test_standalone_redis(
|
|
|
541
644
|
return False
|
|
542
645
|
|
|
543
646
|
remote_redis_server_path = f"{temporary_dir}/redis-server"
|
|
544
|
-
logging.info(
|
|
647
|
+
logging.info(
|
|
648
|
+
f"📁 Copying custom redis-server binary from {custom_redis_server_path} to {remote_redis_server_path}"
|
|
649
|
+
)
|
|
545
650
|
|
|
546
651
|
copy_result = copy_file_to_remote_setup(
|
|
547
652
|
server_public_ip,
|
|
@@ -570,7 +675,9 @@ def spin_test_standalone_redis(
|
|
|
570
675
|
f"⚠️ Failed to make redis-server binary executable: {stderr}"
|
|
571
676
|
)
|
|
572
677
|
else:
|
|
573
|
-
logging.info(
|
|
678
|
+
logging.info(
|
|
679
|
+
f"✅ Successfully copied and made executable: {remote_redis_server_path}"
|
|
680
|
+
)
|
|
574
681
|
|
|
575
682
|
# Copy modules if provided
|
|
576
683
|
remote_module_files = None
|
|
@@ -597,7 +704,14 @@ def spin_test_standalone_redis(
|
|
|
597
704
|
|
|
598
705
|
# Generate Redis startup command
|
|
599
706
|
logfile = "redis-spin-test.log"
|
|
600
|
-
|
|
707
|
+
|
|
708
|
+
# Log what paths we're using
|
|
709
|
+
logging.info(f"🔧 Redis command generation:")
|
|
710
|
+
logging.info(f" - Custom server path: {remote_redis_server_path}")
|
|
711
|
+
logging.info(f" - Custom config path: {remote_redis_conf_path}")
|
|
712
|
+
logging.info(f" - Module files: {remote_module_files}")
|
|
713
|
+
|
|
714
|
+
_, redis_cmd = generate_remote_standalone_redis_cmd(
|
|
601
715
|
logfile,
|
|
602
716
|
redis_configuration_parameters,
|
|
603
717
|
remote_module_files,
|
|
@@ -689,8 +803,8 @@ def spin_test_standalone_redis(
|
|
|
689
803
|
"Disk Space",
|
|
690
804
|
]
|
|
691
805
|
|
|
692
|
-
for
|
|
693
|
-
|
|
806
|
+
for label, (recv_exit_status, stdout, stderr) in zip(
|
|
807
|
+
system_labels, system_results
|
|
694
808
|
):
|
|
695
809
|
if recv_exit_status == 0 and stdout:
|
|
696
810
|
output = "".join(stdout).strip()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.43
|
|
4
4
|
Summary: Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... ).
|
|
5
5
|
Author: filipecosta90
|
|
6
6
|
Author-email: filipecosta.90@gmail.com
|
|
@@ -211,7 +211,7 @@ redisbench_admin/run_local/local_db.py,sha256=9vINqKOs-wDMFEuEHT0I8KO9YnEo_h4NWN
|
|
|
211
211
|
redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
|
|
212
212
|
redisbench_admin/run_local/run_local.py,sha256=QHnGfVAaVuct7t0WrWyQpbirC3MWX7fQF5-kXU_pJBs,34834
|
|
213
213
|
redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
214
|
-
redisbench_admin/run_remote/args.py,sha256=
|
|
214
|
+
redisbench_admin/run_remote/args.py,sha256=P7azI3m5jJJBovD9rLCvFWjVNveMcu7FVZbEUjdDn0c,4866
|
|
215
215
|
redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
|
|
216
216
|
redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
217
217
|
redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
|
|
@@ -220,8 +220,8 @@ redisbench_admin/run_remote/remote_db.py,sha256=EEDeiOZk-godr5EINscEkOJLGWUN3gFf
|
|
|
220
220
|
redisbench_admin/run_remote/remote_env.py,sha256=Ux_0QT1unNRlKl3cakzjG5Px1uuxOOfBoF_pnalx_T8,4936
|
|
221
221
|
redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
|
|
222
222
|
redisbench_admin/run_remote/remote_helpers.py,sha256=skWeGyDJBmyx_UwUekT3N3_nOJvF2-Hvu-E7vKlO9gg,10598
|
|
223
|
-
redisbench_admin/run_remote/run_remote.py,sha256=
|
|
224
|
-
redisbench_admin/run_remote/standalone.py,sha256=
|
|
223
|
+
redisbench_admin/run_remote/run_remote.py,sha256=VSKPAh-ky8ihwtlx8k2ZTIkF-bV3h40LmZ7A9LvrTsE,76460
|
|
224
|
+
redisbench_admin/run_remote/standalone.py,sha256=TY9kcie3cZEC72ApnZGzHpRu-2oYwnqvvHvpiIQbyMk,32703
|
|
225
225
|
redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
|
|
226
226
|
redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
227
227
|
redisbench_admin/utils/benchmark_config.py,sha256=bC2C6rnj89wkkSlOXyyfe0N15unn_M1t1zfskfVkb98,21387
|
|
@@ -235,8 +235,8 @@ redisbench_admin/utils/utils.py,sha256=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6r
|
|
|
235
235
|
redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
236
236
|
redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
|
|
237
237
|
redisbench_admin/watchdog/watchdog.py,sha256=0wWYge3x_OMxWrzazNhJif2NK4tKsI963HVZqjczRag,6189
|
|
238
|
-
redisbench_admin-0.11.
|
|
239
|
-
redisbench_admin-0.11.
|
|
240
|
-
redisbench_admin-0.11.
|
|
241
|
-
redisbench_admin-0.11.
|
|
242
|
-
redisbench_admin-0.11.
|
|
238
|
+
redisbench_admin-0.11.43.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
239
|
+
redisbench_admin-0.11.43.dist-info/METADATA,sha256=UNlX9IOVDskYPuGhnpCSglVyoBBj5PZksnch-G-r5O4,5596
|
|
240
|
+
redisbench_admin-0.11.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
241
|
+
redisbench_admin-0.11.43.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
242
|
+
redisbench_admin-0.11.43.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|