Skip to content

Commit df0f931

Browse files
dvora-hchayimbarshaulVarun Chopra
authored andcommitted
Add redis5 and redis4 dockers (#1871)
* add redis5 and redis4 dockers * redis versions testenv * path changes * fix linters * fix tests * fixing linter * Increased pubsub's wait_for_messages timeout to prevent flaky tests (#1893) * Fixing TypeError in GraphCommands.explain (#1901) * Fixing AttributeError in UnixDomainSocketConnection (#1903) * Fixing AttributeError on some connection errors (#1905) * cluster script fixes to support future cluster versions and redis unstable (#1900) * Fixing LMOVE, BLMOVE returning an incorrect response (#1906) * Raising ConnectionError on invalid ocsp certificates - with status information (#1907) * 4.1.2 (#1904) * adding cluster env timeout time (#1908) * Update changes file with changes since 4.0.0-beta2 (#1915) * Fixing volume for unstable_cluster docker (#1914) * Change json.clear test multi to be up to date with redisjson (#1922) * fix json clear test * fix json clear test * Add support for BZMPOP (#1851) * add bzmpop * add comment * fix pr comment * fix linters * fix pr comments * add client no-evict (#1856) * Add support for ZINTERCARD (#1857) * add zintercard * fix pr comment * linters * Add support for EVAL_RO (#1862) * add sort_ro * mark test as onlynon cluster * delete mark test as onlynoncluster * add eval_ro * fix linters * delete sort_ro * fix pr comment * add type hints * add type hints * linters * Add support for EVALSHA_RO (#1863) * add evalsha-ro * fix pr comment * add type hints * add type hints * Fix naming conventions (#1872) * fix naming convention * fix worng changes * change ports to resolve conflict with unstable_cluster Co-authored-by: Chayim I. Kirshen <[email protected]> Co-authored-by: Chayim <[email protected]> Co-authored-by: Bar Shaul <[email protected]> Co-authored-by: Varun Chopra <[email protected]> (cherry picked from commit 0d26117)
1 parent b0a4708 commit df0f931

36 files changed

+477
-23
lines changed

.github/workflows/integration.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
- name: run tests
5050
run: |
5151
pip install -r dev_requirements.txt
52-
bash docker/stunnel/create_certs.sh
5352
tox -e ${{matrix.test-type}}-${{matrix.connection-type}}
5453
- name: Upload codecov coverage
5554
uses: codecov/codecov-action@v2

dev_requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pytest==6.2.5
66
pytest-timeout==2.0.1
77
tox==3.24.4
88
tox-docker==3.1.0
9-
tox-run-before==0.1
109
invoke==1.6.0
1110
pytest-cov>=3.0.0
1211
vulture>=2.3.0

docker/base/Dockerfile.cluster4

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# produces redisfab/redis-py-cluster:4.0
2+
FROM redis:4.0-buster
3+
4+
COPY create_cluster4.sh /create_cluster4.sh
5+
RUN chmod +x /create_cluster4.sh
6+
7+
EXPOSE 16391 16392 16393 16394 16395 16396
8+
9+
CMD [ "/create_cluster4.sh"]

docker/base/Dockerfile.cluster5

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# produces redisfab/redis-py-cluster:5.0
2+
FROM redis:5.0-buster
3+
4+
COPY create_cluster5.sh /create_cluster5.sh
5+
RUN chmod +x /create_cluster5.sh
6+
7+
EXPOSE 16385 16386 16387 16388 16389 16390
8+
9+
CMD [ "/create_cluster5.sh"]

docker/base/Dockerfile.redis4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# produces redisfab/redis-py:4.0
2+
FROM redis:4.0-buster
3+
4+
CMD ["redis-server", "/redis.conf"]

docker/base/Dockerfile.redis5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# produces redisfab/redis-py:5.0
2+
FROM redis:5.0-buster
3+
4+
CMD ["redis-server", "/redis.conf"]

docker/base/Dockerfile.sentinel4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# produces redisfab/redis-py-sentinel:4.0
2+
FROM redis:4.0-buster
3+
4+
CMD ["redis-sentinel", "/sentinel.conf"]

docker/base/Dockerfile.sentinel5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# produces redisfab/redis-py-sentinel:5.0
2+
FROM redis:5.0-buster
3+
4+
CMD ["redis-sentinel", "/sentinel.conf"]

docker/base/create_cluster.sh

100644100755
File mode changed.

docker/base/create_cluster4.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#! /bin/bash
2+
mkdir -p /nodes
3+
touch /nodes/nodemap
4+
for PORT in $(seq 16391 16396); do
5+
mkdir -p /nodes/$PORT
6+
if [[ -e /redis.conf ]]; then
7+
cp /redis.conf /nodes/$PORT/redis.conf
8+
else
9+
touch /nodes/$PORT/redis.conf
10+
fi
11+
cat << EOF >> /nodes/$PORT/redis.conf
12+
port ${PORT}
13+
cluster-enabled yes
14+
daemonize yes
15+
logfile /redis.log
16+
dir /nodes/$PORT
17+
EOF
18+
redis-server /nodes/$PORT/redis.conf
19+
if [ $? -ne 0 ]; then
20+
echo "Redis failed to start, exiting."
21+
exit 3
22+
fi
23+
echo 127.0.0.1:$PORT >> /nodes/nodemap
24+
done
25+
echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 16391 16396) --cluster-replicas 1
26+
tail -f /redis.log

0 commit comments

Comments
 (0)