ЛР 7 — БВТ2303 — Брезгунова — на 5
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Lab7 solution / integration (pull_request) Blocked by required conditions

This commit is contained in:
2026-12-04 17:07:57 +03:00
parent 20afc2c790
commit ee9d70af85
129 changed files with 81564 additions and 90 deletions
+35
View File
@@ -0,0 +1,35 @@
"""One-host bootstrap. Only mtusi-lab7 Compose project is mutated."""
import os
from pathlib import Path
import subprocess
import sys
import time
ROOT=Path(__file__).resolve().parents[1]
def run(*args):
subprocess.run(args,cwd=ROOT,check=True)
def compose(*args):
run('docker','compose','--env-file','.env',*args)
if __name__=='__main__':
run(sys.executable,'scripts/setup.py')
compose('build','api1','s3','s3-bootstrap')
compose('run','--rm','--no-deps','operator','python','scripts/pki.py')
run(sys.executable,'scripts/setup.py')
compose('run','--rm','volume-init')
compose('up','-d','postgres','broker','s3','openbao')
for attempt in range(20):
try:
compose('run','--rm','--no-deps','operator','python','scripts/bootstrap.py')
compose('run','--rm','s3-bootstrap')
break
except subprocess.CalledProcessError:
if attempt==19:raise
time.sleep(2)
compose('up','-d','--no-build')
compose('up','-d','--no-deps','--force-recreate','api1-tls','api2-tls','broker-tls','otel-collector-tls','prometheus-tls','loki-tls','tempo-tls','grafana-tls')
print('Lab7 deployed. Public CA: pki/ca.crt; endpoint https://localhost:8443. Wait for healthy APIs.')