2c26a6d54f
P03 — full-stack example with ingress configured (REQ-094; gate C-20). examples/full-stack/: - web-app.md: kind Service, process runtime, 3 replicas, Unix socket (default R-007), rolling update, constraints (node.role==web), affinity (zone==a weight 80), lifecycle hooks (post_start/pre_stop). - api.md: kind Service, process runtime, 2 replicas, TCP opt-in (service.bind: 127.0.0.1, R-007), canary update with manual promote, constraints (node.role==api, node.cpus>=2), env vars. - worker.md: kind Job, process runtime, one-shot, timeout 300s, env vars, lifecycle hooks (register/drain). - log-shipper.md: kind Service (DaemonSet workaround — parser gap), process runtime, constraints (node.role==logs), env vars. Notes the v0.9 parser gap (schedule: block not wired) in a callout. - postgres.md: kind Service, process runtime, 1 replica, blue-green update, volumes with replication (replicate:peer-b,peer-c via Syncthing), constraints (node.role==db, node.cpus>=4, node.memory>=8192). - rendered/: Traefik dynamic YAML (web-app, api) + systemd units (web-app, api, log-shipper) showing what Orca generates on target nodes. - README.md: end-to-end walkthrough (init -> node join -> capacity set -> ns create -> job run -> list --watch -> inspect rendered -> verify ingress -> drain/rollback). Cross-links to docs/ingress.md. - examples_test.go: Go test that parses + validates all 5 jobspecs against the current parser and schema validators (gate C-20). All 5 jobspecs pass jobspec.ParseFile + schema.ValidatorFor(kind). ---ci--- project: orca phase: 3 milestone: v0.10 status: execute ---/ci---
44 lines
851 B
Markdown
44 lines
851 B
Markdown
---
|
|
kind: Service
|
|
name: web-app
|
|
count: 3
|
|
runtime:
|
|
one_of: process
|
|
command: /usr/bin/httpd -f /etc/orca/web-app/httpd.conf
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
restart:
|
|
mode: service
|
|
attempts: 5
|
|
delay: 2s
|
|
update:
|
|
strategy: rolling
|
|
max_parallel: 1
|
|
min_healthy_time: 10s
|
|
healthy_deadline: 2m
|
|
service:
|
|
name: web-app
|
|
port: 8080
|
|
health:
|
|
check_type: http
|
|
interval: 5s
|
|
timeout: 1s
|
|
unhealthy_threshold: 2
|
|
constraints:
|
|
- node.role == "web"
|
|
affinity:
|
|
- target: zone == "a"
|
|
weight: 80
|
|
lifecycle:
|
|
post_start:
|
|
- /usr/local/bin/warm-cache.sh
|
|
pre_stop:
|
|
- /bin/sh -c 'sleep 5'
|
|
- /usr/local/bin/drain.sh
|
|
---
|
|
# Web App
|
|
|
|
Frontend web application serving HTTP on port 8080 via Unix socket.
|
|
Three replicas with rolling updates, anti-affinity for zone spreading,
|
|
and lifecycle hooks for cache warm-up and graceful drain. |