From eb6668b3802f4949174ffe7852217b17cb75b3bd Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 7 Jul 2026 16:32:45 +0200 Subject: [PATCH] feat: added new aquila configuration --- .../templates/aquila.aquila.yml.erb | 51 +++++++++++++++++++ docker-compose/.env | 14 +++-- docker-compose/docker-compose.yml | 10 +--- support/config/aquila.yml | 25 +++++++++ support/docker-compose.yml | 9 +--- 5 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 container/config-generator/templates/aquila.aquila.yml.erb create mode 100644 support/config/aquila.yml diff --git a/container/config-generator/templates/aquila.aquila.yml.erb b/container/config-generator/templates/aquila.aquila.yml.erb new file mode 100644 index 00000000..0cdd077f --- /dev/null +++ b/container/config-generator/templates/aquila.aquila.yml.erb @@ -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') %> diff --git a/docker-compose/.env b/docker-compose/.env index ff4bbbfb..da4a1eb4 100644 --- a/docker-compose/.env +++ b/docker-compose/.env @@ -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 @@ -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) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 351d1e7c..3b7c16b3 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -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 diff --git a/support/config/aquila.yml b/support/config/aquila.yml new file mode 100644 index 00000000..7454ccdc --- /dev/null +++ b/support/config/aquila.yml @@ -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 diff --git a/support/docker-compose.yml b/support/docker-compose.yml index b70578ee..631441b2 100644 --- a/support/docker-compose.yml +++ b/support/docker-compose.yml @@ -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"