Skip to content

Commit

Permalink
ci: launch 3 avs nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Jul 29, 2024
1 parent 95fb38c commit 1f36c4c
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .internal/multi-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Locate valid `features.conf` in the `./container-volumes/features` directory:
## Load Balanced 2 Node AVS Cluster
```shell
docker compose -f docker-compose-2-avs-load-balanced.yaml up -d
docker compose -f docker-compose-3-avs-load-balanced.yaml up -d
```

## Plain 2 Node AVS Cluster
```shell
docker compose -f docker-compose-2-avs.yaml up -d
docker compose -3 docker-compose-2-avs.yaml up -d
```


Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ heartbeat:
seeds:
- address: avs-2
port: 5001
- address: avs-3
port: 5001

# Target Aerospike cluster
storage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ heartbeat:
seeds:
- address: avs-1
port: 5001
- address: avs-3
port: 5001

# Target Aerospike cluster
storage:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Change the configuration for your use case.
cluster:
# Custom node-id. It will be auto-generated if not specified.
# node-id: a1

# Unique identifier for this cluster.
cluster-name: multi-node-avs

# The AVS service listening ports, TLS and network interface.
service:
ports:
5000: {}
# 5002:
# advertised-listeners:
# default:
# address: 127.0.0.1
# port: 5002

# Management API listening ports, TLS and network interface.
manage:
ports:
5040: {}

# Intra cluster interconnect listening ports, TLS and network interface.
interconnect:
ports:
5001:
addresses:
avs-3

heartbeat:
seeds:
- address: avs-1
port: 5001
- address: avs-2
port: 5001

# Target Aerospike cluster
storage:
seeds:
- aerospike:
port: 3000

# The logging properties.
logging:
enable-console-logging: true
levels:
metrics-ticker: off
1 change: 1 addition & 0 deletions .internal/multi-node/container-volumes/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ http {
upstream app {
server avs-1:5000;
server avs-2:5000;
server avs-3:5000;
}

server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ services:
timeout: 20s
retries: 10
networks:
- avs-demo
- avs-balanced
avs-1:
depends_on:
aerospike:
condition: service_healthy
image: aerospike/aerospike-vector-search:0.9.0
ports:
- "5000:5000" # change this to 5002 if you are using mac
# ports:
# - "5000:5000"
volumes:
- ./container-volumes/avs-1/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ./container-volumes/features/features.conf:/etc/aerospike-vector-search/features.conf
Expand All @@ -31,7 +31,7 @@ services:
timeout: 20s
retries: 10
networks:
- avs-demo
- avs-balanced
avs-2:
depends_on:
aerospike:
Expand All @@ -48,8 +48,40 @@ services:
timeout: 20s
retries: 10
networks:
- avs-demo
- avs-balanced
avs-3:
depends_on:
aerospike:
condition: service_healthy
image: aerospike/aerospike-vector-search:0.9.0
# ports:
# - "5000:5000"
volumes:
- ./container-volumes/avs-3/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ./container-volumes/features/features.conf:/etc/aerospike-vector-search/features.conf
healthcheck:
test: ["CMD", "curl", "-f", "http://avs-3:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
networks:
- avs-balanced
nginx:
image: nginx:latest
ports:
- "5000:5000" # change this to 5002 for macs, mac port 5000 is in use by default
depends_on:
avs-1:
condition: service_healthy
avs-2:
condition: service_healthy
avs-3:
condition: service_healthy
volumes:
- ./container-volumes/nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- avs-balanced


networks:
avs-demo: {}
avs-balanced: {}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ services:
timeout: 20s
retries: 10
networks:
- avs-demo
- avs-multi-node
avs-1:
depends_on:
aerospike:
condition: service_healthy
image: aerospike/aerospike-vector-search:0.9.0
# ports:
# - "5000:5000"
ports:
- "5000:5000" # change this to 5002 if you are using mac
volumes:
- ./container-volumes/avs-1/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ./container-volumes/features/features.conf:/etc/aerospike-vector-search/features.conf
Expand All @@ -31,7 +31,7 @@ services:
timeout: 20s
retries: 10
networks:
- avs-demo
- avs-multi-node
avs-2:
depends_on:
aerospike:
Expand All @@ -48,21 +48,25 @@ services:
timeout: 20s
retries: 10
networks:
- avs-demo
nginx:
image: nginx:latest
ports:
- "5000:5000" # change this to 5002 for macs, mac port 5000 is in use by default
- avs-multi-node
avs-3:
depends_on:
avs-1:
condition: service_healthy
avs-2:
aerospike:
condition: service_healthy
image: aerospike/aerospike-vector-search:0.9.0
# ports:
# - "5000:5000"
volumes:
- ./container-volumes/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./container-volumes/avs-3/etc/aerospike-vector-search:/etc/aerospike-vector-search
- ./container-volumes/features/features.conf:/etc/aerospike-vector-search/features.conf
healthcheck:
test: ["CMD", "curl", "-f", "http://avs-3:5040/manage/rest/v1"]
interval: 5s
timeout: 20s
retries: 10
networks:
- avs-demo
- avs-multi-node


networks:
avs-demo: {}
avs-multi-node: {}

0 comments on commit 1f36c4c

Please sign in to comment.