forked from mtusi2026/mtusi2026lab3
оценка 4
This commit is contained in:
@@ -6,6 +6,7 @@ ENV_FILE ?= .env
|
||||
BASE_URL ?= http://localhost:8080
|
||||
CA_FILE ?=
|
||||
ACTION_SCRIPT ?=
|
||||
GRADE4_OUTPUT ?= evidence/grade4/results.json
|
||||
|
||||
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
||||
COMPOSE_CMD = $(COMPOSE) --env-file "$(ENV_FILE)"
|
||||
@@ -26,6 +27,8 @@ COMPOSE_CMD = $(COMPOSE) --env-file "$(ENV_FILE)"
|
||||
load \
|
||||
test-persistence \
|
||||
test-failover \
|
||||
rolling-update \
|
||||
grade4-experiment \
|
||||
compose-config \
|
||||
compose-build \
|
||||
compose-up \
|
||||
@@ -48,6 +51,8 @@ help:
|
||||
@echo "load: run synthetic writes against the LB entrypoint"
|
||||
@echo "test-persistence: run persistence test with ACTION_SCRIPT"
|
||||
@echo "test-failover: run replica failover test with ACTION_SCRIPT"
|
||||
@echo "rolling-update: replace API replicas one by one with surge capacity"
|
||||
@echo "grade4-experiment: run failovers, idempotency and rolling update with evidence"
|
||||
@echo "compose-config: validate resolved Compose configuration"
|
||||
@echo "compose-build: build application images"
|
||||
@echo "compose-up: start the stack"
|
||||
@@ -109,6 +114,13 @@ test-failover:
|
||||
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2)
|
||||
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
rolling-update:
|
||||
ENV_FILE="$(ENV_FILE)" ./scripts/rolling-update.sh
|
||||
|
||||
grade4-experiment:
|
||||
$(PYTHON) scripts/grade4_experiment.py --base-url "$(BASE_URL)" --env-file "$(ENV_FILE)" --output "$(GRADE4_OUTPUT)"
|
||||
$(PYTHON) scripts/render_grade4.py "$(GRADE4_OUTPUT)"
|
||||
|
||||
compose-config:
|
||||
@test -f "$(ENV_FILE)" || \
|
||||
(echo "$(ENV_FILE) is missing; run: make init-env"; exit 2)
|
||||
|
||||
Reference in New Issue
Block a user