Skip to content

Commit

Permalink
vec-246; supporting asdb 6.4 for prism image search application.
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-aerospike committed Nov 5, 2024
1 parent 8a70df1 commit 498e369
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prism-image-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ if no variable is set it will expect the features.conf to be in `container-volu
```
FEATURE_KEY=/path/to/features.conf docker compose -f docker-compose-dev.yml up
```
To use Aerospike 6.4, use following command to bring up the application
```
FEATURE_KEY=/path/to/features.conf docker-compose -f docker-compose-asdb-6.4.yml up
```

## Developing
This demo is built using [Python Flask](https://flask.palletsprojects.com/en/2.3.x/)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Aerospike database configuration file.

service {
cluster-name prism-demo
proto-fd-max 15000
}


logging {
file /var/log/aerospike/aerospike.log {
context any info
}

# Send log messages to stdout
console {
context any info
context query critical
}
}

network {
service {
address any
port 3000
}

heartbeat {
mode multicast
multicast-group 239.1.99.222
port 9918

# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.

interval 150
timeout 10
}

fabric {
port 3001
}

info {
port 3003
}
}

namespace avs-index {
memory-size 4G
replication-factor 1
nsup-period 60

storage-engine device {
file /opt/aerospike/data/index.dat
filesize 8G
}
}

namespace avs-data {
replication-factor 2
memory-size 4G
nsup-period 60

storage-engine device {
file /opt/aerospike/data/data.dat
filesize 8G
}
}

namespace avs-meta {
memory-size 2G
replication-factor 1
nsup-period 100

# storage-engine memory {
# data-size 1G
# }

# To use file storage backing, comment out the line above and use the
# following lines instead.
# storage-engine device {
# file /opt/aerospike/data/bar.dat
# filesize 16G
# data-in-memory true # Store data in memory in addition to file.
# }
}

56 changes: 56 additions & 0 deletions prism-image-search/docker-compose-asdb-6.4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
services:
aerospike:
image: aerospike/aerospike-server-enterprise:6.4.0.26
ports:
- "3000:3000"
networks:
- avs-demo
volumes:
- ./container-volumes/aerospike/etc/aerospike:/opt/aerospike/etc/aerospike
command:
- "--config-file"
- "/opt/aerospike/etc/aerospike/aerospike-6.4.conf"
# use this line to store all index and vector data in the default namespace (test)
# - "/opt/aerospike/etc/aerospike/aerospike-single-namespace.conf"
healthcheck:
# test: [ "CMD", "asinfo", "-U", "admin", "-P", "admin", "-p", "3000", "-v", "build" ]
test: [ "CMD", "asinfo", "-p", "3000", "-v", "build" ]
interval: 5s
timeout: 20s
retries: 10
avs:
image: aerospike/aerospike-vector-search:0.11.1
environment:
FEATURE_KEY: "${FEATURE_KEY:-./container-volumes/avs/etc/aerospike-vector-search/features.conf}"
depends_on:
aerospike:
condition: service_healthy
networks:
- avs-demo
volumes:
- ./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"]
interval: 5s
timeout: 20s
retries: 10
app:
image: "aerospike/prism-search-example:latest"
depends_on:
avs:
condition: service_healthy
ports:
- "8080:8080"
networks:
- avs-demo
environment:
AVS_HOST: avs
AVS_PORT: "10000"
APP_NUM_QUOTES: "5000"
GRPC_DNS_RESOLVER: native
volumes:
- ./container-volumes/prism/images:/prism/static/images/data

networks:
avs-demo: {}

0 comments on commit 498e369

Please sign in to comment.