32 lines
2.5 KiB
Markdown
32 lines
2.5 KiB
Markdown
# Инфраструктура lab7
|
|
|
|
Основная запускаемая топология находится в `compose.yaml`; `compose.example.yaml` остаётся worksheet задания и не используется. Версии, healthchecks, volumes, internal networks и CPU/RAM limits зафиксированы в Compose.
|
|
|
|
| Роль | Service | Storage | Доступ |
|
|
| --- | --- | --- | --- |
|
|
| TLS ingress/LB | `ingress` / HAProxy 3.2 | stateless | `127.0.0.1:8443`; mTLS к API |
|
|
| API | `api` ×2 / локальный Go image | PostgreSQL/S3 | internal 8444 only |
|
|
| Source of truth | `postgres` 16.15 | `postgres_data` | native TLS, internal only |
|
|
| Cache | `redis` 8.10.2 | ephemeral | TLS gateway + ACL |
|
|
| Objects | `minio` pinned last release | `minio_data` | TLS gateway, scoped API/worker users; archived upstream risk в `security/SCAN_TRIAGE.md` |
|
|
| Jobs | `broker` RabbitMQ 4.1.4 | `broker_data` | TLS gateway, producer/consumer ACL |
|
|
| Secrets | `openbao` 2.4.4 | `volumes/openbao` | TLS, AppRole; operator port 18200 |
|
|
| Telemetry | Collector 0.165, Prometheus 3.16, Loki 3.7.9, Tempo 2.10.5, Grafana 13.3 | named volumes | TLS/mTLS gateway; admin ports loopback |
|
|
|
|
`scripts/bootstrap-dependencies.sh` выполняет migrations, создаёт DB roles/GRANT, private bucket/MinIO policies и RabbitMQ identities/ACL. `scripts/bootstrap-openbao.sh` выполняет operator init/unseal и AppRole/policy/KV bootstrap. Оба сценария повторяемы и не печатают secret values.
|
|
|
|
Worker намеренно ограничен одной тяжёлой image job одновременно: 1 CPU, 512 MiB, `GOMEMLIMIT=448MiB`, timeout 60 s. Истёкшие auth/idempotency rows удаляются небольшими индексированными batch, а dispatcher получает `UPDATE` attachments только для lease recovery.
|
|
|
|
```sh
|
|
make up
|
|
docker compose ps
|
|
make test
|
|
make test-security-grade4
|
|
make test-acl-grade4
|
|
make test-state-pruning-grade4
|
|
make test-telemetry-leak-grade4
|
|
make scan-grade4
|
|
```
|
|
|
|
`scripts/restart.sh` перезапускает реальные stores с сохранением volumes и требует operator unseal. `scripts/stop-one.sh` останавливает ровно одну API-реплику по opaque instance id. `scripts/rotate-secret-grade4.sh` и `scripts/rotate-leaf-grade4.sh` доказывают rotation/revocation без пересборки image. `make cleanup-lab` сохраняет named volumes, ignored operator material и pulled third-party images.
|