Skip to content

Commit 94cfec0

Browse files
fix(asap-quickstart, asap-dropin): migrate query engine to config file and fix remote write path for v0.4.0 (#326)
* updated asap-quickstart * updated asap-dropin * updated CI
1 parent aa9b3a6 commit 94cfec0

8 files changed

Lines changed: 96 additions & 75 deletions

File tree

.github/workflows/accuracy_performance.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ jobs:
7676
cache-from: type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache
7777
cache-to: type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache,mode=max
7878

79+
- name: Build and push asap-fake-exporter
80+
uses: docker/build-push-action@v6
81+
with:
82+
context: asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/fake_exporter
83+
file: asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/fake_exporter/Dockerfile
84+
push: true
85+
tags: ghcr.io/projectasap/asap-fake-exporter:${{ steps.tag.outputs.value }}
86+
cache-from: type=registry,ref=ghcr.io/projectasap/asap-fake-exporter:buildcache
87+
cache-to: type=registry,ref=ghcr.io/projectasap/asap-fake-exporter:buildcache,mode=max
88+
7989
# ---------------------------------------------------------------------------
8090
# Job 2: pull the images built above, deploy the full stack, and evaluate.
8191
# ---------------------------------------------------------------------------
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
output_dir: "/app/outputs"
2+
log_level: "INFO"
3+
prometheus_scrape_interval: 15
4+
streaming_engine: "precompute"
5+
6+
http_server:
7+
port: 8088
8+
9+
backend:
10+
type: "prometheus"
11+
server: "http://localhost:9090"
12+
forward_unsupported_queries: true
13+
14+
store:
15+
lock_strategy: "per-key"
16+
17+
ingest:
18+
type: "http_remote_write"
19+
port: 9091
20+
21+
query_tracker:
22+
enabled: true
23+
observation_window_secs: 60

asap-dropin/docker-compose.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: asapquery-dropin
1414

1515
services:
1616
queryengine:
17-
image: ghcr.io/projectasap/asap-query-engine:v0.3.1
17+
image: ghcr.io/projectasap/asap-query-engine:v0.4.0
1818
container_name: asap-dropin-queryengine
1919
hostname: queryengine
2020
ports:
@@ -25,19 +25,12 @@ services:
2525
- RUST_BACKTRACE=1
2626
volumes:
2727
- ./output/queryengine:/app/outputs
28+
- ./config/engine_config.yaml:/config/engine_config.yaml:ro
2829
command:
29-
- "--prometheus-server=${PROMETHEUS_URL:-http://localhost:9090}"
30-
- "--prometheus-scrape-interval=${PROMETHEUS_SCRAPE_INTERVAL:-15}"
31-
- "--streaming-engine=precompute"
32-
- "--prometheus-remote-write-port=9091"
33-
- "--delete-existing-db"
34-
- "--log-level=INFO"
35-
- "--output-dir=/app/outputs"
36-
- "--query-language=PROMQL"
37-
- "--lock-strategy=per-key"
38-
- "--forward-unsupported-queries"
39-
- "--enable-query-tracker"
40-
- "--tracker-observation-window-secs=${TRACKER_OBSERVATION_WINDOW_SECS:-60}"
30+
- "--config-file=/config/engine_config.yaml"
31+
- "backend.server=${PROMETHEUS_URL:-http://localhost:9090}"
32+
- "prometheus_scrape_interval=${PROMETHEUS_SCRAPE_INTERVAL:-15}"
33+
- "query_tracker.observation_window_secs=${TRACKER_OBSERVATION_WINDOW_SECS:-60}"
4134
healthcheck:
4235
test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/localhost/8088' 2>/dev/null || exit 1"]
4336
interval: 10s
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
output_dir: "/app/outputs"
2+
log_level: "INFO"
3+
prometheus_scrape_interval: 1
4+
streaming_engine: "precompute"
5+
6+
http_server:
7+
port: 8088
8+
9+
backend:
10+
type: "prometheus"
11+
server: "http://prometheus:9090"
12+
forward_unsupported_queries: true
13+
14+
store:
15+
lock_strategy: "per-key"
16+
17+
ingest:
18+
type: "http_remote_write"
19+
port: 9091
20+
21+
inference_config: "/asap-planner-output/inference_config.yaml"
22+
streaming_config: "/asap-planner-output/streaming_config.yaml"

asap-quickstart/config/prometheus-precompute.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

asap-quickstart/config/prometheus.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Prometheus configuration for pattern-based fake exporters demo
2+
# Uses the hand-crafted precompute engine (instead of Arroyo) for sketch building
23

34
global:
45
scrape_interval: 1s
56
evaluation_interval: 1s
67

7-
# Remote write configuration to send metrics to ASAPQuery for sketch building
8+
# Remote write configuration to send metrics to the precompute engine for sketch building
89
remote_write:
9-
- url: http://queryengine:9091/receive
10+
- url: http://queryengine:9091/api/v1/write
1011
queue_config:
1112
batch_send_deadline: 1s
12-
# Drop samples older than 5 minutes before enqueuing — prevents WAL replay
13-
# on restart from flooding Arroyo with historical data.
14-
sample_age_limit: 5m
1513
write_relabel_configs:
1614
- source_labels: [__name__]
1715
regex: sensor_reading

asap-quickstart/docker-compose.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ services:
7676
#############################################################################
7777

7878
asap-planner-rs:
79-
image: ghcr.io/projectasap/asap-planner-rs:v0.3.1
79+
image: ghcr.io/projectasap/asap-planner-rs:v0.4.0
8080
container_name: asap-planner-rs
8181
hostname: asap-planner-rs
8282
networks:
@@ -99,7 +99,7 @@ services:
9999
#############################################################################
100100

101101
queryengine:
102-
image: ghcr.io/projectasap/asap-query-engine:v0.3.1
102+
image: ghcr.io/projectasap/asap-query-engine:v0.4.0
103103
container_name: asap-queryengine
104104
hostname: queryengine
105105
networks:
@@ -113,19 +113,9 @@ services:
113113
volumes:
114114
- asap-planner-output:/asap-planner-output:ro
115115
- ./output/queryengine:/app/outputs
116+
- ./config/engine_config.yaml:/config/engine_config.yaml:ro
116117
command:
117-
- "--config=/asap-planner-output/inference_config.yaml"
118-
- "--streaming-config=/asap-planner-output/streaming_config.yaml"
119-
- "--prometheus-server=http://prometheus:9090"
120-
- "--prometheus-scrape-interval=1"
121-
- "--streaming-engine=precompute"
122-
- "--prometheus-remote-write-port=9091"
123-
- "--delete-existing-db"
124-
- "--log-level=INFO"
125-
- "--output-dir=/app/outputs"
126-
- "--query-language=PROMQL"
127-
- "--lock-strategy=per-key"
128-
- "--forward-unsupported-queries"
118+
- "--config-file=/config/engine_config.yaml"
129119
depends_on:
130120
asap-planner-rs:
131121
condition: service_completed_successfully
@@ -141,7 +131,7 @@ services:
141131

142132
# Constant values - baseline for comparison
143133
fake-exporter-constant:
144-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
134+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
145135
container_name: asap-fake-exporter-constant
146136
hostname: fake-exporter-constant
147137
networks:
@@ -163,7 +153,7 @@ services:
163153

164154
# Linear increasing - tests trend preservation
165155
fake-exporter-linear-up:
166-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
156+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
167157
container_name: asap-fake-exporter-linear-up
168158
hostname: fake-exporter-linear-up
169159
networks:
@@ -185,7 +175,7 @@ services:
185175

186176
# Linear decreasing - tests trend preservation
187177
fake-exporter-linear-down:
188-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
178+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
189179
container_name: asap-fake-exporter-linear-down
190180
hostname: fake-exporter-linear-down
191181
networks:
@@ -207,7 +197,7 @@ services:
207197

208198
# Sine wave - tests periodicity preservation
209199
fake-exporter-sine:
210-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
200+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
211201
container_name: asap-fake-exporter-sine
212202
hostname: fake-exporter-sine
213203
networks:
@@ -229,7 +219,7 @@ services:
229219

230220
# Sine with noise - tests signal extraction / smoothing
231221
fake-exporter-sine-noise:
232-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
222+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
233223
container_name: asap-fake-exporter-sine-noise
234224
hostname: fake-exporter-sine-noise
235225
networks:
@@ -251,7 +241,7 @@ services:
251241

252242
# Step function - tests edge preservation
253243
fake-exporter-step:
254-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
244+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
255245
container_name: asap-fake-exporter-step
256246
hostname: fake-exporter-step
257247
networks:
@@ -273,7 +263,7 @@ services:
273263

274264
# Exponential growth - tests non-linear patterns
275265
fake-exporter-exp-up:
276-
image: ghcr.io/projectasap/asap-fake-exporter:v0.3.1
266+
image: ghcr.io/projectasap/asap-fake-exporter:v0.4.0
277267
container_name: asap-fake-exporter-exp-up
278268
hostname: fake-exporter-exp-up
279269
networks:

benchmarks/docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,24 @@ services:
1919
- ../benchmarks/config/engine_config.yaml:/config/engine_config.yaml:ro
2020
command:
2121
- "--config-file=/config/engine_config.yaml"
22+
23+
fake-exporter-constant:
24+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}
25+
26+
fake-exporter-linear-up:
27+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}
28+
29+
fake-exporter-linear-down:
30+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}
31+
32+
fake-exporter-sine:
33+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}
34+
35+
fake-exporter-sine-noise:
36+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}
37+
38+
fake-exporter-step:
39+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}
40+
41+
fake-exporter-exp-up:
42+
image: ghcr.io/projectasap/asap-fake-exporter:${ASAP_IMAGE_TAG}

0 commit comments

Comments
 (0)