renamed env variables and docker related items from redis to valkey
This commit is contained in:
parent
456e32abd0
commit
a49f8a6d67
@ -19,11 +19,11 @@ In order to set database type change the value of `DATABASE` variable in `.env`
|
||||
|
||||
In order to set cache type change the value of `CACHE` variable in `.env` file to one of the following:
|
||||
|
||||
- `redis` - use Redis standalone cache (1 node - 1 master);
|
||||
- `redis-cluster` - use Redis cluster cache (6 nodes - 3 masters, 3 slaves);
|
||||
- `redis-sentinel` - use Redis sentinel cache (3 nodes - 1 master, 1 slave, 1 sentinel)
|
||||
- `valkey` - use Valkey standalone cache (1 node - 1 primary);
|
||||
- `valkey-cluster` - use Valkey cluster cache (6 nodes - 3 primaries, 3 replicas);
|
||||
- `valkey-sentinel` - use Valkey sentinel cache (3 nodes - 1 primary, 1 replica, 1 sentinel)
|
||||
|
||||
**NOTE**: According to the cache type corresponding docker service will be deployed (see `docker-compose.redis.yml`, `docker-compose.redis-cluster.yml`, `docker-compose.redis-sentinel.yml` for details).
|
||||
**NOTE**: According to the cache type corresponding docker service will be deployed (see `docker-compose.valkey.yml`, `docker-compose.valkey-cluster.yml`, `docker-compose.valkey-sentinel.yml` for details).
|
||||
|
||||
Execute the following command to create log folders for the services and chown of these folders to the docker container users.
|
||||
To be able to change user, **chown** command is used, which requires sudo permissions (script will request password for a sudo access):
|
||||
|
||||
@ -31,10 +31,10 @@ services:
|
||||
volumes:
|
||||
valkey-sentinel-data-primary:
|
||||
external:
|
||||
name: ${VALKEY_SENTINEL_DATA_VOLUME_MASTER}
|
||||
name: ${VALKEY_SENTINEL_DATA_VOLUME_PRIMARY}
|
||||
valkey-sentinel-data-replica:
|
||||
external:
|
||||
name: ${VALKEY_SENTINEL_DATA_VOLUME_SLAVE}
|
||||
name: ${VALKEY_SENTINEL_DATA_VOLUME_REPLICA}
|
||||
valkey-sentinel-data-sentinel:
|
||||
external:
|
||||
name: ${VALKEY_SENTINEL_DATA_VOLUME_SENTINEL}
|
||||
|
||||
@ -18,19 +18,19 @@ As result, in REPOSITORY column, next images should be present:
|
||||
thingsboard/tb-web-ui
|
||||
thingsboard/tb-js-executor
|
||||
|
||||
- Run the black box tests (without ui tests) in the [msa/black-box-tests](../black-box-tests) directory with Redis standalone:
|
||||
- Run the black box tests (without ui tests) in the [msa/black-box-tests](../black-box-tests) directory with Valkey standalone:
|
||||
|
||||
mvn clean install -DblackBoxTests.skip=false
|
||||
|
||||
- Run the black box tests (without ui tests) in the [msa/black-box-tests](../black-box-tests) directory with Redis standalone with TLS:
|
||||
- Run the black box tests (without ui tests) in the [msa/black-box-tests](../black-box-tests) directory with Valkey standalone with TLS:
|
||||
|
||||
mvn clean install -DblackBoxTests.skip=false -DblackBoxTests.redisSsl=true
|
||||
|
||||
- Run the black box tests in the [msa/black-box-tests](../black-box-tests) directory with Redis cluster:
|
||||
- Run the black box tests in the [msa/black-box-tests](../black-box-tests) directory with the Valkey cluster:
|
||||
|
||||
mvn clean install -DblackBoxTests.skip=false -DblackBoxTests.redisCluster=true
|
||||
|
||||
- Run the black box tests in the [msa/black-box-tests](../black-box-tests) directory with Redis sentinel:
|
||||
- Run the black box tests in the [msa/black-box-tests](../black-box-tests) directory with Valkey sentinel:
|
||||
|
||||
mvn clean install -DblackBoxTests.skip=false -DblackBoxTests.redisSentinel=true
|
||||
|
||||
|
||||
@ -42,9 +42,9 @@ import static org.testng.Assert.fail;
|
||||
|
||||
@Slf4j
|
||||
public class ContainerTestSuite {
|
||||
final static boolean IS_REDIS_CLUSTER = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisCluster"));
|
||||
final static boolean IS_REDIS_SENTINEL = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisSentinel"));
|
||||
final static boolean IS_REDIS_SSL = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisSsl"));
|
||||
final static boolean IS_VALKEY_CLUSTER = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisCluster"));
|
||||
final static boolean IS_VALKEY_SENTINEL = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisSentinel"));
|
||||
final static boolean IS_VALKEY_SSL = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisSsl"));
|
||||
final static boolean IS_HYBRID_MODE = Boolean.parseBoolean(System.getProperty("blackBoxTests.hybridMode"));
|
||||
final static String QUEUE_TYPE = System.getProperty("blackBoxTests.queue", "kafka");
|
||||
private static final String SOURCE_DIR = "./../../docker/";
|
||||
@ -82,9 +82,9 @@ public class ContainerTestSuite {
|
||||
public void start() {
|
||||
installTb = new ThingsBoardDbInstaller();
|
||||
installTb.createVolumes();
|
||||
log.info("System property of blackBoxTests.redisCluster is {}", IS_REDIS_CLUSTER);
|
||||
log.info("System property of blackBoxTests.redisSentinel is {}", IS_REDIS_SENTINEL);
|
||||
log.info("System property of blackBoxTests.redisSsl is {}", IS_REDIS_SSL);
|
||||
log.info("System property of blackBoxTests.redisCluster is {}", IS_VALKEY_CLUSTER);
|
||||
log.info("System property of blackBoxTests.redisSentinel is {}", IS_VALKEY_SENTINEL);
|
||||
log.info("System property of blackBoxTests.redisSsl is {}", IS_VALKEY_SSL);
|
||||
log.info("System property of blackBoxTests.hybridMode is {}", IS_HYBRID_MODE);
|
||||
boolean skipTailChildContainers = Boolean.parseBoolean(System.getProperty("blackBoxTests.skipTailChildContainers"));
|
||||
try {
|
||||
@ -107,10 +107,10 @@ public class ContainerTestSuite {
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_REDIS_SSL) {
|
||||
addToFile(targetDir, "cache-redis.env",
|
||||
if (IS_VALKEY_SSL) {
|
||||
addToFile(targetDir, "cache-valkey.env",
|
||||
Map.of("TB_REDIS_SSL_ENABLED", "true",
|
||||
"TB_REDIS_SSL_PEM_CERT", "/redis/certs/redisCA.crt"));
|
||||
"TB_REDIS_SSL_PEM_CERT", "/valkey/certs/valkeyCA.crt"));
|
||||
}
|
||||
|
||||
List<File> composeFiles = new ArrayList<>(Arrays.asList(
|
||||
@ -123,8 +123,8 @@ public class ContainerTestSuite {
|
||||
new File(targetDir + (IS_HYBRID_MODE ? "docker-compose.hybrid-test-extras.yml" : "docker-compose.postgres-test-extras.yml")),
|
||||
new File(targetDir + "docker-compose.postgres.volumes.yml"),
|
||||
new File(targetDir + "docker-compose." + QUEUE_TYPE + ".yml"),
|
||||
new File(targetDir + resolveRedisComposeFile()),
|
||||
new File(targetDir + resolveRedisComposeVolumesFile()),
|
||||
new File(targetDir + resolveValkeyComposeFile()),
|
||||
new File(targetDir + resolveValkeyComposeVolumesFile()),
|
||||
new File(targetDir + ("docker-selenium.yml"))
|
||||
));
|
||||
|
||||
@ -198,30 +198,30 @@ public class ContainerTestSuite {
|
||||
}
|
||||
}
|
||||
|
||||
private static String resolveRedisComposeFile() {
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
return "docker-compose.redis-cluster.yml";
|
||||
private static String resolveValkeyComposeFile() {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
return "docker-compose.valkey-cluster.yml";
|
||||
}
|
||||
if (IS_REDIS_SENTINEL) {
|
||||
return "docker-compose.redis-sentinel.yml";
|
||||
if (IS_VALKEY_SENTINEL) {
|
||||
return "docker-compose.valkey-sentinel.yml";
|
||||
}
|
||||
if (IS_REDIS_SSL) {
|
||||
return "docker-compose.redis-ssl.yml";
|
||||
if (IS_VALKEY_SSL) {
|
||||
return "docker-compose.valkey-ssl.yml";
|
||||
}
|
||||
return "docker-compose.redis.yml";
|
||||
return "docker-compose.valkey.yml";
|
||||
}
|
||||
|
||||
private static String resolveRedisComposeVolumesFile() {
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
return "docker-compose.redis-cluster.volumes.yml";
|
||||
private static String resolveValkeyComposeVolumesFile() {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
return "docker-compose.valkey-cluster.volumes.yml";
|
||||
}
|
||||
if (IS_REDIS_SENTINEL) {
|
||||
return "docker-compose.redis-sentinel.volumes.yml";
|
||||
if (IS_VALKEY_SENTINEL) {
|
||||
return "docker-compose.valkey-sentinel.volumes.yml";
|
||||
}
|
||||
if (IS_REDIS_SSL) {
|
||||
return "docker-compose.redis-ssl.volumes.yml";
|
||||
if (IS_VALKEY_SSL) {
|
||||
return "docker-compose.valkey-ssl.volumes.yml";
|
||||
}
|
||||
return "docker-compose.redis.volumes.yml";
|
||||
return "docker-compose.valkey.volumes.yml";
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
@ -32,15 +32,15 @@ import java.util.stream.IntStream;
|
||||
@Slf4j
|
||||
public class ThingsBoardDbInstaller {
|
||||
|
||||
final static boolean IS_REDIS_CLUSTER = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisCluster"));
|
||||
final static boolean IS_REDIS_SENTINEL = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisSentinel"));
|
||||
final static boolean IS_VALKEY_CLUSTER = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisCluster"));
|
||||
final static boolean IS_VALKEY_SENTINEL = Boolean.parseBoolean(System.getProperty("blackBoxTests.redisSentinel"));
|
||||
final static boolean IS_HYBRID_MODE = Boolean.parseBoolean(System.getProperty("blackBoxTests.hybridMode"));
|
||||
private final static String POSTGRES_DATA_VOLUME = "tb-postgres-test-data-volume";
|
||||
|
||||
private final static String CASSANDRA_DATA_VOLUME = "tb-cassandra-test-data-volume";
|
||||
private final static String REDIS_DATA_VOLUME = "tb-redis-data-volume";
|
||||
private final static String REDIS_CLUSTER_DATA_VOLUME = "tb-redis-cluster-data-volume";
|
||||
private final static String REDIS_SENTINEL_DATA_VOLUME = "tb-redis-sentinel-data-volume";
|
||||
private final static String VALKEY_DATA_VOLUME = "tb-valkey-data-volume";
|
||||
private final static String VALKEY_CLUSTER_DATA_VOLUME = "tb-valkey-cluster-data-volume";
|
||||
private final static String VALKEY_SENTINEL_DATA_VOLUME = "tb-valkey-sentinel-data-volume";
|
||||
private final static String TB_LOG_VOLUME = "tb-log-test-volume";
|
||||
private final static String TB_COAP_TRANSPORT_LOG_VOLUME = "tb-coap-transport-log-test-volume";
|
||||
private final static String TB_LWM2M_TRANSPORT_LOG_VOLUME = "tb-lwm2m-transport-log-test-volume";
|
||||
@ -56,9 +56,9 @@ public class ThingsBoardDbInstaller {
|
||||
private final String postgresDataVolume;
|
||||
private final String cassandraDataVolume;
|
||||
|
||||
private final String redisDataVolume;
|
||||
private final String redisClusterDataVolume;
|
||||
private final String redisSentinelDataVolume;
|
||||
private final String valkeyDataVolume;
|
||||
private final String valkeyClusterDataVolume;
|
||||
private final String valkeySentinelDataVolume;
|
||||
private final String tbLogVolume;
|
||||
private final String tbCoapTransportLogVolume;
|
||||
private final String tbLwm2mTransportLogVolume;
|
||||
@ -70,8 +70,8 @@ public class ThingsBoardDbInstaller {
|
||||
private final Map<String, String> env;
|
||||
|
||||
public ThingsBoardDbInstaller() {
|
||||
log.info("System property of blackBoxTests.redisCluster is {}", IS_REDIS_CLUSTER);
|
||||
log.info("System property of blackBoxTests.redisCluster is {}", IS_REDIS_SENTINEL);
|
||||
log.info("System property of blackBoxTests.redisCluster is {}", IS_VALKEY_CLUSTER);
|
||||
log.info("System property of blackBoxTests.redisCluster is {}", IS_VALKEY_SENTINEL);
|
||||
log.info("System property of blackBoxTests.hybridMode is {}", IS_HYBRID_MODE);
|
||||
List<File> composeFiles = new ArrayList<>(Arrays.asList(
|
||||
new File("./../../docker/docker-compose.yml"),
|
||||
@ -80,8 +80,8 @@ public class ThingsBoardDbInstaller {
|
||||
? new File("./../../docker/docker-compose.hybrid.yml")
|
||||
: new File("./../../docker/docker-compose.postgres.yml"),
|
||||
new File("./../../docker/docker-compose.postgres.volumes.yml"),
|
||||
resolveRedisComposeFile(),
|
||||
resolveRedisComposeVolumesFile()
|
||||
resolveValkeyComposeFile(),
|
||||
resolveValkeyComposeVolumesFile()
|
||||
));
|
||||
if (IS_HYBRID_MODE) {
|
||||
composeFiles.add(new File("./../../docker/docker-compose.cassandra.volumes.yml"));
|
||||
@ -95,9 +95,9 @@ public class ThingsBoardDbInstaller {
|
||||
|
||||
postgresDataVolume = project + "_" + POSTGRES_DATA_VOLUME;
|
||||
cassandraDataVolume = project + "_" + CASSANDRA_DATA_VOLUME;
|
||||
redisDataVolume = project + "_" + REDIS_DATA_VOLUME;
|
||||
redisClusterDataVolume = project + "_" + REDIS_CLUSTER_DATA_VOLUME;
|
||||
redisSentinelDataVolume = project + "_" + REDIS_SENTINEL_DATA_VOLUME;
|
||||
valkeyDataVolume = project + "_" + VALKEY_DATA_VOLUME;
|
||||
valkeyClusterDataVolume = project + "_" + VALKEY_CLUSTER_DATA_VOLUME;
|
||||
valkeySentinelDataVolume = project + "_" + VALKEY_SENTINEL_DATA_VOLUME;
|
||||
tbLogVolume = project + "_" + TB_LOG_VOLUME;
|
||||
tbCoapTransportLogVolume = project + "_" + TB_COAP_TRANSPORT_LOG_VOLUME;
|
||||
tbLwm2mTransportLogVolume = project + "_" + TB_LWM2M_TRANSPORT_LOG_VOLUME;
|
||||
@ -123,38 +123,38 @@ public class ThingsBoardDbInstaller {
|
||||
env.put("TB_SNMP_TRANSPORT_LOG_VOLUME", tbSnmpTransportLogVolume);
|
||||
env.put("TB_VC_EXECUTOR_LOG_VOLUME", tbVcExecutorLogVolume);
|
||||
env.put("TB_EDQS_LOG_VOLUME", tbEdqsLogVolume);
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
env.put("REDIS_CLUSTER_DATA_VOLUME_" + i, redisClusterDataVolume + '-' + i);
|
||||
env.put("VALKEY_CLUSTER_DATA_VOLUME_" + i, valkeyClusterDataVolume + '-' + i);
|
||||
}
|
||||
} else if (IS_REDIS_SENTINEL) {
|
||||
env.put("REDIS_SENTINEL_DATA_VOLUME_MASTER", redisSentinelDataVolume + "-" + "master");
|
||||
env.put("REDIS_SENTINEL_DATA_VOLUME_SLAVE", redisSentinelDataVolume + "-" + "slave");
|
||||
env.put("REDIS_SENTINEL_DATA_VOLUME_SENTINEL", redisSentinelDataVolume + "-" + "sentinel");
|
||||
} else if (IS_VALKEY_SENTINEL) {
|
||||
env.put("VALKEY_SENTINEL_DATA_VOLUME_PRIMARY", valkeySentinelDataVolume + "-" + "primary");
|
||||
env.put("VALKEY_SENTINEL_DATA_VOLUME_REPLICA", valkeySentinelDataVolume + "-" + "replica");
|
||||
env.put("VALKEY_SENTINEL_DATA_VOLUME_SENTINEL", valkeySentinelDataVolume + "-" + "sentinel");
|
||||
} else {
|
||||
env.put("REDIS_DATA_VOLUME", redisDataVolume);
|
||||
env.put("VALKEY_DATA_VOLUME", valkeyDataVolume);
|
||||
}
|
||||
dockerCompose.withEnv(env);
|
||||
}
|
||||
|
||||
private static File resolveRedisComposeVolumesFile() {
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
return new File("./../../docker/docker-compose.redis-cluster.volumes.yml");
|
||||
private static File resolveValkeyComposeVolumesFile() {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
return new File("./../../docker/docker-compose.valkey-cluster.volumes.yml");
|
||||
}
|
||||
if (IS_REDIS_SENTINEL) {
|
||||
return new File("./../../docker/docker-compose.redis-sentinel.volumes.yml");
|
||||
if (IS_VALKEY_SENTINEL) {
|
||||
return new File("./../../docker/docker-compose.valkey-sentinel.volumes.yml");
|
||||
}
|
||||
return new File("./../../docker/docker-compose.redis.volumes.yml");
|
||||
return new File("./../../docker/docker-compose.valkey.volumes.yml");
|
||||
}
|
||||
|
||||
private static File resolveRedisComposeFile() {
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
return new File("./../../docker/docker-compose.redis-cluster.yml");
|
||||
private static File resolveValkeyComposeFile() {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
return new File("./../../docker/docker-compose.valkey-cluster.yml");
|
||||
}
|
||||
if (IS_REDIS_SENTINEL) {
|
||||
return new File("./../../docker/docker-compose.redis-sentinel.yml");
|
||||
if (IS_VALKEY_SENTINEL) {
|
||||
return new File("./../../docker/docker-compose.valkey-sentinel.yml");
|
||||
}
|
||||
return new File("./../../docker/docker-compose.redis.yml");
|
||||
return new File("./../../docker/docker-compose.valkey.yml");
|
||||
}
|
||||
|
||||
public Map<String, String> getEnv() {
|
||||
@ -200,27 +200,27 @@ public class ThingsBoardDbInstaller {
|
||||
if (IS_HYBRID_MODE) {
|
||||
additionalServices.append(" cassandra");
|
||||
}
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
additionalServices.append(" redis-node-").append(i);
|
||||
dockerCompose.withCommand("volume create " + redisClusterDataVolume + '-' + i);
|
||||
additionalServices.append(" valkey-node-").append(i);
|
||||
dockerCompose.withCommand("volume create " + valkeyClusterDataVolume + '-' + i);
|
||||
dockerCompose.invokeDocker();
|
||||
}
|
||||
} else if (IS_REDIS_SENTINEL) {
|
||||
additionalServices.append(" redis-master");
|
||||
dockerCompose.withCommand("volume create " + redisSentinelDataVolume + "-" + "master");
|
||||
} else if (IS_VALKEY_SENTINEL) {
|
||||
additionalServices.append(" valkey-primary");
|
||||
dockerCompose.withCommand("volume create " + valkeySentinelDataVolume + "-" + "primary");
|
||||
dockerCompose.invokeDocker();
|
||||
|
||||
additionalServices.append(" redis-slave");
|
||||
dockerCompose.withCommand("volume create " + redisSentinelDataVolume + '-' + "slave");
|
||||
additionalServices.append(" valkey-replica");
|
||||
dockerCompose.withCommand("volume create " + valkeySentinelDataVolume + '-' + "replica");
|
||||
dockerCompose.invokeDocker();
|
||||
|
||||
additionalServices.append(" redis-sentinel");
|
||||
dockerCompose.withCommand("volume create " + redisSentinelDataVolume + '-' + "sentinel");
|
||||
additionalServices.append(" valkey-sentinel");
|
||||
dockerCompose.withCommand("volume create " + valkeySentinelDataVolume + '-' + "sentinel");
|
||||
dockerCompose.invokeDocker();
|
||||
} else {
|
||||
additionalServices.append(" redis");
|
||||
dockerCompose.withCommand("volume create " + redisDataVolume);
|
||||
additionalServices.append(" valkey");
|
||||
dockerCompose.withCommand("volume create " + valkeyDataVolume);
|
||||
dockerCompose.invokeDocker();
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@ public class ThingsBoardDbInstaller {
|
||||
.add(tbSnmpTransportLogVolume)
|
||||
.add(tbVcExecutorLogVolume)
|
||||
.add(tbEdqsLogVolume)
|
||||
.add(resolveRedisComposeVolumeLog());
|
||||
.add(resolveValkeyComposeVolumeLog());
|
||||
|
||||
if (IS_HYBRID_MODE) {
|
||||
rmVolumesCommand.add(cassandraDataVolume);
|
||||
@ -270,16 +270,16 @@ public class ThingsBoardDbInstaller {
|
||||
dockerCompose.withCommand(rmVolumesCommand.toString());
|
||||
}
|
||||
|
||||
private String resolveRedisComposeVolumeLog() {
|
||||
if (IS_REDIS_CLUSTER) {
|
||||
return IntStream.range(0, 6).mapToObj(i -> " " + redisClusterDataVolume + "-" + i).collect(Collectors.joining());
|
||||
private String resolveValkeyComposeVolumeLog() {
|
||||
if (IS_VALKEY_CLUSTER) {
|
||||
return IntStream.range(0, 6).mapToObj(i -> " " + valkeyClusterDataVolume + "-" + i).collect(Collectors.joining());
|
||||
}
|
||||
if (IS_REDIS_SENTINEL) {
|
||||
return redisSentinelDataVolume + "-" + "master " + " " +
|
||||
redisSentinelDataVolume + "-" + "slave" + " " +
|
||||
redisSentinelDataVolume + " " + "sentinel";
|
||||
if (IS_VALKEY_SENTINEL) {
|
||||
return valkeySentinelDataVolume + "-" + "primary " + " " +
|
||||
valkeySentinelDataVolume + "-" + "replica" + " " +
|
||||
valkeySentinelDataVolume + " " + "sentinel";
|
||||
}
|
||||
return redisDataVolume;
|
||||
return valkeyDataVolume;
|
||||
}
|
||||
|
||||
private void copyLogs(String volumeName, String targetDir) {
|
||||
|
||||
@ -17,11 +17,11 @@
|
||||
version: '3.0'
|
||||
|
||||
services:
|
||||
redis:
|
||||
valkey:
|
||||
volumes:
|
||||
- redis-data:/bitnami/redis/data
|
||||
- valkey-data:/bitnami/valkey/data
|
||||
|
||||
volumes:
|
||||
redis-data:
|
||||
valkey-data:
|
||||
external:
|
||||
name: ${REDIS_DATA_VOLUME}
|
||||
name: ${VALKEY_DATA_VOLUME}
|
||||
@ -17,114 +17,114 @@
|
||||
version: '3.0'
|
||||
|
||||
services:
|
||||
# Redis standalone
|
||||
# The latest version of Redis compatible with ThingsBoard is 7.2
|
||||
redis:
|
||||
# Valkey standalone
|
||||
# The latest version of Valkey compatible with ThingsBoard is 8.0
|
||||
valkey:
|
||||
restart: always
|
||||
image: bitnami/valkey:8.0
|
||||
environment:
|
||||
# ALLOW_EMPTY_PASSWORD is recommended only for development.
|
||||
- 'ALLOW_EMPTY_PASSWORD=yes'
|
||||
- 'VALKEY_TLS_ENABLED=yes'
|
||||
- 'VALKEY_TLS_CERT_FILE=/redis/certs/redis.crt'
|
||||
- 'VALKEY_TLS_KEY_FILE=/redis/certs/redis.key'
|
||||
- 'VALKEY_TLS_CA_FILE=/redis/certs/redisCA.crt'
|
||||
- 'VALKEY_TLS_CERT_FILE=/valkey/certs/valkey.crt'
|
||||
- 'VALKEY_TLS_KEY_FILE=/valkey/certs/valkey.key'
|
||||
- 'VALKEY_TLS_CA_FILE=/valkey/certs/valkeyCA.crt'
|
||||
- 'VALKEY_TLS_AUTH_CLIENTS=no'
|
||||
ports:
|
||||
- '6379:6379'
|
||||
volumes:
|
||||
- ./tb-node/redis-data:/bitnami/redis/data
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./tb-node/valkey-data:/bitnami/valkey/data
|
||||
- ./valkey-certs:/valkey/certs
|
||||
|
||||
# ThingsBoard setup to use redis-standalone
|
||||
# ThingsBoard setup to use valkey-standalone
|
||||
tb-core1:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-core2:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-rule-engine1:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-rule-engine2:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-mqtt-transport1:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-mqtt-transport2:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-http-transport1:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-http-transport2:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-coap-transport:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-lwm2m-transport:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-snmp-transport:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-vc-executor1:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
tb-vc-executor2:
|
||||
env_file:
|
||||
- cache-redis.env
|
||||
- cache-valkey.env
|
||||
volumes:
|
||||
- ./redis-certs:/redis/certs
|
||||
- ./valkey-certs:/valkey/certs
|
||||
depends_on:
|
||||
- redis
|
||||
- valkey
|
||||
Loading…
x
Reference in New Issue
Block a user