forked from mtusi2026/mtusi2026lab4
35 lines
2.7 KiB
Plaintext
35 lines
2.7 KiB
Plaintext
python student-tests/check_stack.py
|
|
docker: 29.6.2
|
|
compose: 5.3.1
|
|
container_name: not set for any service (replicas of one service are possible)
|
|
api replicas running: 2 -> ['901d91ace549', 'c0f257b4b378'] (deploy.replicas = 2)
|
|
|
|
service container cpus memory published ports networks
|
|
lb 57f9ebc04460 0.50 128Mi 127.0.0.1:8080->8080/tcp, 127.0.0.1:8081->8081/tcp, 127.0.0.1:8404->8404/tcp edge
|
|
api 901d91ace549 1.00 512Mi - backend, edge
|
|
postgres b4b2a3cf061f 1.00 512Mi - backend
|
|
api c0f257b4b378 1.00 512Mi - backend, edge
|
|
s3 cf488bd53603 0.50 512Mi - backend
|
|
valkey d4851200ad55 0.50 128Mi - backend
|
|
|
|
published: only lb, only on 127.0.0.1 (api replicas have no ports)
|
|
balancer: every api server is under the /health/ready check, no backup servers -> api1 UP (L7OK), api2 UP (L7OK)
|
|
limits: every running container has CPU and RAM limits
|
|
networks: lb -> edge; api -> edge + backend; postgres, valkey, s3 -> backend (internal: no way out)
|
|
s3: no published ports; master/filer web UIs only on 127.0.0.1 inside the container; IAM API off; pinned image; volume s3data
|
|
secrets: api -> cache_url, database_url, s3_access_key_id, s3_secret_access_key; migrate -> database_url; lb -> none; postgres -> postgres_password; valkey -> valkey_acl; s3 -> s3_config; s3-init -> s3_root_password, s3_root_user
|
|
images: lb haproxy:3.2.25-alpine; api mtusi-messenger:lab4; postgres postgres:17.10-bookworm; valkey valkey/valkey:8.1.9; s3 chrislusf/seaweedfs:4.44
|
|
PASS: one entry point (lb on 127.0.0.1), >= 2 api replicas without ports and container_name, only ready replicas get traffic, CPU/RAM limits everywhere, stores (incl. S3) only on the internal network, S3 admin credentials only in s3-init
|
|
docker compose ps -a --format "table {{.Service}}\t{{.ID}}\t{{.Status}}"
|
|
SERVICE CONTAINER ID STATUS
|
|
api c0f257b4b378 Up About a minute (healthy)
|
|
api 901d91ace549 Up About a minute (healthy)
|
|
lb 57f9ebc04460 Up About a minute (healthy)
|
|
migrate 51b3180c16d9 Exited (0) About a minute ago
|
|
postgres b4b2a3cf061f Up 4 minutes (healthy)
|
|
s3 cf488bd53603 Up 4 minutes (healthy)
|
|
s3-init f596754a9e8b Exited (0) About a minute ago
|
|
valkey d4851200ad55 Up 4 minutes (healthy)
|
|
s3-init-1 | s3-init: bucket messenger-attachments already exists; anonymous access: 403 (private)
|
|
migrate-1 | 2026-10-22 14:01:24,642 INFO messenger.db: Миграции применены: 001_core, 002_sessions, 003_text_as_bytes, 004_message_idempotency, 005_attachments
|