forked from mtusi2026/mtusi2026lab4
Run the reconciler as a one-off service of the stand
The reconciler service under the reconcile profile runs the API image with the reconciler module as entrypoint and --dry-run as the default command, so docker compose run --rm --no-deps reconciler takes only flags. It gets the database URL and the limited API key of S3, which already allows listing, reading and deleting objects, a read-only root, 1 CPU and 256 MiB, and a longer S3 read timeout for listing pages. S3, PostgreSQL and the reconciler accept an optional cpuset from the environment so measurements can pin them; the default is no pinning. make reconcile ARGS=... runs a pass, make reconcile-demo and make reconcile-cost drive the track experiments, and the limits policy now covers the new service. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
91731fd317
commit
51fa19a8ee
+9
-1
@@ -22,6 +22,11 @@ POLICY = {
|
||||
"networks": ["backend"],
|
||||
},
|
||||
"migrate": {"secrets": ["database_url"], "volumes": [], "networks": ["backend"]},
|
||||
"reconciler": {
|
||||
"secrets": ["database_url", "s3_access_key_id", "s3_secret_access_key"],
|
||||
"volumes": [],
|
||||
"networks": ["backend"],
|
||||
},
|
||||
"postgres": {"secrets": ["postgres_password"], "volumes": ["pgdata"], "networks": ["backend"]},
|
||||
"valkey": {"secrets": ["valkey.conf"], "volumes": ["valkeydata"], "networks": ["backend"]},
|
||||
"k6": {"secrets": [], "volumes": [], "networks": ["edge"]},
|
||||
@@ -120,6 +125,8 @@ def main():
|
||||
"bench",
|
||||
"--profile",
|
||||
"tools",
|
||||
"--profile",
|
||||
"reconcile",
|
||||
"config",
|
||||
"--format",
|
||||
"json",
|
||||
@@ -134,7 +141,8 @@ def main():
|
||||
problems.append("no running api replicas to inspect")
|
||||
lines = [
|
||||
f"date: {time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())}",
|
||||
"$ docker compose --profile bench --profile tools config --format json (declared)",
|
||||
"$ docker compose --profile bench --profile tools --profile reconcile config --format json"
|
||||
" (declared)",
|
||||
*table(["service", "cpus/mem", "ports", "secrets", "volumes", "networks", "ro"], services),
|
||||
"",
|
||||
"$ docker inspect (running containers: hostname = X-Instance-Id, applied limits)",
|
||||
|
||||
Reference in New Issue
Block a user