113 lines
3.5 KiB
YAML
113 lines
3.5 KiB
YAML
# zerops.yaml — runtime build/run config for the chaos test services.
|
|
#
|
|
# Two setups, both built from the same Go source under valkey/.
|
|
#
|
|
# chaosworker 10 replicas, ships events to chaoscollector (no exposed port).
|
|
# Reads $ZEROPS_Number → maps to Redis DB N and pub/sub
|
|
# channel suffix ":N" so the 10 containers don't collide
|
|
# in the keyspace or on the same channel.
|
|
#
|
|
# chaoscollector 1 replica, exposes :8080 with subdomain access enabled,
|
|
# ingests events from the workers and serves the dashboard.
|
|
#
|
|
# NB: validate the exact schema (field names, autoscaling block, prepare
|
|
# commands) against the current Zerops docs before pushing. Field names
|
|
# below follow the typical zerops.yaml conventions but vary by runtime
|
|
# version.
|
|
|
|
zerops:
|
|
- setup: chaosworker
|
|
build:
|
|
base: ubuntu/go@1
|
|
buildCommands:
|
|
- go build -o app .
|
|
deployFiles:
|
|
- app
|
|
- config.yaml
|
|
cache: true
|
|
run:
|
|
base: ubuntu@latest
|
|
start: ./app --worker --config config.yaml
|
|
envVariables:
|
|
COLLECTOR_URL: http://chaoscollector.zerops:8080
|
|
VALKEY_PASSWORD: ${valkeyha_password}
|
|
|
|
- setup: ubuntubin
|
|
build:
|
|
base: ubuntu/go@1
|
|
buildCommands:
|
|
- go build -o app .
|
|
deployFiles:
|
|
- app
|
|
- config.yaml
|
|
cache: true
|
|
run:
|
|
base: ubuntu@24.04
|
|
|
|
- setup: chaoscollector
|
|
build:
|
|
base: ubuntu/go@1
|
|
buildCommands:
|
|
- go build -o app .
|
|
deployFiles:
|
|
- app
|
|
cache: true
|
|
run:
|
|
base: ubuntu@latest
|
|
ports:
|
|
- port: 8080
|
|
httpSupport: true
|
|
start: ./app --collector --collector-port 8080
|
|
|
|
- setup: chaosbasic
|
|
build:
|
|
base: ubuntu/go@1
|
|
buildCommands:
|
|
- go build -o app .
|
|
deployFiles:
|
|
- app
|
|
- config-basic.yaml
|
|
cache: true
|
|
run:
|
|
base: ubuntu@latest
|
|
ports:
|
|
- port: 8080
|
|
httpSupport: true
|
|
startCommands:
|
|
- name: collector
|
|
command: ./app --collector --collector-port 8080
|
|
- name: worker
|
|
command: ./app --worker --config config-basic.yaml
|
|
envVariables:
|
|
COLLECTOR_URL: http://localhost:8080
|
|
VALKEY_VALKEYSINGLE1_PASSWORD: ${valkeysingle1_password}
|
|
VALKEY_VALKEYSINGLE2_PASSWORD: ${valkeysingle2_password}
|
|
VALKEY_VALKEYSINGLE3_PASSWORD: ${valkeysingle3_password}
|
|
VALKEY_VALKEYHA1_PASSWORD: ${valkeyha1_password}
|
|
VALKEY_VALKEYHA2_PASSWORD: ${valkeyha2_password}
|
|
VALKEY_VALKEYHA3_PASSWORD: ${valkeyha3_password}
|
|
|
|
# sea1 chaos worker against the HA valkeys, per-service auth over plaintext.
|
|
# The valkey TLS ports require mutual TLS (client cert), which the tester
|
|
# doesn't present, so the workers use the plaintext ports (config-sea-ha.yaml)
|
|
# with passwords. VALKEY_PASSWORD is intentionally NOT set so the per-worker
|
|
# ${valkeyhaN_password} values survive (applyZeropsOverrides only clobbers
|
|
# passwords when VALKEY_PASSWORD is present).
|
|
- setup: chaosworker-sea
|
|
build:
|
|
base: ubuntu/go@1
|
|
buildCommands:
|
|
- go build -o app .
|
|
deployFiles:
|
|
- app
|
|
- config-sea-ha.yaml
|
|
cache: true
|
|
run:
|
|
base: ubuntu@latest
|
|
start: ./app --worker --config config-sea-ha.yaml
|
|
envVariables:
|
|
COLLECTOR_URL: http://chaoscollector.zerops:8080
|
|
valkeyha1_password: ${valkeyha1_password}
|
|
valkeyha2_password: ${valkeyha2_password}
|
|
valkeyha3_password: ${valkeyha3_password}
|