Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions container/config-generator/templates/aquila.aquila.yml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Deployment environment sent to connected services.
# Valid values: development, staging, production.
environment: <%= env('AQUILA_ENVIRONMENT', 'development') %>

# Startup mode. Static loads flows from a local file; dynamic synchronizes with Sagittarius.
# Valid values: static, dynamic.
mode: <%= env('AQUILA_MODE', 'static') %>

# Default tracing filter. RUST_LOG takes precedence when it is set.
log_level: <%= env('AQUILA_LOG_LEVEL', 'debug') %>

# NATS server and JetStream key-value bucket used for flow storage.
nats:
url: <%= env('AQUILA_NATS_URL', 'nats://localhost:4222') %>
bucket: <%= env('AQUILA_NATS_BUCKET', 'flow_store') %>

# Settings used only in static mode.
static_config:
# JSON flow export loaded during startup.
flow_path: <%= env('AQUILA_STATIC_FLOW_PATH', './flowExport.json') %>

# Settings used only in dynamic mode.
dynamic_config:
# Sagittarius gRPC endpoint.
backend_url: <%= env('AQUILA_BACKEND_URL', 'http://localhost:50051') %>

# Authentication token for Sagittarius.
# AQUILA_BACKEND_TOKEN overrides this value and should be used for deployed secrets.
backend_token: <%= env('AQUILA_BACKEND_TOKEN', 'default_session_token') %>

# Timeout for unary Sagittarius RPCs, in seconds.
backend_unary_timeout_secs: <%= env('AQUILA_BACKEND_UNARY_TIMEOUT_SECS', '5') %>

# Aquila gRPC server bind settings.
grpc:
host: <%= env('AQUILA_GRPC_HOST', '127.0.0.1') %>
port: <%= env('AQUILA_GRPC_PORT', '8081') %>

# Expose the standard gRPC health service.
health_service: <%= env('AQUILA_GRPC_HEALTH_SERVICE', 'false') %>

# Runtime heartbeat state-transition timing, in seconds.
runtime_status:
# Time without a heartbeat before a runtime becomes NOT_RESPONDING.
not_responding_after_secs: <%= env('AQUILA_RUNTIME_NOT_RESPONDING_AFTER_SECS', '90') %>

# Additional time in NOT_RESPONDING before a runtime becomes STOPPED.
stopped_after_not_responding_secs: <%= env('AQUILA_RUNTIME_STOPPED_AFTER_NOT_RESPONDING_SECS', '180') %>

# Frequency of runtime heartbeat checks.
monitor_interval_secs: <%= env('AQUILA_RUNTIME_MONITOR_INTERVAL_SECS', '30') %>
14 changes: 11 additions & 3 deletions docker-compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@ INITIAL_ROOT_MAIL=root@code0.tech
INITIAL_RUNTIME_TOKEN=runtime

# Runtime config
AQUILA_SAGITTARIUS_URL=http://nginx:80
AQUILA_SAGITTARIUS_TOKEN=runtime
AQUILA_ENVIRONMENT=development
AQUILA_MODE=dynamic
AQUILA_LOG_LEVEL=debug
AQUILA_NATS_URL=nats://nats:4222
AQUILA_NATS_BUCKET=flow_store
AQUILA_BACKEND_URL=http://nginx:80
AQUILA_BACKEND_TOKEN=runtime
AQUILA_BACKEND_UNARY_TIMEOUT_SECS=10
AQUILA_GRPC_HOST=0.0.0.0
AQUILA_GRPC_PORT=8081
AQUILA_GRPC_HEALTH_SERVICE=false
DRACO_REST_PORT=8084
DRACO_REST_HOST=127.0.0.1

Expand All @@ -25,7 +34,6 @@ DRACO_CRON_AQUILA_TOKEN=draco-cron

AQUILA_GRPC_CONNECT_TIMEOUT_SECS=2
AQUILA_GRPC_REQUEST_TIMEOUT_SECS=10
SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS=10

# Active services
# Available services: ide, runtime, ide_velorum (AI orchestrator)
Expand Down
10 changes: 1 addition & 9 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,11 @@ services:
nats:
condition: service_started
image: ${IMAGE_REGISTRY}/aquila:${IMAGE_TAG}
environment:
MODE: dynamic
NATS_URL: nats://nats:4222
NATS_BUCKET: 'flow_store'
GRPC_HOST: 0.0.0.0
SAGITTARIUS_URL: "${AQUILA_SAGITTARIUS_URL}"
RUNTIME_TOKEN: "${AQUILA_SAGITTARIUS_TOKEN}"
SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS: "${SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS}"
volumes:
- generated-configs:/tmp/generated-configs:ro
entrypoint: |
sh -c "
cp /tmp/generated-configs/aquila.service.configuration.json /service.configuration.json
cp /tmp/generated-configs/aquila.aquila.yml /aquila.yml
exec /aquila
"
restart: unless-stopped
Expand Down
25 changes: 25 additions & 0 deletions support/config/aquila.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
environment: development
mode: dynamic
log_level: debug

nats:
url: nats://nats:4222
bucket: flow_store

static_config:
flow_path: ./flowExport.json

dynamic_config:
backend_url: http://sagittarius-grpc:50051
backend_token: runtime_token
backend_unary_timeout_secs: 5

grpc:
host: 0.0.0.0
port: 8081
health_service: true

runtime_status:
not_responding_after_secs: 90
stopped_after_not_responding_secs: 180
monitor_interval_secs: 30
9 changes: 1 addition & 8 deletions support/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,8 @@ services:
image: ghcr.io/code0-tech/reticulum/ci-builds/aquila:${RETICULUM_CONTAINER_VERSION}
networks:
- boot
environment:
NATS_URL: nats://nats:4222
MODE: dynamic
WITH_HEALTH_SERVICE: "true"
GRPC_HOST: 0.0.0.0
SAGITTARIUS_URL: http://sagittarius-grpc:50051
RUNTIME_TOKEN: runtime_token
volumes:
- ./config/aquila.service.configuration.json:/service.configuration.json
- ./config/aquila.yml:/aquila.yml
ports:
- "8081:8081"

Expand Down