From 68e97a3879474714289aaccc301358e5330ca784 Mon Sep 17 00:00:00 2001 From: David Gerchikov Date: Fri, 1 Nov 2024 02:36:06 +0200 Subject: [PATCH 1/3] Update full-create-and-install.sh (#67) :+1: --- kubernetes/full-create-and-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/full-create-and-install.sh b/kubernetes/full-create-and-install.sh index 5312eb4..6db50e4 100755 --- a/kubernetes/full-create-and-install.sh +++ b/kubernetes/full-create-and-install.sh @@ -417,7 +417,7 @@ deploy_avs_helm_chart() { helm repo add aerospike-helm https://artifact.aerospike.io/artifactory/api/helm/aerospike-helm helm repo update if [ -z "$CHART_LOCATION" ]; then - helm install avs-gke --values $BUILD_DIR/manifests/avs-gke-values.yaml --namespace avs aerospike-helm/aerospike-vector-search --version 0.4.1 --wait + helm install avs-gke --values $BUILD_DIR/manifests/avs-gke-values.yaml --namespace avs aerospike-helm/aerospike-vector-search --version 0.6.0 --wait else helm install avs-gke --values $BUILD_DIR/manifests/avs-gke-values.yaml --namespace avs "$CHART_LOCATION" --wait fi From 39621f300b689ff22d034e62e44e34c64f5cd1a1 Mon Sep 17 00:00:00 2001 From: "Joe M." Date: Fri, 1 Nov 2024 15:01:02 -0700 Subject: [PATCH 2/3] VEC-424 Update Aerospike storage paths and sizes (#69) --- kubernetes/manifests/aerospike-cr-auth.yaml | 36 ++++++++++++++++++--- kubernetes/manifests/aerospike-cr.yaml | 36 ++++++++++++++++++--- 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/kubernetes/manifests/aerospike-cr-auth.yaml b/kubernetes/manifests/aerospike-cr-auth.yaml index 003ccff..cf52c18 100644 --- a/kubernetes/manifests/aerospike-cr-auth.yaml +++ b/kubernetes/manifests/aerospike-cr-auth.yaml @@ -24,13 +24,28 @@ spec: size: 1Gi - name: avs-meta aerospike: - path: /avs/dev/xvdf + path: /avs-meta/dev/xvdf + source: + persistentVolume: + storageClass: ssd + volumeMode: Block + size: 2Gi + - name: avs-index + aerospike: + path: /avs-index/dev/xvdf + source: + persistentVolume: + storageClass: ssd + volumeMode: Block + size: 20Gi + - name: avs-data + aerospike: + path: /avs-data/dev/xvdf source: persistentVolume: storageClass: ssd volumeMode: Block size: 20Gi - - name: ns aerospike: path: /test/dev/xvdf @@ -38,7 +53,7 @@ spec: persistentVolume: storageClass: ssd volumeMode: Block - size: 20Gi + size: 1Gi - name: aerospike-config-secret source: secret: @@ -128,7 +143,18 @@ spec: type: device devices: - /test/dev/xvdf - + - name: avs-index + replication-factor: 2 + storage-engine: + type: device + devices: + - /avs-index/dev/xvdf + - name: avs-data + replication-factor: 2 + storage-engine: + type: device + devices: + - /avs-data/dev/xvdf - name: avs-meta nsup-period: 600 nsup-threads: 2 @@ -137,4 +163,4 @@ spec: storage-engine: type: device devices: - - /avs/dev/xvdf \ No newline at end of file + - /avs-meta/dev/xvdf \ No newline at end of file diff --git a/kubernetes/manifests/aerospike-cr.yaml b/kubernetes/manifests/aerospike-cr.yaml index 5ad7c84..29f1355 100644 --- a/kubernetes/manifests/aerospike-cr.yaml +++ b/kubernetes/manifests/aerospike-cr.yaml @@ -24,13 +24,28 @@ spec: size: 1Gi - name: avs-meta aerospike: - path: /avs/dev/xvdf + path: /avs-meta/dev/xvdf + source: + persistentVolume: + storageClass: ssd + volumeMode: Block + size: 2Gi + - name: avs-index + aerospike: + path: /avs-index/dev/xvdf + source: + persistentVolume: + storageClass: ssd + volumeMode: Block + size: 20Gi + - name: avs-data + aerospike: + path: /avs-data/dev/xvdf source: persistentVolume: storageClass: ssd volumeMode: Block size: 20Gi - - name: ns aerospike: path: /test/dev/xvdf @@ -38,7 +53,7 @@ spec: persistentVolume: storageClass: ssd volumeMode: Block - size: 20Gi + size: 1Gi - name: aerospike-config-secret source: secret: @@ -90,7 +105,18 @@ spec: type: device devices: - /test/dev/xvdf - + - name: avs-index + replication-factor: 2 + storage-engine: + type: device + devices: + - /avs-index/dev/xvdf + - name: avs-data + replication-factor: 2 + storage-engine: + type: device + devices: + - /avs-data/dev/xvdf - name: avs-meta nsup-period: 600 nsup-threads: 2 @@ -99,4 +125,4 @@ spec: storage-engine: type: device devices: - - /avs/dev/xvdf \ No newline at end of file + - /avs-meta/dev/xvdf \ No newline at end of file From 8a70df1de350e84e3b4445fc456b641a1bfa027c Mon Sep 17 00:00:00 2001 From: "Joe M." Date: Mon, 4 Nov 2024 18:57:16 -0800 Subject: [PATCH 3/3] Allow specifying feature key by env var (#63) * Allow specifying feature key by env var --- prism-image-search/README.md | 7 ++++--- prism-image-search/docker-compose-dev.yml | 7 +++++-- prism-image-search/docker-compose.yml | 5 ++++- quote-semantic-search/README.md | 8 ++++++-- quote-semantic-search/docker-compose-dev.yml | 7 +++++-- quote-semantic-search/docker-compose.yml | 7 +++++-- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/prism-image-search/README.md b/prism-image-search/README.md index ace5a44..d12b318 100644 --- a/prism-image-search/README.md +++ b/prism-image-search/README.md @@ -65,14 +65,15 @@ ln -s ~/Pictures container-volumes/prism/images/static/data cd prism-image-search && \\ docker build -t prism . -f Dockerfile-prism ``` - ### 2. Add features.conf AVS needs an Aerospike features.conf file with the vector-search feature enabled. -Add your features.conf file to `container-volumes/avs/etc/aerospike-vector-search`. + +Optionally set `FEATURE_KEY` environment variable with the location of your `features.conf` file or +if no variable is set it will expect the features.conf to be in `container-volumes/avs/etc/aerospike-vector-search`. ### 3. Start the environment ``` -docker compose -f docker-compose-dev.yml up +FEATURE_KEY=/path/to/features.conf docker compose -f docker-compose-dev.yml up ``` ## Developing diff --git a/prism-image-search/docker-compose-dev.yml b/prism-image-search/docker-compose-dev.yml index 7503045..7506844 100644 --- a/prism-image-search/docker-compose-dev.yml +++ b/prism-image-search/docker-compose-dev.yml @@ -19,8 +19,10 @@ services: 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 @@ -28,13 +30,14 @@ services: - 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: prism:latest + image: "prism:latest" depends_on: avs: condition: service_healthy diff --git a/prism-image-search/docker-compose.yml b/prism-image-search/docker-compose.yml index 54d74db..ae2b769 100644 --- a/prism-image-search/docker-compose.yml +++ b/prism-image-search/docker-compose.yml @@ -20,6 +20,8 @@ services: 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 @@ -27,13 +29,14 @@ services: - 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 + image: "aerospike/prism-search-example:latest" depends_on: avs: condition: service_healthy diff --git a/quote-semantic-search/README.md b/quote-semantic-search/README.md index aa8b76c..1f4186c 100644 --- a/quote-semantic-search/README.md +++ b/quote-semantic-search/README.md @@ -57,12 +57,16 @@ docker build -t quote-search . -f Dockerfile-quote-search ### 2. Add features.conf AVS needs an Aerospike features.conf file with the vector-search feature enabled. -Add your features.conf file to container-volumes/avs/etc/aerospike-vector-search. +Optionally set `FEATURE_KEY` environment variable with the location of your `features.conf` file. + +If no variable is set it will expect the features.conf to be in `container-volumes/avs/etc/aerospike-vector-search` + ### 3. Start the environment ``` -docker compose -f docker-compose-dev.yml up +FEATURE_KEY=/path/to/features.conf docker compose -f docker-compose-dev.yml up + ``` ## Developing diff --git a/quote-semantic-search/docker-compose-dev.yml b/quote-semantic-search/docker-compose-dev.yml index 44f227d..0138ead 100644 --- a/quote-semantic-search/docker-compose-dev.yml +++ b/quote-semantic-search/docker-compose-dev.yml @@ -19,23 +19,26 @@ services: 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 - image: aerospike/aerospike-vector-search:0.11.1 # ports: # - "5002:5002" 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: quote-search:latest + image: "quote-search:latest" depends_on: avs: condition: service_healthy diff --git a/quote-semantic-search/docker-compose.yml b/quote-semantic-search/docker-compose.yml index 473dddb..c5fc3d1 100644 --- a/quote-semantic-search/docker-compose.yml +++ b/quote-semantic-search/docker-compose.yml @@ -19,23 +19,26 @@ services: 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 - image: aerospike/aerospike-vector-search:0.11.1 # ports: # - "5002:5002" 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/quote-search-example:latest + image: "aerospike/quote-search-example:latest" depends_on: avs: condition: service_healthy