diff --git a/instrumented/deploy_minio.py b/instrumented/deploy_minio.py index 8bd5e66..a83a7ab 100755 --- a/instrumented/deploy_minio.py +++ b/instrumented/deploy_minio.py @@ -2,6 +2,7 @@ import yaml, os, sys, time, pathlib, unshare, socket, shutil STORAGE_PATH = os.path.join(os.getcwd(), '.minio-testnet') +#STORAGE_PATH = os.path.join('/mnt/windows', '.minio-testnet') MINIO_PATH = '/srv' HOSTS_PATH = os.path.join(STORAGE_PATH, 'hosts.txt') UNIX_SOCK = os.path.join(STORAGE_PATH, 'deploy.sock') @@ -31,11 +32,8 @@ def leader(): gen_hosts(ips) [ co.send(f"{n_serv}\n".encode()) for co in fl ] - os.system(f"mount --bind {HOSTS_PATH} /etc/hosts") - - data_path = DATA_PATH(os.environ['ID']) - os.makedirs(data_path) - os.system(f"mount --bind {data_path} {MINIO_PATH}") + mount_hosts() + mount_disk() run_minio(n_serv) @@ -53,16 +51,18 @@ def follower(): sock.send(f"{os.environ['IP']}\n".encode()) n_serv = int(co.readline()) - os.system(f"mount --bind {HOSTS_PATH} /etc/hosts") - - data_path = DATA_PATH(os.environ['ID']) - os.makedirs(data_path) + mount_hosts() + mount_disk() run_minio(n_serv) def run_minio(count): - #print("minio server --console-address ':9001' --address [" + os.environ['IP'] + "]:9000 http://minio{1.."+str(count)+"}"+MINIO_PATH+" > "+ STORAGE_PATH + "/minio."+ os.environ['ID'] +".log 2>&1") - os.system("minio server --console-address ':9001' --address [" + os.environ['IP'] + "]:9000 http://minio{1.."+str(count)+"}"+MINIO_PATH+" > "+ STORAGE_PATH + "/minio."+ os.environ['ID'] +".log 2>&1") + cmd = f"minio server --console-address ':9001' --address [{os.environ['IP']}]:9000" + for i in range(1,count+1): + cmd += f" http://minio{i}:9000{DATA_PATH(i)}" + cmd += f" > {os.path.join(STORAGE_PATH, 'minio'+os.environ['ID']+'.log')} 2>&1" + os.system(cmd) + print("done: ", cmd) def gen_hosts(ips): with open(HOSTS_PATH, 'w') as f: @@ -75,4 +75,11 @@ def n_servers(): n_servers = len(netw['servers']) return n_servers +def mount_disk(): + data_path = DATA_PATH(os.environ['ID']) + os.makedirs(data_path) + +def mount_hosts(): + os.system(f"mount --bind {HOSTS_PATH} /etc/hosts") + __name__ == '__main__' and main() diff --git a/instrumented/minio-runner.sh b/instrumented/minio-runner.sh new file mode 100755 index 0000000..af0ec8c --- /dev/null +++ b/instrumented/minio-runner.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +export ENDPOINT=[fc00:9a7a:9e::1]:9000 +export AWS_ACCESS_KEY_ID=minioadmin +export AWS_SECRET_ACCESS_KEY=minioadmin + +/home/quentin/go/bin/s3lat | tee 50ms.minio.csv diff --git a/instrumented/runner.sh b/instrumented/runner.sh index 5a83284..3f6e5c0 100755 --- a/instrumented/runner.sh +++ b/instrumented/runner.sh @@ -8,6 +8,9 @@ cert=/tmp/garage.pem" tcp4-connect:localhost:3900 & sleep 1 +export SSL=1 +export SSL_INSECURE=1 +export REGION=garage export ENDPOINT=localhost:4443 export AWS_ACCESS_KEY_ID=GK4ea45d2f25091883071e0b73 export AWS_SECRET_ACCESS_KEY=334f7b0ef233571c67b302c5197e6b8c7150da1907e4e530caa82e041d725ecf