Skip to content

Commit e4745c7

Browse files
authored
Merge pull request #901 from code0-tech/#897-add-aquila-yml
add aquila yml
2 parents 01ca088 + bec191a commit e4745c7

5 files changed

Lines changed: 92 additions & 23 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', 'dynamic') %>
8+
9+
# Default tracing filter. RUST_LOG takes precedence when it is set.
10+
log_level: <%= env('AQUILA_LOG_LEVEL', 'info') %>
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') %>
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') %>
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: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ 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_LOG_LEVEL=info
18+
AQUILA_NATS_URL=nats://nats:4222
19+
AQUILA_NATS_BUCKET=flow_store
20+
AQUILA_BACKEND_URL=http://nginx:80
21+
AQUILA_BACKEND_TOKEN=runtime
22+
AQUILA_BACKEND_UNARY_TIMEOUT_SECS=10
23+
AQUILA_GRPC_HOST=0.0.0.0
24+
AQUILA_GRPC_PORT=8081
25+
AQUILA_GRPC_HEALTH_SERVICE=false
1926
DRACO_REST_PORT=8084
2027
DRACO_REST_HOST=127.0.0.1
2128

@@ -25,7 +32,6 @@ DRACO_CRON_AQUILA_TOKEN=draco-cron
2532

2633
AQUILA_GRPC_CONNECT_TIMEOUT_SECS=2
2734
AQUILA_GRPC_REQUEST_TIMEOUT_SECS=10
28-
SAGITTARIUS_UNARY_RPC_TIMEOUT_SECS=10
2935

3036
# Active services
3137
# Available services: ide, runtime, ide_velorum (AI orchestrator)

docker-compose/docker-compose.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,20 +174,10 @@ services:
174174
condition: service_started
175175
image: ${IMAGE_REGISTRY}/aquila:${IMAGE_TAG}
176176
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}"
177+
AQUILA_CONFIG_PATH: /tmp/generated-configs/aquila.yml
178+
AQUILA_SERVICE_CONFIG_PATH: /tmp/generated-configs/aquila.service.configuration.json
184179
volumes:
185180
- generated-configs:/tmp/generated-configs:ro
186-
entrypoint: |
187-
sh -c "
188-
cp /tmp/generated-configs/aquila.service.configuration.json /service.configuration.json
189-
exec /aquila
190-
"
191181
restart: unless-stopped
192182
profiles:
193183
- runtime

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: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,12 @@ 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
88+
- ./config/aquila.service.configuration.json:/aquila.service.configuration.json
89+
environment:
90+
AQUILA_CONFIG_PATH: /aquila.yml
91+
AQUILA_SERVICE_CONFIG_PATH: /aquila.service.configuration.json
9592
ports:
9693
- "8081:8081"
9794

0 commit comments

Comments
 (0)