forked from mtusi2026/mtusi2026lab6
lab6
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
PYTHON ?= python3
|
||||
VERSION ?= $(shell git describe --always --dirty 2>/dev/null || echo dev)
|
||||
export VERSION
|
||||
BASE_URL ?= http://localhost:8080
|
||||
CA_FILE ?=
|
||||
ACTION_SCRIPT ?=
|
||||
@@ -6,11 +8,12 @@ PIPELINE ?= 2
|
||||
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
||||
PYTHON_LOCAL = env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 $(PYTHON)
|
||||
|
||||
.PHONY: help check validate test test-attachments test-presign load test-persistence test-failover smoke-local load-local test-idempotency test-lb-readiness up down ps logs
|
||||
.PHONY: help check validate test test-attachments test-presign load test-persistence test-failover smoke-local load-local test-idempotency test-lb-readiness test-observability test-slo up up-base init-secrets down ps logs
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@echo "up/down/ps/logs: lab3 stand from compose.yaml (LB + API_REPLICAS replicas + stores)"
|
||||
@echo "up: lab6 stand with telemetry profile; up-base: lab5 regression without telemetry"
|
||||
@echo "down/ps/logs: same profile; test-observability/test-slo: lab6 checks"
|
||||
|
||||
check:
|
||||
$(PYTHON) scripts/check_contract.py
|
||||
@@ -37,6 +40,14 @@ test-faults:
|
||||
test-track2:
|
||||
$(PYTHON_LOCAL) scripts/lab5_track2.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
# Lab6 observability and SLO checks (stand must be running with the telemetry profile).
|
||||
test-observability:
|
||||
$(PYTHON_LOCAL) scripts/check_evidence.py
|
||||
$(PYTHON_LOCAL) scripts/lab6_verify.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
test-slo:
|
||||
$(PYTHON_LOCAL) scripts/lab6_track2.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
load:
|
||||
$(PYTHON_LOCAL) tests/load.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
@@ -69,17 +80,26 @@ COMPOSE_BIN ?= docker compose
|
||||
COMPOSE_FILE ?= compose.yaml
|
||||
ENV_FILE ?= .env
|
||||
|
||||
up:
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) up -d --build
|
||||
TELEMETRY_PROFILE ?= telemetry
|
||||
|
||||
up: init-secrets
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) --profile $(TELEMETRY_PROFILE) up -d --build
|
||||
|
||||
# Lab5 regression without the telemetry profile.
|
||||
up-base: init-secrets
|
||||
TELEMETRY_ENABLED=0 $(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) up -d --build
|
||||
|
||||
init-secrets:
|
||||
./scripts/init-secrets.sh
|
||||
|
||||
down:
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) down
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) --profile $(TELEMETRY_PROFILE) down
|
||||
|
||||
ps:
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) ps
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) --profile $(TELEMETRY_PROFILE) ps
|
||||
|
||||
logs:
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) logs -f --tail 100
|
||||
$(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) --profile $(TELEMETRY_PROFILE) logs -f --tail 100
|
||||
|
||||
# Operator views: the failed registry is PostgreSQL, the DLQ is a backstop.
|
||||
jobs-failed:
|
||||
|
||||
Reference in New Issue
Block a user