Skip to content

Commit a110f99

Browse files
raphael-goetzTaucher2003
authored andcommitted
feat: added new aquila configuration
1 parent 01ca088 commit a110f99

5 files changed

Lines changed: 89 additions & 20 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Deployment environment sent to connected services.
2+
# Valid values: development, staging, production.
3+
environment: <%= env('AQUILA_ENVIRONMENT', 'development') %>
4+
5+
# Startup mode. Static loads flows from a local file; dynamic synchronizes with Sagittarius.
6+
# Valid values: static, dynamic.
7+
mode: <%= env('AQUILA_MODE', 'static') %>
8+
9+
# Default tracing filter. RUST_LOG takes precedence when it is set.
10+
log_level: <%= env('AQUILA_LOG_LEVEL', 'debug') %>
11+
12+
# NATS server and JetStream key-value bucket used for flow storage.
13+
nats:
14+
url: <%= env('AQUILA_NATS_URL', 'nats://localhost:4222') %>
15+
bucket: <%= env('AQUILA_NATS_BUCKET', 'flow_store') %>
16+
17+
# Settings used only in static mode.
18+
static_config:
19+
# JSON flow export loaded during startup.
20+
flow_path: <%= env('AQUILA_STATIC_FLOW_PATH', './flowExport.json') %>
21+
22+
# Settings used only in dynamic mode.
23+
dynamic_config:
24+
# Sagittarius gRPC endpoint.
25+
backend_url: <%= env('AQUILA_BACKEND_URL', 'http://localhost:50051') %>
26+
27+
# Authentication token for Sagittarius.
28+
# AQUILA_BACKEND_TOKEN overrides this value and should be used for deployed secrets.
29+
backend_token: <%= env('AQUILA_BACKEND_TOKEN', 'default_session_token') %>
30+
31+
# Timeout for unary Sagittarius RPCs, in seconds.
32+
backend_unary_timeout_secs: <%= env('AQUILA_BACKEND_UNARY_TIMEOUT_SECS', '5') %>
33+
34+
# Aquila gRPC server bind settings.
35+
grpc:
36+
host: <%= env('AQUILA_GRPC_HOST', '127.0.0.1') %>
37+
port: <%= env('AQUILA_GRPC_PORT', '8081') %>
38+
39+
# Expose the standard gRPC health service.
40+
health_service: <%= env('AQUILA_GRPC_HEALTH_SERVICE', 'false') %>
41+
42+
# Runtime heartbeat state-transition timing, in seconds.
43+
runtime_status:
44+
# Time without a heartbeat before a runtime becomes NOT_RESPONDING.
45+
not_responding_after_secs: <%= env('AQUILA_RUNTIME_NOT_RESPONDING_AFTER_SECS', '90') %>
46+
47+
# Additional time in NOT_RESPONDING before a runtime becomes STOPPED.
48+
stopped_after_not_responding_secs: <%= env('AQUILA_RUNTIME_STOPPED_AFTER_NOT_RESPONDING_SECS', '180') %>
49+
50+
# Frequency of runtime heartbeat checks.
51+
monitor_interval_secs: <%= env('AQUILA_RUNTIME_MONITOR_INTERVAL_SECS', '30') %>

docker-compose/.env

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ INITIAL_ROOT_MAIL=root@code0.tech
1414
INITIAL_RUNTIME_TOKEN=runtime
1515

1616
# Runtime config
17-
AQUILA_SAGITTARIUS_URL=http://nginx:80
18-
AQUILA_SAGITTARIUS_TOKEN=runtime
17+
AQUILA_ENVIRONMENT=development
18+
AQUILA_MODE=dynamic
19+
AQUILA_LOG_LEVEL=debug
20+
AQUILA_NATS_URL=nats://nats:4222
21+
AQUILA_NATS_BUCKET=flow_store
22+
AQUILA_BACKEND_URL=http://nginx:80
23+
AQUILA_BACKEND_TOKEN=runtime
24+
AQUILA_BACKEND_UNARY_TIMEOUT_SECS=10
25+
AQUILA_GRPC_HOST=0.0.0.0
26+
AQUILA_GRPC_PORT=8081
27+
AQUILA_GRPC_HEALTH_SERVICE=false
1928
DRACO_REST_PORT=8084
2029
DRACO_REST_HOST=127.0.0.1
2130

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

2635
AQUILA_GRPC_CONNECT_TIMEOUT_SECS=2
2736
AQUILA_GRPC_REQUEST_TIMEOUT_SECS=10
28-
SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS=10
2937

3038
# Active services
3139
# Available services: ide, runtime, ide_velorum (AI orchestrator)

docker-compose/docker-compose.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,19 +173,11 @@ services:
173173
nats:
174174
condition: service_started
175175
image: ${IMAGE_REGISTRY}/aquila:${IMAGE_TAG}
176-
environment:
177-
MODE: dynamic
178-
NATS_URL: nats://nats:4222
179-
NATS_BUCKET: 'flow_store'
180-
GRPC_HOST: 0.0.0.0
181-
SAGITTARIUS_URL: "${AQUILA_SAGITTARIUS_URL}"
182-
RUNTIME_TOKEN: "${AQUILA_SAGITTARIUS_TOKEN}"
183-
SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS: "${SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS}"
184176
volumes:
185177
- generated-configs:/tmp/generated-configs:ro
186178
entrypoint: |
187179
sh -c "
188-
cp /tmp/generated-configs/aquila.service.configuration.json /service.configuration.json
180+
cp /tmp/generated-configs/aquila.aquila.yml /aquila.yml
189181
exec /aquila
190182
"
191183
restart: unless-stopped

support/config/aquila.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
environment: development
2+
mode: dynamic
3+
log_level: debug
4+
5+
nats:
6+
url: nats://nats:4222
7+
bucket: flow_store
8+
9+
static_config:
10+
flow_path: ./flowExport.json
11+
12+
dynamic_config:
13+
backend_url: http://sagittarius-grpc:50051
14+
backend_token: runtime_token
15+
backend_unary_timeout_secs: 5
16+
17+
grpc:
18+
host: 0.0.0.0
19+
port: 8081
20+
health_service: true
21+
22+
runtime_status:
23+
not_responding_after_secs: 90
24+
stopped_after_not_responding_secs: 180
25+
monitor_interval_secs: 30

support/docker-compose.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,8 @@ services:
8383
image: ghcr.io/code0-tech/reticulum/ci-builds/aquila:${RETICULUM_CONTAINER_VERSION}
8484
networks:
8585
- boot
86-
environment:
87-
NATS_URL: nats://nats:4222
88-
MODE: dynamic
89-
WITH_HEALTH_SERVICE: "true"
90-
GRPC_HOST: 0.0.0.0
91-
SAGITTARIUS_URL: http://sagittarius-grpc:50051
92-
RUNTIME_TOKEN: runtime_token
9386
volumes:
94-
- ./config/aquila.service.configuration.json:/service.configuration.json
87+
- ./config/aquila.yml:/aquila.yml
9588
ports:
9689
- "8081:8081"
9790

0 commit comments

Comments
 (0)