atmos.yaml675 B
View on GitHubbase_path: .
commands:
- name: capacity
description: Calculate a service's total worker capacity
flags:
- name: replicas
type: int
default: 2
description: Number of service replicas
steps:
- name: capacity
type: script
interpreter: starlark
show:
labels: false
script: |
replicas = ctx.flags["replicas"]
if replicas < 1:
fail("replicas must be positive")
workers_per_replica = 4
ui.success("{} replicas x {} workers = {} workers".format(
replicas, workers_per_replica, replicas * workers_per_replica,
))