diff --git a/.env.example b/.env.example index 0a4a694..db7a14e 100644 --- a/.env.example +++ b/.env.example @@ -2,5 +2,5 @@ IMAGE=redislabs/redis:latest RE_USERNAME=test@test.com RE_PASS=12345 RE_CLUSTER_NAME=test -OSS_CLUSTER=false -DB_PORT=12000 \ No newline at end of file +RE_USE_OSS_CLUSTER=false +RE_DB_PORT=12000 diff --git a/.github/workflows/modes/.env.oss_cluster b/.github/workflows/modes/.env.oss_cluster index 2d719c9..532edae 100644 --- a/.github/workflows/modes/.env.oss_cluster +++ b/.github/workflows/modes/.env.oss_cluster @@ -2,5 +2,5 @@ IMAGE=redislabs/redis:latest RE_USERNAME=test@test.com RE_PASS=12345 RE_CLUSTER_NAME=test -OSS_CLUSTER=true -DB_PORT=6378 \ No newline at end of file +RE_USE_OSS_CLUSTER=true +RE_DB_PORT=6378 \ No newline at end of file diff --git a/.github/workflows/modes/.env.proxy b/.github/workflows/modes/.env.proxy index 0ff8577..54cc273 100644 --- a/.github/workflows/modes/.env.proxy +++ b/.github/workflows/modes/.env.proxy @@ -2,5 +2,5 @@ IMAGE=redislabs/redis:latest RE_USERNAME=test@test.com RE_PASS=12345 RE_CLUSTER_NAME=test -OSS_CLUSTER=false -DB_PORT=6379 \ No newline at end of file +RE_USE_OSS_CLUSTER=false +RE_DB_PORT=6379 \ No newline at end of file diff --git a/README.md b/README.md index b11ad72..4ec3293 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ export $(cat .env.credentials | xargs) ### Build RE cluster ### By default, RE cluster supports single endpoint and relies on DMC proxy to calculate hash slot. -Multiple endpoints (OSS cluster mode) could be enabled by setting env variable `OSS_CLUSTER=true`. +Multiple endpoints (OSS cluster mode) could be enabled by setting env variable `RE_USE_RE_USE_OSS_CLUSTER=true`. All standard RE ports available from your local network: diff --git a/create_db.sh b/create_db.sh index 963f823..37d5f51 100755 --- a/create_db.sh +++ b/create_db.sh @@ -1,5 +1,5 @@ #!/bin/bash curl -u $RE_USERNAME:$RE_PASS -H "Content-type: application/json" \ - -d '{"name": "db", "port": '$DB_PORT', "memory_size": 1273741824, "replication": false, "eviction_policy": "volatile-lru", "sharding": true, "shards_count": 3, "module_list": [{"module_args": "", "module_name": "ReJSON"},{"module_args": "", "module_name": "search"},{"module_args": "", "module_name": "timeseries"},{"module_args": "", "module_name": "bf"}], "oss_cluster": '$OSS_CLUSTER', "proxy_policy": "all-nodes", "shards_placement": "sparse", "shard_key_regex": [{"regex": ".*\\{(?.*)\\}.*"},{"regex": "(?.*)"}]}' \ + -d '{"name": "db", "port": '$RE_DB_PORT', "memory_size": 1273741824, "replication": false, "eviction_policy": "volatile-lru", "sharding": true, "shards_count": 3, "module_list": [{"module_args": "", "module_name": "ReJSON"},{"module_args": "", "module_name": "search"},{"module_args": "", "module_name": "timeseries"},{"module_args": "", "module_name": "bf"}], "oss_cluster": '$RE_USE_RE_USE_OSS_CLUSTER', "proxy_policy": "all-nodes", "shards_placement": "sparse", "shard_key_regex": [{"regex": ".*\\{(?.*)\\}.*"},{"regex": "(?.*)"}]}' \ -k -X POST https://localhost:9443/v1/bdbs \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e0f3bee..ed3b003 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,8 +14,8 @@ services: - RE_USERNAME=${RE_USERNAME} - RE_PASS=${RE_PASS} - RE_CLUSTER_NAME=${RE_CLUSTER_NAME} - - DB_PORT=${DB_PORT} - - OSS_CLUSTER=${OSS_CLUSTER} + - RE_DB_PORT=${RE_DB_PORT} + - RE_USE_RE_USE_OSS_CLUSTER=${RE_USE_RE_USE_OSS_CLUSTER} volumes: - "$PWD/setup_cluster.sh:/opt/setup_cluster.sh" - "$PWD/create_db.sh:/opt/create_db.sh" @@ -38,8 +38,8 @@ services: - RE_USERNAME=${RE_USERNAME} - RE_PASS=${RE_PASS} - RE_CLUSTER_NAME=${RE_CLUSTER_NAME} - - DB_PORT=${DB_PORT} - - OSS_CLUSTER=${OSS_CLUSTER} + - RE_DB_PORT=${RE_DB_PORT} + - RE_USE_RE_USE_OSS_CLUSTER=${RE_USE_RE_USE_OSS_CLUSTER} volumes: - "$PWD/join_node.sh:/opt/join_node.sh" networks: @@ -61,8 +61,8 @@ services: - RE_USERNAME=${RE_USERNAME} - RE_PASS=${RE_PASS} - RE_CLUSTER_NAME=${RE_CLUSTER_NAME} - - DB_PORT=${DB_PORT} - - OSS_CLUSTER=${OSS_CLUSTER} + - RE_DB_PORT=${RE_DB_PORT} + - RE_USE_RE_USE_OSS_CLUSTER=${RE_USE_RE_USE_OSS_CLUSTER} volumes: - "$PWD/join_node.sh:/opt/join_node.sh" networks: