chore(lab5): remove stale templates and refresh source comments

This commit is contained in:
Mikhail Verkovykh
2026-11-20 19:05:23 +03:00
parent fec2882c9a
commit 1ce93185af
49 changed files with 33 additions and 5324 deletions
-7
View File
@@ -1,7 +0,0 @@
# Инфраструктура студента
Здесь разместите конфигурации выбранных сервисов; основную топологию — в корневом compose.yaml/stack.yaml. `compose.example.yaml` — только worksheet ролей и намеренно не запускается. `contracts/infrastructure.json` задаёт минимальные роли, не готовые образы/пароли.
В REPORT.md сопоставьте роль → service name → версия/digest → health/readiness → volume → сеть/порт → способ передачи credentials. Приведите bootstrap (schema, bucket, broker topology, а с lab6 provisioning) и безопасное повторение этих команд.
Приложение строится из исходников. Не используйте заранее существующий образ преподавательского сервера вместо своей реализации. Restart hook перезапускает все соответствующие stores с volumes; failover hook останавливает только заданную API-реплику.
+3 -3
View File
@@ -13,7 +13,7 @@ set -eu
: "${S3_APP_POLICY:?S3_APP_POLICY is required}"
: "${S3_POLICY_TEMPLATE:?S3_POLICY_TEMPLATE is required}"
# AGENT: RustFS uses the user name as the access key, so the scoped identity
# RustFS uses the user name as the access key, so the scoped identity
# the API signs with (S3_ACCESS_KEY_ID) must be the same string as S3_APP_USER.
# Divergence used to bootstrap successfully but every API readiness probe then
# saw 403 Forbidden, which is much harder to diagnose than a failed startup.
@@ -22,7 +22,7 @@ if [ "$S3_APP_USER" != "$S3_ACCESS_KEY_ID" ]; then
exit 1
fi
# AGENT: rc stores its alias file in $HOME. The image runs as an unprivileged
# rc stores its alias file in $HOME. The image runs as an unprivileged
# user, so point HOME at a writable temporary directory.
export HOME="${HOME:-/tmp}"
ALIAS=local
@@ -49,7 +49,7 @@ rc bucket anonymous set private "$ALIAS/$S3_BUCKET" >/dev/null
# The policy is rendered from a template because the bucket name is part of
# every resource ARN and is configurable in .env.
sed "s|__BUCKET__|$S3_BUCKET|g" "$S3_POLICY_TEMPLATE" > /tmp/api-policy.json
sed "s|__BUCKET__|$S3_BUCKET|g" "$S3_POLICY_TEMPLATE" >/tmp/api-policy.json
# All three admin calls are replaces/updates, not creates that fail on a second
# run: policy create replaces the named document, user add updates the secret,