scale-zone
Skill4 starsChanged 27 days agoBSD-3-ClauseView on GitHub
Add a new zone to a Ramen group, change worker count or size in a zone, rebalance load across zones, or remove a zone — through the console API with the cloud adapter doing the Kubernetes/LB work. Use when asked to scale, add capacity, add a region/zone, or drain a zone.
In this repository7 other files it gives its agents.
- docs/llms.txtllms.txt
- backup-restoreSkill
- deploy-awsSkill
- deploy-gcpSkill
- iterateSkill
- rotate-keysSkill
- testSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Only delete the global zone (DELETE $U/zones/<z>) when no environment of any group references it.
- Very specific: line 44
Never set count to 0 to "save money" — remove the zone instead.
- Very specific: line 45
Never change size or allowed_sizes without super-admin authority.
- Distinctive: line 46
Do not create zones in a region without confirming quotas (GKE Autopilot regional pods, EKS node group capacity).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scale a zone
Hierarchy: Group → Environment → Zone → Worker (docs/wiki/groups-zones.md). Zones are global objects created by a
super admin; environments attach them. Group admins change count; only super admins change size
(s 250m/512Mi, m 500m/1Gi, l 1 CPU/2Gi) and the allowed-size list. U=$RAMEN_CONSOLE_URL/api/v1, H='X-Ramen-Api-Key: $RMN'.
Add a zone (multi-zone)
- Super admin:
POST $U/zones {name:"b",provider:"gcp"|"aws"|"local",region:"<cloud zone e.g. us-central1-b>"}. Locally the zone must be one the compose adapter maps to a worker (RAMEN_LOCAL_WORKERS); otherwise stay withlocal. - Group admin:
PUT $U/groups/<g>/environments/<e> {zones:[...existing,"b"]}— the adapter creates namespaceramen-<g>-b, service account, Role/RoleBinding, Service (h2c) / NEG or gRPC Ingress, a route matching metadataramen-group: <g>+ramen-zone: b, Secret. - (super admin, cloud)
POST $U/groups/<g>/zones/b/service-accountif the environment update did not report one;PUT $U/groups/<g>/zones/b/workers {count:1,size:"s",allowed_sizes:["s","m"]}. - Deploy:
POST $U/groups/<g>/environments/<e>/deploy {canary:true,zone:"b"}→ poll job took(first run 1–3 min). Deploying withoutzonerolls every zone of the environment. - Copy IP rules if the group uses them:
PUT $U/groups/<g>/zones/b/ip-rules {cidrs:[...]}(same list as zone a). - Tell MCP client owners to point a bridge at the new zone:
ramen-mcp-bridge --target <lb>:443 --tls --key rmk_… --group <g> --zone b(samermk_keys, only--zonechanges;--cais only needed on a cluster still using the self-signed fallback instead of the default Google-managed cert, v0.5.5).
Change count / size
- Count (group admin):
PUT $U/groups/<g>/zones/<z>/workers {count:N}→ HPA min N, max 2N (cloud) / no-op locally. No deploy needed. - Size (super admin):
PUT ... {size:"m"}; workers roll. Do it zone by zone. - Watch:
GET $U/groups/<g>/zones/<z>/workers→live[]withload,track,phase.
Rebalance
POST $U/groups/<g>/zones/<z>/rebalance → {ok, load, capacity_scaler, applied, note?}. On GCP it sets the
backend capacity scaler (0.5 when the zone is high, else 1.0). applied:false + note means the Gateway is still
reconciling; it retries in the background — do not loop. Repeat for the other zones so traffic shifts.
Remove a zone
- Drain:
POST rebalanceon the other zones; thenPUT $U/groups/<g>/environments/<e> {zones:[without z]}. The adapter deletes the route first so the LB stops sending traffic, then the namespace and service account. - Only delete the global zone (
DELETE $U/zones/<z>) when no environment of any group references it.
Validate
(read-only sub-agent; viewer rmn_ key, an rmk_ key of the group)
- V1
GET $U/zoneslists the zone with the expected provider/region. - V2
GET $U/groups/<g>/environments/<e>→zonescontains it;last_deploy.status == "ok". - V3
GET $U/groups/<g>/zones/<z>/workers→countas requested,sizeas requested,livehas ≥1stableworker withphase:"Running"(cloud) andloadset. - V4
tools/listviagrpcurl -import-path proto -proto ramen/v1/mcp.proto -H "authorization: Bearer $RMK" -H 'ramen-group: <g>' -H 'ramen-zone: <z>' -d "{\"body\":\"$(printf '%s' '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | base64)\"}" <lb>:443 ramen.v1.Mcp/Call→ OK with tools in the decoded body (locally-plaintext localhost:8080, no group/zone headers needed; no CA needed against the LB either — the cert is publicly trusted, v0.5.5). - V5
GET $U/dashboardshows the zone×group cell as low/even/high (not down). - V6 For removals:
kubectl get ns ramen-<g>-<z>→ NotFound;GET $U/audithas theenvironments.updateentryok:true.
Boundaries
- Never set
countto 0 to "save money" — remove the zone instead; a zone with 0 workers still owns LB and IAM resources. - Never change
sizeorallowed_sizeswithout super-admin authority; the API returns 403 and it is audited. - Do not create zones in a region without confirming quotas (GKE Autopilot regional pods, EKS node group capacity).
- A deploy job
errorafter adding a zone: read the streamed log; typical causes are a missing service account (step 3) or the route not yet programmed (wait 2 min, redeploy). Stop after three failed attempts and ask.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

