Skip to content

Commit

Permalink
Migrate to client-testing image
Browse files Browse the repository at this point in the history
- Use clients-testing image for standalone and cluster
- Remove hardcoded TLS certificates and keys
- Remove stunnel
- Remove Cluster docker and configs
  • Loading branch information
uglide committed Oct 15, 2024
1 parent 17db62e commit 7516993
Show file tree
Hide file tree
Showing 22 changed files with 107 additions and 371 deletions.
50 changes: 20 additions & 30 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
---

version: "3.8"

services:

redis:
image: ${REDIS_IMAGE:-redis:latest}
image: redislabs/client-libs-test:8.0-M01
container_name: redis-standalone
command: redis-server --enable-debug-command yes --protected-mode no
environment:
- REDIS_TLS_ENABLED=yes
- PORT=6379
- TLS_PORT=6666
- REDIS_DIRECTIVES=--enable-debug-command yes
ports:
- 6379:6379
- 6666:6666 # TLS port
volumes:
- "./dockers/standalone:/redis/work"
profiles:
- standalone
- sentinel
Expand All @@ -29,39 +34,24 @@ services:
- all

cluster:
image: redislabs/client-libs-test:8.0-M01
container_name: redis-cluster
build:
context: .
dockerfile: dockers/Dockerfile.cluster
args:
REDIS_IMAGE: ${REDIS_IMAGE:-redis:latest}
environment:
- REDIS_CLUSTER=yes
- NODES=6
- TLS_ENABLED=yes
- PORT=16379
- TLS_PORT=17379
- REDIS_DIRECTIVES=--tls-auth-clients optional
ports:
- 16379:16379
- 16380:16380
- 16381:16381
- 16382:16382
- 16383:16383
- 16384:16384
- "16379-16384:16379-16384"
- "17379-17384:17379-17384"
volumes:
- "./dockers/cluster.redis.conf:/redis.conf:ro"
- "./dockers/cluster:/redis/work"
profiles:
- cluster
- all

stunnel:
image: redisfab/stunnel:latest
depends_on:
- redis
ports:
- 6666:6666
profiles:
- all
- standalone
- ssl
volumes:
- "./dockers/stunnel/conf:/etc/stunnel/conf.d:ro"
- "./dockers/stunnel/keys:/etc/stunnel/keys:ro"

sentinel:
image: ${REDIS_IMAGE:-redis:latest}
container_name: redis-sentinel
Expand Down
7 changes: 0 additions & 7 deletions dockers/Dockerfile.cluster

This file was deleted.

2 changes: 0 additions & 2 deletions dockers/cluster.redis.conf

This file was deleted.

47 changes: 0 additions & 47 deletions dockers/create_cluster.sh

This file was deleted.

1 change: 0 additions & 1 deletion dockers/stunnel/README

This file was deleted.

6 changes: 0 additions & 6 deletions dockers/stunnel/conf/redis.conf

This file was deleted.

45 changes: 0 additions & 45 deletions dockers/stunnel/create_certs.sh

This file was deleted.

19 changes: 0 additions & 19 deletions dockers/stunnel/keys/ca-cert.pem

This file was deleted.

28 changes: 0 additions & 28 deletions dockers/stunnel/keys/ca-key.pem

This file was deleted.

17 changes: 0 additions & 17 deletions dockers/stunnel/keys/client-cert.pem

This file was deleted.

28 changes: 0 additions & 28 deletions dockers/stunnel/keys/client-key.pem

This file was deleted.

15 changes: 0 additions & 15 deletions dockers/stunnel/keys/client-req.pem

This file was deleted.

17 changes: 0 additions & 17 deletions dockers/stunnel/keys/server-cert.pem

This file was deleted.

28 changes: 0 additions & 28 deletions dockers/stunnel/keys/server-key.pem

This file was deleted.

15 changes: 0 additions & 15 deletions dockers/stunnel/keys/server-req.pem

This file was deleted.

5 changes: 3 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ def cluster_tests(c, uvloop=False, protocol=2, profile=False):
"""Run tests against a redis cluster"""
profile_arg = "--profile" if profile else ""
cluster_url = "redis://localhost:16379/0"
cluster_tls_url = "rediss://localhost:17379/0"
if uvloop:
run(
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster.xml -m 'not onlynoncluster and not redismod' --redis-url={cluster_url} --junit-xml=cluster-uvloop-results.xml --uvloop"
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster.xml -m 'not onlynoncluster and not redismod' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-uvloop-results.xml --uvloop"
)
else:
run(
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_clusteclient.xml -m 'not onlynoncluster and not redismod' --redis-url={cluster_url} --junit-xml=cluster-results.xml"
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_clusteclient.xml -m 'not onlynoncluster and not redismod' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-results.xml"
)


Expand Down
Loading

0 comments on commit 7516993

Please sign in to comment.