redisbench-admin 0.11.69__py3-none-any.whl → 0.11.70__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/cluster.py +48 -4
- redisbench_admin/run_remote/remote_db.py +3 -0
- redisbench_admin/run_remote/run_remote.py +2 -0
- redisbench_admin/run_remote/standalone.py +44 -2
- {redisbench_admin-0.11.69.dist-info → redisbench_admin-0.11.70.dist-info}/METADATA +1 -1
- {redisbench_admin-0.11.69.dist-info → redisbench_admin-0.11.70.dist-info}/RECORD +9 -9
- {redisbench_admin-0.11.69.dist-info → redisbench_admin-0.11.70.dist-info}/WHEEL +1 -1
- {redisbench_admin-0.11.69.dist-info → redisbench_admin-0.11.70.dist-info}/entry_points.txt +0 -0
- {redisbench_admin-0.11.69.dist-info → redisbench_admin-0.11.70.dist-info}/licenses/LICENSE +0 -0
redisbench_admin/run/cluster.py
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
# All rights reserved.
|
|
5
5
|
#
|
|
6
6
|
import logging
|
|
7
|
+
import os
|
|
7
8
|
|
|
8
|
-
from redisbench_admin.
|
|
9
|
+
from redisbench_admin.run_remote.consts import remote_module_file_dir
|
|
10
|
+
from redisbench_admin.utils.remote import copy_file_to_remote_setup, execute_remote_commands
|
|
9
11
|
|
|
10
12
|
from redisbench_admin.environments.oss_cluster import generate_cluster_redis_server_args
|
|
11
13
|
from redisbench_admin.utils.utils import wait_for_conn
|
|
@@ -116,6 +118,7 @@ def spin_up_redis_cluster_remote_redis(
|
|
|
116
118
|
redis_7=True,
|
|
117
119
|
remote_symlinks=None,
|
|
118
120
|
ld_library_paths=None,
|
|
121
|
+
custom_redis_server_path=None,
|
|
119
122
|
):
|
|
120
123
|
# Import the functions from standalone module
|
|
121
124
|
from redisbench_admin.run_remote.standalone import (
|
|
@@ -124,8 +127,46 @@ def spin_up_redis_cluster_remote_redis(
|
|
|
124
127
|
build_ld_library_path_prefix,
|
|
125
128
|
)
|
|
126
129
|
|
|
127
|
-
#
|
|
128
|
-
|
|
130
|
+
# Handle custom redis-server binary
|
|
131
|
+
remote_redis_server_path = None
|
|
132
|
+
if custom_redis_server_path:
|
|
133
|
+
if not os.path.exists(custom_redis_server_path):
|
|
134
|
+
logging.error(
|
|
135
|
+
f"Custom redis-server binary not found: {custom_redis_server_path}"
|
|
136
|
+
)
|
|
137
|
+
raise Exception(
|
|
138
|
+
f"Custom redis-server binary not found: {custom_redis_server_path}"
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
remote_redis_server_path = f"{remote_module_file_dir}/redis-server"
|
|
142
|
+
logging.info(
|
|
143
|
+
f"Copying custom redis-server binary to remote host: {custom_redis_server_path} -> {remote_redis_server_path}"
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
copy_result = copy_file_to_remote_setup(
|
|
147
|
+
server_public_ip,
|
|
148
|
+
username,
|
|
149
|
+
private_key,
|
|
150
|
+
custom_redis_server_path,
|
|
151
|
+
remote_redis_server_path,
|
|
152
|
+
None,
|
|
153
|
+
ssh_port,
|
|
154
|
+
False, # don't continue on error
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
if not copy_result:
|
|
158
|
+
logging.error("Failed to copy redis-server binary to remote host")
|
|
159
|
+
raise Exception("Failed to copy redis-server binary to remote host")
|
|
160
|
+
|
|
161
|
+
# Make the binary executable
|
|
162
|
+
chmod_commands = [f"chmod +x {remote_redis_server_path}"]
|
|
163
|
+
execute_remote_commands(
|
|
164
|
+
server_public_ip, username, private_key, chmod_commands, ssh_port
|
|
165
|
+
)
|
|
166
|
+
logging.info("Custom redis-server binary copied and made executable")
|
|
167
|
+
else:
|
|
168
|
+
# Ensure redis-server is available before trying to start cluster (only if not using custom binary)
|
|
169
|
+
ensure_redis_server_available(server_public_ip, username, private_key, ssh_port)
|
|
129
170
|
|
|
130
171
|
# Setup symlinks on remote server if specified
|
|
131
172
|
if remote_symlinks:
|
|
@@ -140,6 +181,9 @@ def spin_up_redis_cluster_remote_redis(
|
|
|
140
181
|
if ld_prefix:
|
|
141
182
|
logging.info(f"Using LD_LIBRARY_PATH prefix: {ld_prefix}")
|
|
142
183
|
|
|
184
|
+
# Determine which redis-server binary to use
|
|
185
|
+
redis_server_binary = remote_redis_server_path if remote_redis_server_path else "redis-server"
|
|
186
|
+
|
|
143
187
|
logging.info("Generating the remote redis-server command arguments")
|
|
144
188
|
redis_process_commands = []
|
|
145
189
|
logfiles = []
|
|
@@ -148,7 +192,7 @@ def spin_up_redis_cluster_remote_redis(
|
|
|
148
192
|
shard_port = master_shard_id + start_port - 1
|
|
149
193
|
|
|
150
194
|
command, logfile = generate_cluster_redis_server_args(
|
|
151
|
-
|
|
195
|
+
redis_server_binary,
|
|
152
196
|
dbdir_folder,
|
|
153
197
|
remote_module_files,
|
|
154
198
|
server_private_ip,
|
|
@@ -108,6 +108,7 @@ def remote_db_spin(
|
|
|
108
108
|
remote_symlinks=None,
|
|
109
109
|
ld_library_paths=None,
|
|
110
110
|
extra_libs=None,
|
|
111
|
+
custom_redis_server_path=None,
|
|
111
112
|
):
|
|
112
113
|
(
|
|
113
114
|
_,
|
|
@@ -180,6 +181,7 @@ def remote_db_spin(
|
|
|
180
181
|
redis_7,
|
|
181
182
|
remote_symlinks,
|
|
182
183
|
ld_library_paths,
|
|
184
|
+
custom_redis_server_path,
|
|
183
185
|
)
|
|
184
186
|
try:
|
|
185
187
|
for p in range(cluster_start_port, cluster_start_port + shard_count):
|
|
@@ -232,6 +234,7 @@ def remote_db_spin(
|
|
|
232
234
|
redis_7,
|
|
233
235
|
remote_symlinks,
|
|
234
236
|
ld_library_paths,
|
|
237
|
+
custom_redis_server_path,
|
|
235
238
|
)
|
|
236
239
|
full_logfiles.append(full_logfile)
|
|
237
240
|
local_redis_conn, ssh_tunnel = ssh_tunnel_redisconn(
|
|
@@ -155,6 +155,7 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
155
155
|
remote_symlinks = args.remote_symlink
|
|
156
156
|
ld_library_paths = args.ld_library_path
|
|
157
157
|
extra_libs = args.extra_lib
|
|
158
|
+
custom_redis_server_path = args.redis_server_binary
|
|
158
159
|
if WH_TOKEN is not None:
|
|
159
160
|
webhook_notifications_active = True
|
|
160
161
|
|
|
@@ -666,6 +667,7 @@ def run_remote_command_logic(args, project_name, project_version):
|
|
|
666
667
|
remote_symlinks,
|
|
667
668
|
ld_library_paths,
|
|
668
669
|
extra_libs,
|
|
670
|
+
custom_redis_server_path,
|
|
669
671
|
)
|
|
670
672
|
if benchmark_type == "read-only" or reuse_mixed:
|
|
671
673
|
ro_benchmark_set(
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import logging
|
|
8
8
|
import os
|
|
9
9
|
|
|
10
|
+
from redisbench_admin.run_remote.consts import remote_module_file_dir
|
|
10
11
|
from redisbench_admin.utils.remote import (
|
|
11
12
|
copy_file_to_remote_setup,
|
|
12
13
|
execute_remote_commands,
|
|
@@ -350,9 +351,48 @@ def spin_up_standalone_remote_redis(
|
|
|
350
351
|
redis_7=True,
|
|
351
352
|
remote_symlinks=None,
|
|
352
353
|
ld_library_paths=None,
|
|
354
|
+
custom_redis_server_path=None,
|
|
353
355
|
):
|
|
354
|
-
#
|
|
355
|
-
|
|
356
|
+
# Handle custom redis-server binary
|
|
357
|
+
remote_redis_server_path = None
|
|
358
|
+
if custom_redis_server_path:
|
|
359
|
+
if not os.path.exists(custom_redis_server_path):
|
|
360
|
+
logging.error(
|
|
361
|
+
f"Custom redis-server binary not found: {custom_redis_server_path}"
|
|
362
|
+
)
|
|
363
|
+
raise Exception(
|
|
364
|
+
f"Custom redis-server binary not found: {custom_redis_server_path}"
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
remote_redis_server_path = f"{remote_module_file_dir}/redis-server"
|
|
368
|
+
logging.info(
|
|
369
|
+
f"Copying custom redis-server binary to remote host: {custom_redis_server_path} -> {remote_redis_server_path}"
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
copy_result = copy_file_to_remote_setup(
|
|
373
|
+
server_public_ip,
|
|
374
|
+
username,
|
|
375
|
+
private_key,
|
|
376
|
+
custom_redis_server_path,
|
|
377
|
+
remote_redis_server_path,
|
|
378
|
+
None,
|
|
379
|
+
port,
|
|
380
|
+
False, # don't continue on error
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
if not copy_result:
|
|
384
|
+
logging.error("Failed to copy redis-server binary to remote host")
|
|
385
|
+
raise Exception("Failed to copy redis-server binary to remote host")
|
|
386
|
+
|
|
387
|
+
# Make the binary executable
|
|
388
|
+
chmod_commands = [f"chmod +x {remote_redis_server_path}"]
|
|
389
|
+
execute_remote_commands(
|
|
390
|
+
server_public_ip, username, private_key, chmod_commands, port
|
|
391
|
+
)
|
|
392
|
+
logging.info("Custom redis-server binary copied and made executable")
|
|
393
|
+
else:
|
|
394
|
+
# Ensure redis-server is available before trying to start it (only if not using custom binary)
|
|
395
|
+
ensure_redis_server_available(server_public_ip, username, private_key, port)
|
|
356
396
|
|
|
357
397
|
# Setup symlinks on remote server if specified
|
|
358
398
|
if remote_symlinks:
|
|
@@ -362,6 +402,7 @@ def spin_up_standalone_remote_redis(
|
|
|
362
402
|
if not symlink_success:
|
|
363
403
|
logging.warning("Some symlinks failed to create, continuing anyway...")
|
|
364
404
|
|
|
405
|
+
logging.info("Generating Redis startup comman with custom redis-server path: {remote_redis_server_path}")
|
|
365
406
|
full_logfile, initial_redis_cmd = generate_remote_standalone_redis_cmd(
|
|
366
407
|
logfile,
|
|
367
408
|
redis_configuration_parameters,
|
|
@@ -369,6 +410,7 @@ def spin_up_standalone_remote_redis(
|
|
|
369
410
|
temporary_dir,
|
|
370
411
|
modules_configuration_parameters_map,
|
|
371
412
|
redis_7,
|
|
413
|
+
custom_redis_server_path=remote_redis_server_path,
|
|
372
414
|
)
|
|
373
415
|
|
|
374
416
|
# Prepend LD_LIBRARY_PATH if specified
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.70
|
|
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
|
License-File: LICENSE
|
|
6
6
|
Author: filipecosta90
|
|
@@ -50,7 +50,7 @@ redisbench_admin/run/ann/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8
|
|
|
50
50
|
redisbench_admin/run/ann/ann.py,sha256=h8VE7fouyNkpMSjNhgjkI_R-aWb-lKIKxvNZPOO8pFY,1288
|
|
51
51
|
redisbench_admin/run/args.py,sha256=7flScWAFEbJAJ7YfBgPmxlFGLwTNPQmG2DnNTGFD5h8,8504
|
|
52
52
|
redisbench_admin/run/asm.py,sha256=Hybna8Xs7SnsP2IBwg6kMsiGPoCK0TlvhyKX94XmOEs,16738
|
|
53
|
-
redisbench_admin/run/cluster.py,sha256=
|
|
53
|
+
redisbench_admin/run/cluster.py,sha256=GBIe1NtgvT2Yq0vkYlqweTi2k7kxAI87qU6T5WNUf6E,8965
|
|
54
54
|
redisbench_admin/run/common.py,sha256=1zJPQtIk3tjvLTjNUgxvDdcviN73psiaDBQ8cRJMIl8,29341
|
|
55
55
|
redisbench_admin/run/ftsb/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
56
56
|
redisbench_admin/run/ftsb/ftsb.py,sha256=0SS4InU7e9x-yZ0u-D1yOYJ0u0G37IwVWwiK78LRXE8,2712
|
|
@@ -91,12 +91,12 @@ redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhq
|
|
|
91
91
|
redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
92
92
|
redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
|
|
93
93
|
redisbench_admin/run_remote/remote_client.py,sha256=rRmDro1weto01wzqYpId8NMPoizEzSyudXBCjYrBVMs,14128
|
|
94
|
-
redisbench_admin/run_remote/remote_db.py,sha256=
|
|
94
|
+
redisbench_admin/run_remote/remote_db.py,sha256=iDcIqDPskl2hgZm1yP2DTBnSnwvpze8hEmim97uKJ3Y,15643
|
|
95
95
|
redisbench_admin/run_remote/remote_env.py,sha256=Ux_0QT1unNRlKl3cakzjG5Px1uuxOOfBoF_pnalx_T8,4936
|
|
96
96
|
redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
|
|
97
97
|
redisbench_admin/run_remote/remote_helpers.py,sha256=pUpOU_04WRkOjuvEAxoglXLCz7kJ1T_yc6ZnP787fRQ,13517
|
|
98
|
-
redisbench_admin/run_remote/run_remote.py,sha256=
|
|
99
|
-
redisbench_admin/run_remote/standalone.py,sha256=
|
|
98
|
+
redisbench_admin/run_remote/run_remote.py,sha256=PVNfdaa8jW8Pjn0zknNSVcMA0fvv-Y8Y3waaL3xp6cw,78745
|
|
99
|
+
redisbench_admin/run_remote/standalone.py,sha256=JzB-YPKkCp7IwNqULHBn4oRItn4bDHfyTGesTLLh5O0,34813
|
|
100
100
|
redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
|
|
101
101
|
redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
102
102
|
redisbench_admin/utils/benchmark_config.py,sha256=BDUGKLekFPWJC1cZN7oNZPtf-zKbXEE0jHk0rnPh8Go,22787
|
|
@@ -110,8 +110,8 @@ redisbench_admin/utils/utils.py,sha256=ob96GLB2yEWwyyl0jwvBGTwf6NUP09g4Ip0Jx6GtD
|
|
|
110
110
|
redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
111
111
|
redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
|
|
112
112
|
redisbench_admin/watchdog/watchdog.py,sha256=0wWYge3x_OMxWrzazNhJif2NK4tKsI963HVZqjczRag,6189
|
|
113
|
-
redisbench_admin-0.11.
|
|
114
|
-
redisbench_admin-0.11.
|
|
115
|
-
redisbench_admin-0.11.
|
|
116
|
-
redisbench_admin-0.11.
|
|
117
|
-
redisbench_admin-0.11.
|
|
113
|
+
redisbench_admin-0.11.70.dist-info/METADATA,sha256=u5EasgOEtYc11cMQ77IycXKhwGFDR82dc0f3keV2w9M,5724
|
|
114
|
+
redisbench_admin-0.11.70.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
|
|
115
|
+
redisbench_admin-0.11.70.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
116
|
+
redisbench_admin-0.11.70.dist-info/licenses/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
117
|
+
redisbench_admin-0.11.70.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|