Skip to content

Commit

Permalink
propogate metrics collection to all example docker compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Dec 5, 2024
1 parent 57dae26 commit 50fa784
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .internal/metrics/config/prometheus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global:
scrape_interval: 15s
scrape_interval: 30s

scrape_configs:
- job_name: 'proximus'
Expand Down
9 changes: 5 additions & 4 deletions docker/docker-compose-asdb-6.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ services:
# - svc

# Services used to monitor the Aerospike Vector Search cluster.
# This collects basic usage metrics so that Aerospike can better understand AAVS is being used.
# This collects basic usage metrics so that Aerospike can better understand AVS is being used.
# If you would like to disable this, you can remove the following services.

update-targets:
image: python:3.9-alpine
volumes:
- ./scripts/update_targets.py:/scripts/update_targets.py
- ./config:/config
- ../.internal/metrics/scripts/update_targets.py:/scripts/update_targets.py
- ../.internal/metrics/config:/config
entrypoint: ["sh", "-c", "python3 /scripts/update_targets.py"]
networks:
- svc

prometheus:
image: prom/prometheus:v2.45.0
volumes:
- ./config:/etc/prometheus
- ../.internal/metrics/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
Expand All @@ -85,6 +85,7 @@ services:
networks:
- svc


networks:
svc:
name: svc
Expand Down
37 changes: 33 additions & 4 deletions prism-image-search/docker-compose-asdb-6.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
interval: 5s
timeout: 20s
retries: 10
avs:
aerospike-vector-search:
image: aerospike/aerospike-vector-search:0.11.1
environment:
FEATURE_KEY: "${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}"
Expand All @@ -31,26 +31,55 @@ services:
- ./container-volumes/avs/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}:/etc/aerospike-vector-search/features.conf:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://avs:5040/manage/rest/v1"]
test: ["CMD", "curl", "-f", "http://aerospike-vector-search:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
app:
image: "aerospike/prism-search-example:latest"
depends_on:
avs:
aerospike-vector-search:
condition: service_healthy
ports:
- "8080:8080"
networks:
- avs-demo
environment:
AVS_HOST: avs
AVS_HOST: aerospike-vector-search
AVS_PORT: "5000"
APP_NUM_QUOTES: "5000"
GRPC_DNS_RESOLVER: native
volumes:
- ./container-volumes/prism/images:/prism/static/images/data

# Services used to monitor the Aerospike Vector Search cluster.
# This collects basic usage metrics so that Aerospike can better understand AVS is being used.
# If you would like to disable this, you can remove the following services.

update-targets:
image: python:3.9-alpine
volumes:
- ../.internal/metrics/scripts/update_targets.py:/scripts/update_targets.py
- ../.internal/metrics/config:/config
entrypoint: ["sh", "-c", "python3 /scripts/update_targets.py"]
networks:
- avs-demo

prometheus:
image: prom/prometheus:v2.45.0
volumes:
- ../.internal/metrics/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
depends_on:
update-targets:
condition: service_completed_successfully
aerospike-vector-search:
condition: service_healthy
networks:
- avs-demo

networks:
avs-demo: {}
37 changes: 33 additions & 4 deletions prism-image-search/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
interval: 5s
timeout: 20s
retries: 10
avs:
aerospike-vector-search:
image: aerospike/aerospike-vector-search:0.11.1
environment:
FEATURE_KEY: "${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}"
Expand All @@ -32,26 +32,55 @@ services:
- ./container-volumes/avs/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}:/etc/aerospike-vector-search/features.conf:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://avs:5040/manage/rest/v1"]
test: ["CMD", "curl", "-f", "http://aerospike-vector-search:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
app:
image: "prism:latest"
depends_on:
avs:
aerospike-vector-search:
condition: service_healthy
ports:
- "8080:8080"
networks:
- avs-demo
environment:
AVS_HOST: avs
AVS_HOST: aerospike-vector-search
AVS_PORT: "5000"
APP_NUM_QUOTES: "5000"
GRPC_DNS_RESOLVER: native
volumes:
- ./container-volumes/prism/images:/prism/static/images/data

# Services used to monitor the Aerospike Vector Search cluster.
# This collects basic usage metrics so that Aerospike can better understand AVS is being used.
# If you would like to disable this, you can remove the following services.

update-targets:
image: python:3.9-alpine
volumes:
- ../.internal/metrics/scripts/update_targets.py:/scripts/update_targets.py
- ../.internal/metrics/config:/config
entrypoint: ["sh", "-c", "python3 /scripts/update_targets.py"]
networks:
- avs-demo

prometheus:
image: prom/prometheus:v2.45.0
volumes:
- ../.internal/metrics/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
depends_on:
update-targets:
condition: service_completed_successfully
aerospike-vector-search:
condition: service_healthy
networks:
- avs-demo

networks:
avs-demo: {}
37 changes: 33 additions & 4 deletions prism-image-search/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
interval: 5s
timeout: 20s
retries: 10
avs:
aerospike-vector-search:
image: aerospike/aerospike-vector-search:0.11.1
environment:
FEATURE_KEY: "${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}"
Expand All @@ -31,26 +31,55 @@ services:
- ./container-volumes/avs/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}:/etc/aerospike-vector-search/features.conf:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://avs:5040/manage/rest/v1"]
test: ["CMD", "curl", "-f", "http://aerospike-vector-search:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
app:
image: "aerospike/prism-search-example:latest"
depends_on:
avs:
aerospike-vector-search:
condition: service_healthy
ports:
- "8080:8080"
networks:
- avs-demo
environment:
AVS_HOST: avs
AVS_HOST: aerospike-vector-search
AVS_PORT: "5000"
APP_NUM_QUOTES: "5000"
GRPC_DNS_RESOLVER: native
volumes:
- ./container-volumes/prism/images:/prism/static/images/data

# Services used to monitor the Aerospike Vector Search cluster.
# This collects basic usage metrics so that Aerospike can better understand AVS is being used.
# If you would like to disable this, you can remove the following services.

update-targets:
image: python:3.9-alpine
volumes:
- ../.internal/metrics/scripts/update_targets.py:/scripts/update_targets.py
- ../.internal/metrics/config:/config
entrypoint: ["sh", "-c", "python3 /scripts/update_targets.py"]
networks:
- avs-demo

prometheus:
image: prom/prometheus:v2.45.0
volumes:
- ../.internal/metrics/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
depends_on:
update-targets:
condition: service_completed_successfully
aerospike-vector-search:
condition: service_healthy
networks:
- avs-demo

networks:
avs-demo: {}
37 changes: 33 additions & 4 deletions quote-semantic-search/docker-compose-asdb-6.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
interval: 5s
timeout: 20s
retries: 10
avs:
aerospike-vector-search:
image: aerospike/aerospike-vector-search:0.11.1
environment:
FEATURE_KEY: "${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}"
Expand All @@ -33,14 +33,14 @@ services:
- ./container-volumes/avs/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}:/etc/aerospike-vector-search/features.conf:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://avs:5040/manage/rest/v1"]
test: ["CMD", "curl", "-f", "http://aerospike-vector-search:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
app:
image: "quote-search:latest"
depends_on:
avs:
aerospike-vector-search:
condition: service_healthy
ports:
- "8080:8080"
Expand All @@ -49,10 +49,39 @@ services:
volumes:
- ./container-volumes/quote-search/data:/container-volumes/quote-search/data
environment:
AVS_HOST: avs
AVS_HOST: aerospike-vector-search
AVS_PORT: "5000"
APP_NUM_QUOTES: "5000"
GRPC_DNS_RESOLVER: native

# Services used to monitor the Aerospike Vector Search cluster.
# This collects basic usage metrics so that Aerospike can better understand AVS is being used.
# If you would like to disable this, you can remove the following services.

update-targets:
image: python:3.9-alpine
volumes:
- ../.internal/metrics/scripts/update_targets.py:/scripts/update_targets.py
- ../.internal/metrics/config:/config
entrypoint: ["sh", "-c", "python3 /scripts/update_targets.py"]
networks:
- avs-demo

prometheus:
image: prom/prometheus:v2.45.0
volumes:
- ../.internal/metrics/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
depends_on:
update-targets:
condition: service_completed_successfully
aerospike-vector-search:
condition: service_healthy
networks:
- avs-demo

networks:
avs-demo: {}
37 changes: 33 additions & 4 deletions quote-semantic-search/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
interval: 5s
timeout: 20s
retries: 10
avs:
aerospike-vector-search:
image: aerospike/aerospike-vector-search:0.11.1
environment:
FEATURE_KEY: "${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}"
Expand All @@ -33,14 +33,14 @@ services:
- ./container-volumes/avs/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}:/etc/aerospike-vector-search/features.conf:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://avs:5040/manage/rest/v1"]
test: ["CMD", "curl", "-f", "http://aerospike-vector-search:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
app:
image: "quote-search:latest"
depends_on:
avs:
aerospike-vector-search:
condition: service_healthy
ports:
- "8080:8080"
Expand All @@ -49,10 +49,39 @@ services:
volumes:
- ./container-volumes/quote-search/data:/container-volumes/quote-search/data
environment:
AVS_HOST: avs
AVS_HOST: aerospike-vector-search
AVS_PORT: "5000"
APP_NUM_QUOTES: "5000"
GRPC_DNS_RESOLVER: native

# Services used to monitor the Aerospike Vector Search cluster.
# This collects basic usage metrics so that Aerospike can better understand AVS is being used.
# If you would like to disable this, you can remove the following services.

update-targets:
image: python:3.9-alpine
volumes:
- ../.internal/metrics/scripts/update_targets.py:/scripts/update_targets.py
- ../.internal/metrics/config:/config
entrypoint: ["sh", "-c", "python3 /scripts/update_targets.py"]
networks:
- avs-demo

prometheus:
image: prom/prometheus:v2.45.0
volumes:
- ../.internal/metrics/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
depends_on:
update-targets:
condition: service_completed_successfully
aerospike-vector-search:
condition: service_healthy
networks:
- avs-demo

networks:
avs-demo: {}
Loading

0 comments on commit 50fa784

Please sign in to comment.