forked from mtusi2026/mtusi2026lab7
ЛР 7 — БПИ2304 — Кирюпина — на 3
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Repeatable local operator startup; no secret values in output."""
|
||||
from pathlib import Path
|
||||
import subprocess,sys,time,urllib.error
|
||||
import bao
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
def run(*args):subprocess.run(args,cwd=ROOT,check=True)
|
||||
def main():
|
||||
run(sys.executable,str(ROOT/'scripts/setup.py'))
|
||||
run('docker','compose','build')
|
||||
run('docker','compose','up','-d','db','s3','broker','bao','otel-collector','prometheus','loki','tempo','grafana','otel-collector-tls','prometheus-tls','loki-tls','tempo-tls')
|
||||
for i in range(60):
|
||||
try:bao.call('sys/init');break
|
||||
except (urllib.error.URLError,TimeoutError):time.sleep(1)
|
||||
else:raise RuntimeError('OpenBao listener unavailable')
|
||||
bao.main()
|
||||
run('docker','compose','run','--rm','migrate')
|
||||
run('docker','compose','run','--rm','s3-init')
|
||||
run('docker','compose','up','-d','--wait','--wait-timeout','90','api1','api2','worker')
|
||||
run('docker','compose','up','-d','lb')
|
||||
run('docker','compose','restart','lb')
|
||||
print('PASS: lab7 started. HTTPS https://localhost:8443; CA certs/ca.crt')
|
||||
if __name__=='__main__':main()
|
||||
Reference in New Issue
Block a user