diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index b034428bcd..a73bb71160 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -49,7 +49,6 @@ jobs: - name: run tests run: | pip install -r dev_requirements.txt - bash docker/stunnel/create_certs.sh tox -e ${{matrix.test-type}}-${{matrix.connection-type}} - name: Upload codecov coverage uses: codecov/codecov-action@v2 diff --git a/dev_requirements.txt b/dev_requirements.txt index 1d33b9875b..2a4f37762f 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -6,7 +6,6 @@ pytest==6.2.5 pytest-timeout==2.0.1 tox==3.24.4 tox-docker==3.1.0 -tox-run-before==0.1 invoke==1.6.0 pytest-cov>=3.0.0 vulture>=2.3.0 diff --git a/docker/base/Dockerfile.cluster4 b/docker/base/Dockerfile.cluster4 new file mode 100644 index 0000000000..3158d6edd4 --- /dev/null +++ b/docker/base/Dockerfile.cluster4 @@ -0,0 +1,9 @@ +# produces redisfab/redis-py-cluster:4.0 +FROM redis:4.0-buster + +COPY create_cluster4.sh /create_cluster4.sh +RUN chmod +x /create_cluster4.sh + +EXPOSE 16391 16392 16393 16394 16395 16396 + +CMD [ "/create_cluster4.sh"] \ No newline at end of file diff --git a/docker/base/Dockerfile.cluster5 b/docker/base/Dockerfile.cluster5 new file mode 100644 index 0000000000..3becfc853a --- /dev/null +++ b/docker/base/Dockerfile.cluster5 @@ -0,0 +1,9 @@ +# produces redisfab/redis-py-cluster:5.0 +FROM redis:5.0-buster + +COPY create_cluster5.sh /create_cluster5.sh +RUN chmod +x /create_cluster5.sh + +EXPOSE 16385 16386 16387 16388 16389 16390 + +CMD [ "/create_cluster5.sh"] \ No newline at end of file diff --git a/docker/base/Dockerfile.redis4 b/docker/base/Dockerfile.redis4 new file mode 100644 index 0000000000..7528ac1631 --- /dev/null +++ b/docker/base/Dockerfile.redis4 @@ -0,0 +1,4 @@ +# produces redisfab/redis-py:4.0 +FROM redis:4.0-buster + +CMD ["redis-server", "/redis.conf"] \ No newline at end of file diff --git a/docker/base/Dockerfile.redis5 b/docker/base/Dockerfile.redis5 new file mode 100644 index 0000000000..6bcbe20bfc --- /dev/null +++ b/docker/base/Dockerfile.redis5 @@ -0,0 +1,4 @@ +# produces redisfab/redis-py:5.0 +FROM redis:5.0-buster + +CMD ["redis-server", "/redis.conf"] \ No newline at end of file diff --git a/docker/base/Dockerfile.sentinel4 b/docker/base/Dockerfile.sentinel4 new file mode 100644 index 0000000000..45bb03e88e --- /dev/null +++ b/docker/base/Dockerfile.sentinel4 @@ -0,0 +1,4 @@ +# produces redisfab/redis-py-sentinel:4.0 +FROM redis:4.0-buster + +CMD ["redis-sentinel", "/sentinel.conf"] \ No newline at end of file diff --git a/docker/base/Dockerfile.sentinel5 b/docker/base/Dockerfile.sentinel5 new file mode 100644 index 0000000000..6958154e46 --- /dev/null +++ b/docker/base/Dockerfile.sentinel5 @@ -0,0 +1,4 @@ +# produces redisfab/redis-py-sentinel:5.0 +FROM redis:5.0-buster + +CMD ["redis-sentinel", "/sentinel.conf"] \ No newline at end of file diff --git a/docker/base/create_cluster.sh b/docker/base/create_cluster.sh old mode 100644 new mode 100755 diff --git a/docker/base/create_cluster4.sh b/docker/base/create_cluster4.sh new file mode 100755 index 0000000000..a39da58784 --- /dev/null +++ b/docker/base/create_cluster4.sh @@ -0,0 +1,26 @@ +#! /bin/bash +mkdir -p /nodes +touch /nodes/nodemap +for PORT in $(seq 16391 16396); do + mkdir -p /nodes/$PORT + if [[ -e /redis.conf ]]; then + cp /redis.conf /nodes/$PORT/redis.conf + else + touch /nodes/$PORT/redis.conf + fi + cat << EOF >> /nodes/$PORT/redis.conf +port ${PORT} +cluster-enabled yes +daemonize yes +logfile /redis.log +dir /nodes/$PORT +EOF + redis-server /nodes/$PORT/redis.conf + if [ $? -ne 0 ]; then + echo "Redis failed to start, exiting." + exit 3 + fi + echo 127.0.0.1:$PORT >> /nodes/nodemap +done +echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 16391 16396) --cluster-replicas 1 +tail -f /redis.log \ No newline at end of file diff --git a/docker/base/create_cluster5.sh b/docker/base/create_cluster5.sh new file mode 100755 index 0000000000..0c63d8e910 --- /dev/null +++ b/docker/base/create_cluster5.sh @@ -0,0 +1,26 @@ +#! /bin/bash +mkdir -p /nodes +touch /nodes/nodemap +for PORT in $(seq 16385 16390); do + mkdir -p /nodes/$PORT + if [[ -e /redis.conf ]]; then + cp /redis.conf /nodes/$PORT/redis.conf + else + touch /nodes/$PORT/redis.conf + fi + cat << EOF >> /nodes/$PORT/redis.conf +port ${PORT} +cluster-enabled yes +daemonize yes +logfile /redis.log +dir /nodes/$PORT +EOF + redis-server /nodes/$PORT/redis.conf + if [ $? -ne 0 ]; then + echo "Redis failed to start, exiting." + exit 3 + fi + echo 127.0.0.1:$PORT >> /nodes/nodemap +done +echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 16385 16390) --cluster-replicas 1 +tail -f /redis.log \ No newline at end of file diff --git a/docker/redis4/master/redis.conf b/docker/redis4/master/redis.conf new file mode 100644 index 0000000000..b7ed0ebf00 --- /dev/null +++ b/docker/redis4/master/redis.conf @@ -0,0 +1,2 @@ +port 6381 +save "" diff --git a/docker/redis4/sentinel/sentinel_1.conf b/docker/redis4/sentinel/sentinel_1.conf new file mode 100644 index 0000000000..cfee17c051 --- /dev/null +++ b/docker/redis4/sentinel/sentinel_1.conf @@ -0,0 +1,6 @@ +port 26385 + +sentinel monitor redis-py-test 127.0.0.1 6381 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 diff --git a/docker/redis4/sentinel/sentinel_2.conf b/docker/redis4/sentinel/sentinel_2.conf new file mode 100644 index 0000000000..68d930aea8 --- /dev/null +++ b/docker/redis4/sentinel/sentinel_2.conf @@ -0,0 +1,6 @@ +port 26386 + +sentinel monitor redis-py-test 127.0.0.1 6381 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 \ No newline at end of file diff --git a/docker/redis4/sentinel/sentinel_3.conf b/docker/redis4/sentinel/sentinel_3.conf new file mode 100644 index 0000000000..60abf65c9b --- /dev/null +++ b/docker/redis4/sentinel/sentinel_3.conf @@ -0,0 +1,6 @@ +port 26387 + +sentinel monitor redis-py-test 127.0.0.1 6381 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 \ No newline at end of file diff --git a/docker/redis5/master/redis.conf b/docker/redis5/master/redis.conf new file mode 100644 index 0000000000..e479c48b28 --- /dev/null +++ b/docker/redis5/master/redis.conf @@ -0,0 +1,2 @@ +port 6382 +save "" diff --git a/docker/redis5/replica/redis.conf b/docker/redis5/replica/redis.conf new file mode 100644 index 0000000000..a2dc9e0945 --- /dev/null +++ b/docker/redis5/replica/redis.conf @@ -0,0 +1,3 @@ +port 6383 +save "" +replicaof master 6382 diff --git a/docker/redis5/sentinel/sentinel_1.conf b/docker/redis5/sentinel/sentinel_1.conf new file mode 100644 index 0000000000..c748a0ba72 --- /dev/null +++ b/docker/redis5/sentinel/sentinel_1.conf @@ -0,0 +1,6 @@ +port 26382 + +sentinel monitor redis-py-test 127.0.0.1 6382 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 diff --git a/docker/redis5/sentinel/sentinel_2.conf b/docker/redis5/sentinel/sentinel_2.conf new file mode 100644 index 0000000000..0a50c9a623 --- /dev/null +++ b/docker/redis5/sentinel/sentinel_2.conf @@ -0,0 +1,6 @@ +port 26383 + +sentinel monitor redis-py-test 127.0.0.1 6382 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 \ No newline at end of file diff --git a/docker/redis5/sentinel/sentinel_3.conf b/docker/redis5/sentinel/sentinel_3.conf new file mode 100644 index 0000000000..a0e350ba0f --- /dev/null +++ b/docker/redis5/sentinel/sentinel_3.conf @@ -0,0 +1,6 @@ +port 26384 + +sentinel monitor redis-py-test 127.0.0.1 6383 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 \ No newline at end of file diff --git a/docker/master/redis.conf b/docker/redis6.2/master/redis.conf similarity index 100% rename from docker/master/redis.conf rename to docker/redis6.2/master/redis.conf diff --git a/docker/replica/redis.conf b/docker/redis6.2/replica/redis.conf similarity index 100% rename from docker/replica/redis.conf rename to docker/redis6.2/replica/redis.conf diff --git a/docker/sentinel_1/sentinel.conf b/docker/redis6.2/sentinel/sentinel_1.conf similarity index 100% rename from docker/sentinel_1/sentinel.conf rename to docker/redis6.2/sentinel/sentinel_1.conf diff --git a/docker/sentinel_2/sentinel.conf b/docker/redis6.2/sentinel/sentinel_2.conf similarity index 100% rename from docker/sentinel_2/sentinel.conf rename to docker/redis6.2/sentinel/sentinel_2.conf diff --git a/docker/sentinel_3/sentinel.conf b/docker/redis6.2/sentinel/sentinel_3.conf similarity index 100% rename from docker/sentinel_3/sentinel.conf rename to docker/redis6.2/sentinel/sentinel_3.conf diff --git a/docker/stunnel/README b/docker/stunnel/README new file mode 100644 index 0000000000..e92ae78981 --- /dev/null +++ b/docker/stunnel/README @@ -0,0 +1 @@ + This directory contains a helper script to create ssl certificates for ssl tests. If the certificates are out of date, re-run create_certs and check them in. These are snake oil certificates. diff --git a/docker/stunnel/keys/ca-cert.pem b/docker/stunnel/keys/ca-cert.pem new file mode 100644 index 0000000000..460354d9ad --- /dev/null +++ b/docker/stunnel/keys/ca-cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDaDCCAlACCQCui7X/vxmwGjANBgkqhkiG9w0BAQsFADB1MQswCQYDVQQGEwJD +QTERMA8GA1UECAwIV2lubmlwZWcxETAPBgNVBAcMCE1hbml0b2JhMRIwEAYDVQQK +DAl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diff --git a/docker/stunnel/keys/ca-key.pem b/docker/stunnel/keys/ca-key.pem new file mode 100644 index 0000000000..64db528c48 --- /dev/null +++ b/docker/stunnel/keys/ca-key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEogIBAAKCAQEAtSqof5fXyN/Y6GSLBBNA/zhrqw2qcBW4va6+Wc24WTaBXcP0 +w13njz+j1b5V9rbpz0i7WUkg3bBPecFFuCFyQnvn2JaE9b7kX1lLmszanrYfWQ9b +YQyecox3HuYqeu330S+bD0liYh5rV7oEanuSCJW+a/dgEl3l/+Qb0zo2ZNEAXRuB +v6lNmvBSsdItlc5n/P06ntJ6Ia/7rO0ZEiBb6hLFKfiIo/XvDrGNlYulJEcDmC3P +kzzJRGnA7R2F7Vggj4l4pGE/3EtnA4C/rd0Shf9TIPQFA2HOx3oYsrOonuBYM2ur +ciNeojP5XGY/Zdau7hzgFBgF8tWsLU6bKyZ3NwIDAQABAoIBACq8mWsgAsNcKusH +bNPVRuvt/1gmrSIrvZzhb/33TZmeBf58j2zW5h0gwiFV+SluFNHVMnzph1tEkDsE +oNHC8hVE7XhmaY8fLPhhNDicQqZWCCcWPFQ0idwzzpX3beX55Q/vzwBYK2FCE8hq +FUiZReXIjVci0AMFK5Cl2vqFLPezAGvaZ4/M1reOF3vCgWl8IXTwYOs4EYd1CJt7 +bMwO9Q6P8V0BVhJO2tdwIe5XL5X086sMMPYXqMuwX9m3vZFQFpsZobmoAyYLVY+h +IMoQZdh4O4sFYPQBPzhZXluFDl8rX6G5A9jUPxDfeVz+799RXi31jTYeH01OwM89 +/0BNryECgYEA15hU0qDAnM7fBiTTGbRUT/QPOmEUOPcnWfLWOyJsovAVLL1X0jmt +GFm+FkTtOlcTVgDHXeHNw81zrgDDuW7fwaKloPeyWhyO6rp2jntAz/OayfA5UYOf +REhXdQH7rMAkGgy1t7zKGHTYAslHjD2dOikCuHH/13otSJS4wNvTaZUCgYEA1x6L +abxYDpR7jn2Yym0CbIiZ6tqShtqLi4eNF7PDVe3rUM7gYU767UFSKPvRpsq+BFwf +LLRFgpggNRDrZWoK0ZekHD1x8pCJF+O4pj/Fhra4uI+hInycRQ4xsj9VU/WftxQ4 +aOojB28F0fBO56T90caQVSR09DGNmElSQFcw4psCgYApf8n8DTNmO6/UV+xGi16b +UUhJHXyuBm0NtF+mXFb6+impRf0Mm0uFX2jmknfzfeVb7aRyns9jvD1jJgSGwh/R +/wPQuz0aeVrNNf0yKels3eBStKnj1eknVKF5BVuzgfyxAvdLmcxw7rTRvHrINOf5 +1QEQDemISZ1D1lTF0sqcDQKBgCmE6rGAuZouzF4nHZtMSOB7yQFMKGXAvpgylGfT +uUrXfch99U6yuLmcFuh0GfXQQbaDtTyimpvnEqhLWLOdMPNdCj6tGVYQ0XT77cKg +olYq5CIzDo2icWLep3bYxHZM/QOP8odFUXd41S287O3GqXqYkXjtbWlIOyT+WdKz +QWsrAoGALnac4Vh2s12Cv3YiQbkPtBRe8oxI0h6DEIdBciPDGq6WXq6O2PXXuBhM +X47mObUsSuzI6hI4/vd4/tXD7TM3fS1YDdZXj7d51ZjT/jmlTVxAHa3DJ8i7o+rH +Fqv/lh6MB6FGkXZ9vAGQe5RwUbDD16QO/1mz7fg0YBA9A8plM8s= +-----END RSA PRIVATE KEY----- diff --git a/docker/stunnel/keys/client-cert.pem b/docker/stunnel/keys/client-cert.pem new file mode 100644 index 0000000000..5c48eb8b3d --- /dev/null +++ b/docker/stunnel/keys/client-cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDYDCCAkgCAQEwDQYJKoZIhvcNAQEFBQAwdTELMAkGA1UEBhMCQ0ExETAPBgNV +BAgMCFdpbm5pcGVnMREwDwYDVQQHDAhNYW5pdG9iYTESMBAGA1UECgwJU29tZSBD +b3JwMRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRQwEgYDVQQDDAtleGFtcGxlLmNv +bTAgFw0yMjAxMTIxNDU0MjFaGA8zMDIxMDUxNTE0NTQyMVowdTELMAkGA1UEBhMC +Q0ExETAPBgNVBAgMCFdpbm5pcGVnMREwDwYDVQQHDAhNYW5pdG9iYTESMBAGA1UE +CgwJU29tZSBDb3JwMRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRQwEgYDVQQDDAtl +eGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwWezv2 +WHf6fCyiLYHmi3+Qf/33VmdNAapWzpOZ0Xmuzf8SSoEep/YotvnmIBe8DqspjzBW +eeg+n7qre+qawGv1AOANlStLKeNvnXhWS0bdoAKMP68Q8jvU+YSmJNZTRkg/39MA +YNqxYABYamoIQ7qX+g91HsCxPSzqIyjLwY4hPHGYfxGhRH5ne2RtsYEcMjOJWs8s +U4x6wpwn9Y4vnG1AqpcwY4xm65g/52BWWM9WfZ++y17MynSdoE29EqXCAGqhh1i1 +IRlKN1vr/792VYzOm2fHScaaCaCmhDIlTw0TlOgnfi7CFtY0z6uizSwG4RWCW+3/ +g47T3q8aCnvlkCkCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAGuNzbKtvKsdfQaAV +SmeNAZqyoG2Fbmh/txj6j+UThu3tadk07/SukgsM6yepeq05+wguW43eBtig/LzH +pSHCn4s/w0fvu1GqePWsTdGI3xnJakZIlkOXPStIgZJNewT9rD6WoRfthvTOda8v +NBjW0InACnVvzAivX9xhbUB4K/I8aEGaAZwzIGnQbsxygPVZKe/Y8oWhiks0qYo2 +Wev1Swli4EeqbYvg+3TMy7T1pDkjAmAdsv7yJAYKsM3xCu7K8vA/e+2J2hjUQIfI +Thdjb6FNywihVaAK2BUqL6cMgF8I+nX7ywVOBAz+a3F00sSogapztinzqsjFDeT9 +5V/MSg== +-----END CERTIFICATE----- diff --git a/docker/stunnel/keys/client-key.pem b/docker/stunnel/keys/client-key.pem new file mode 100644 index 0000000000..4117706d0e --- /dev/null +++ b/docker/stunnel/keys/client-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE K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VRwDulQsV3sDxprZKHYTaRcnC +EB4Y9T6uUt0CgYBjeCojP8IaiDPYnWUHPKgjMoaub1Za/ppekvTzcKMg98V3+Noc +okZZZ+iy4J81HfJOhuVWwHzsZ25gTQb3JhzSa0WNRb3OLikEwHM2/MqgoHvk76cx ++CqBvwfdVTJkT+mA9+k6K6KpqrLTqnzpahgHdWu/VaR3OzvOq5FG9qVbrQKBgF5F +xRUW5RmLBB1eaMstnjgZuEPdjxYZFNNCTo5yUo21hLr0NljgNjrpckUZjzlct8Gg +saWVyppFKUC8gPMeLK3TynxCFySmARLR7IVjN/DL3NvtLp3mq5reWZaoUzZAOyTd +Ieq9KaWaL8HxitzH4/xeoipVsxc6G9H3eckwKgehAoGBAM/E0qLpEXOaLxODY8tt ++qpoNWHZn1M6cVX+tA/6igKfqUY96lefLmEiV1N01qW7+keFMXT12X/edsykG8jd +gcNkNjSNwDSi8ixl0YlQwRJjX93TEip78sisQ3mCUqZUCNbm0Dm66Bqe8rAD5AdF +G4oVbUu1gN0StX85Uw8J0AYS +-----END PRIVATE KEY----- diff --git a/docker/stunnel/keys/client-req.pem b/docker/stunnel/keys/client-req.pem new file mode 100644 index 0000000000..ecf83f4daa --- /dev/null +++ b/docker/stunnel/keys/client-req.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICujCCAaICAQAwdTELMAkGA1UEBhMCQ0ExETAPBgNVBAgMCFdpbm5pcGVnMREw +DwYDVQQHDAhNYW5pdG9iYTESMBAGA1UECgwJU29tZSBDb3JwMRYwFAYDVQQLDA1J +VCBEZXBhcnRtZW50MRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBALwWezv2WHf6fCyiLYHmi3+Qf/33VmdNAapWzpOZ +0Xmuzf8SSoEep/YotvnmIBe8DqspjzBWeeg+n7qre+qawGv1AOANlStLKeNvnXhW +S0bdoAKMP68Q8jvU+YSmJNZTRkg/39MAYNqxYABYamoIQ7qX+g91HsCxPSzqIyjL +wY4hPHGYfxGhRH5ne2RtsYEcMjOJWs8sU4x6wpwn9Y4vnG1AqpcwY4xm65g/52BW +WM9WfZ++y17MynSdoE29EqXCAGqhh1i1IRlKN1vr/792VYzOm2fHScaaCaCmhDIl +Tw0TlOgnfi7CFtY0z6uizSwG4RWCW+3/g47T3q8aCnvlkCkCAwEAAaAAMA0GCSqG +SIb3DQEBCwUAA4IBAQAqLgfkWWIE1RV1TENnr9jT+SK8u3F2nX4mUzNmy8azq52I +fO8qPKmvV2amt5y961jNpR+rRpARncONuf6NQR5qCMu/EKjVi9BhOkoIOK0RjgtK +AkCTON1J8022JDQpN5/H5ZpLDkIlBtpwDvEaR/PnTaJxtGwLY8HxY6h20PDjP3J9 +Xu3w3m/s3uVjFG07RDvbwK02vYskePnlsKVw+uu5C2blOQRlRVvdCCkwN0y6IiWW +uRGRSzwufgejrfDUJG4VZuNpvWjFfzjHW105g1AxaTW3anRqBSNxYF+iawfbGdf4 +bGT4Wazbwq5uU3uixxOzxPMI5ZP/gn0ywz9S1RRK +-----END CERTIFICATE REQUEST----- diff --git a/docker/stunnel/keys/server-cert.pem b/docker/stunnel/keys/server-cert.pem new file mode 100644 index 0000000000..3a1bf72011 --- /dev/null +++ b/docker/stunnel/keys/server-cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDYDCCAkgCAQEwDQYJKoZIhvcNAQEFBQAwdTELMAkGA1UEBhMCQ0ExETAPBgNV +BAgMCFdpbm5pcGVnMREwDwYDVQQHDAhNYW5pdG9iYTESMBAGA1UECgwJU29tZSBD +b3JwMRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRQwEgYDVQQDDAtleGFtcGxlLmNv +bTAgFw0yMjAxMTIxNDU0MjFaGA8zMDIxMDUxNTE0NTQyMVowdTELMAkGA1UEBhMC +Q0ExETAPBgNVBAgMCFdpbm5pcGVnMREwDwYDVQQHDAhNYW5pdG9iYTESMBAGA1UE +CgwJU29tZSBDb3JwMRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRQwEgYDVQQDDAtl +eGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMxZETTb +dxqFsNjUIJbpS6ZT9RkH/dWYTVk1uRUMh6Cr6920g/7pSaRLIx8guTDHa1jhPIlX +lax7oZyX9coLjhSc6cy0ZmoH0zrp8ZbRc/qOawuO62arKP89pO/18MB3r9zPb1PJ +evTP203+2a8ly25cscMTUge+rHMFAUW+/01hc90CY9ial9oCl9wtoPdPGA8XlX3u +RswOAM79fM+Szvv+bX0VvFakkfHIE8oIK5/rJYDswBKAshw5CjW/OEjD6FbCb84c +1E7jJhwwd6X70yDMOrJ8iVkA/lpzfoosiuYm/okgbPPXWEo8aa//MrSH90l2+M9q +Vvn8hbmwlJl+2IMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAEcTps0CUnBZJBH/w +8oJo8kAvsHhFTLJpTtiztut5qI+FMgC6sPcVUKi95gie2pdJ91y6sFzqLpghAciR +ocYBy/jxK0M7OGJHLpUPeCS1yxeEyeZXpMPS90bUo1tPh7QDAojoRrFYo6M6DbL3 +dcErTJlvKnBBT9/DmENx75R+1nSB86vq0je+X0IqbZXeJyWju6ybjbwo1NPpnu+f +jnXTG0+ZIsepms0VTXwcTy3dthIE+uw4XqTQ1qYg2stQAOUJ0nmb68NExi5zom5G +0nh7tZnL0N+Z+XeNo7gaVatxfmgyk/HO2Vl4Wk4NA0PkR0yk2vNUwS0rKAb2mYc6 +T2gHdQ== +-----END CERTIFICATE----- diff --git a/docker/stunnel/keys/server-key.pem b/docker/stunnel/keys/server-key.pem new file mode 100644 index 0000000000..62595e017c --- /dev/null +++ b/docker/stunnel/keys/server-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDMWRE023cahbDY +1CCW6UumU/UZB/3VmE1ZNb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s/T5/AxY40 +Hhb0c7uGjg6s4jGBwmRpWPAAj56AG8qwfKQKwSFJK7SoF02UowPPO3ZGdtJtpF54 +cBx/gBaWqxtsY3GO++iUqOHFgXckeczKsdZjUaRF96XlYEXt1izrNzzK8QKBgQCP +OsCE6nkhknx3/B5g/2j4u+Y4DMmGsR3VpAwCZLRCfq/WkEHwI5cjHqiEY8dK1sYJ +egT6OLWetUSQ694qrBDYP6PNa0qRQs4Q+xmzSUm5TBxOWuIROcN2AYIvntVkb+lI +da/TYwdBKHEhR1Qf/qW73gIQJB/8CEXEzrU36OySDQKBgQD35khRdiU+1bPt/DpW ++8A+88BuxXMFxKYtEoMuTJnb7enarwp7+FtY6WhNgOgxELTpRbYw9496mOmNbJKL +PmTXzs3aS5bv/2JTtc5+CHzf9PJ+jAYWnh9hCq9x/mA0QRMQAZEi8vhhYFaWiiV3 +wUYnDFnnAKia1VILt9jZ7I4T7Q== +-----END PRIVATE KEY----- diff --git a/docker/stunnel/keys/server-req.pem b/docker/stunnel/keys/server-req.pem new file mode 100644 index 0000000000..361891d1c8 --- /dev/null +++ b/docker/stunnel/keys/server-req.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICujCCAaICAQAwdTELMAkGA1UEBhMCQ0ExETAPBgNVBAgMCFdpbm5pcGVnMREw +DwYDVQQHDAhNYW5pdG9iYTESMBAGA1UECgwJU29tZSBDb3JwMRYwFAYDVQQLDA1J +VCBEZXBhcnRtZW50MRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBAMxZETTbdxqFsNjUIJbpS6ZT9RkH/dWYTVk1uRUM +h6Cr6920g/7pSaRLIx8guTDHa1jhPIlXlax7oZyX9coLjhSc6cy0ZmoH0zrp8ZbR +c/qOawuO62arKP89pO/18MB3r9zPb1PJevTP203+2a8ly25cscMTUge+rHMFAUW+ +/01hc90CY9ial9oCl9wtoPdPGA8XlX3uRswOAM79fM+Szvv+bX0VvFakkfHIE8oI +K5/rJYDswBKAshw5CjW/OEjD6FbCb84c1E7jJhwwd6X70yDMOrJ8iVkA/lpzfoos +iuYm/okgbPPXWEo8aa//MrSH90l2+M9qVvn8hbmwlJl+2IMCAwEAAaAAMA0GCSqG +SIb3DQEBCwUAA4IBAQCljqLOTU3tFEqxJ2AbZ5HVg9AN/SEUX8c/SyzCBii3r9Dj +ubp0YWvYvgm7lnXsFAVDznf89RAzwdFur5iAQ95VfWBW6NEjdFQIh51KF6P/Qzjg +TbctVeX/MTPuKewVhkQg9/sRmegbb+RBKEeCZccLUVuk5DAgFmi0cFP4e50uuNRG +gwskG9nJp/X5aBd4Y1YKg8XS+WLPwwrYvffoHN8mWHh+YqF16MbxMHM5xRMWu6E7 +801EzEWAW5Y8J2ssp/9FSI+aXOhk68aNlIVNc2R6Rg1IA8zKV4WSWTMUWAud832h +z9UZH/YkPgipuiflpKBGs5lbElRx3o6lYblhRL8J +-----END CERTIFICATE REQUEST----- diff --git a/tasks.py b/tasks.py index 96005ca4e3..64b3aef80f 100644 --- a/tasks.py +++ b/tasks.py @@ -3,11 +3,6 @@ from invoke import run, task - -def _generate_keys(): - run("bash docker/stunnel/create_certs.sh") - - with open("tox.ini") as fp: lines = fp.read().split("\n") dockers = [line.split("=")[1].strip() for line in lines if line.find("name") != -1] @@ -19,7 +14,6 @@ def devenv(c): specified in the tox.ini file. """ clean(c) - _generate_keys() cmd = "tox -e devenv" for d in dockers: cmd += f" --docker-dont-stop={d}" @@ -29,14 +23,12 @@ def devenv(c): @task def build_docs(c): """Generates the sphinx documentation.""" - _generate_keys() run("tox -e docs") @task def linters(c): """Run code linters""" - _generate_keys() run("tox -e linters") @@ -45,7 +37,6 @@ def all_tests(c): """Run all linters, and tests in redis-py. This assumes you have all the python versions specified in the tox.ini file. """ - _generate_keys() linters(c) tests(c) @@ -56,7 +47,6 @@ def tests(c): with and without hiredis. """ print("Starting Redis tests") - _generate_keys() run("tox -e '{standalone,cluster}'-'{plain,hiredis}'") @@ -65,7 +55,6 @@ def standalone_tests(c): """Run all Redis tests against the current python, with and without hiredis.""" print("Starting Redis tests") - _generate_keys() run("tox -e standalone-'{plain,hiredis,ocsp}'") @@ -74,7 +63,6 @@ def cluster_tests(c): """Run all Redis Cluster tests against the current python, with and without hiredis.""" print("Starting RedisCluster tests") - _generate_keys() run("tox -e cluster-'{plain,hiredis}'") @@ -86,8 +74,6 @@ def clean(c): if os.path.isdir("dist"): shutil.rmtree("dist") run(f"docker rm -f {' '.join(dockers)}") - if os.path.isdir("docker/stunnel/keys"): - shutil.rmtree("docker/stunnel/keys") @task diff --git a/tox.ini b/tox.ini index 5fbf6cd8a1..2639cb7a2e 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ ports = 6379:6379/tcp healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6379)) else False" volumes = - bind:rw:{toxinidir}/docker/master/redis.conf:/redis.conf + bind:rw:{toxinidir}/docker/redis6.2/master/redis.conf:/redis.conf [docker:replica] name = replica @@ -30,7 +30,7 @@ ports = 6380:6380/tcp healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6380)) else False" volumes = - bind:rw:{toxinidir}/docker/replica/redis.conf:/redis.conf + bind:rw:{toxinidir}/docker/redis6.2/replica/redis.conf:/redis.conf [docker:unstable] name = unstable @@ -64,7 +64,7 @@ ports = 26379:26379/tcp healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26379)) else False" volumes = - bind:rw:{toxinidir}/docker/sentinel_1/sentinel.conf:/sentinel.conf + bind:rw:{toxinidir}/docker/redis6.2/sentinel/sentinel_1.conf:/sentinel.conf [docker:sentinel_2] name = sentinel_2 @@ -75,7 +75,7 @@ ports = 26380:26380/tcp healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26380)) else False" volumes = - bind:rw:{toxinidir}/docker/sentinel_2/sentinel.conf:/sentinel.conf + bind:rw:{toxinidir}/docker/redis6.2/sentinel/sentinel_2.conf:/sentinel.conf [docker:sentinel_3] name = sentinel_3 @@ -86,7 +86,7 @@ ports = 26381:26381/tcp healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26381)) else False" volumes = - bind:rw:{toxinidir}/docker/sentinel_3/sentinel.conf:/sentinel.conf + bind:rw:{toxinidir}/docker/redis6.2/sentinel/sentinel_3.conf:/sentinel.conf [docker:redismod] name = redismod @@ -121,6 +121,129 @@ volumes = bind:ro:{toxinidir}/docker/stunnel/conf:/etc/stunnel/conf.d bind:ro:{toxinidir}/docker/stunnel/keys:/etc/stunnel/keys +[docker:redis5_master] +name = redis5_master +image = redisfab/redis-py:5.0-buster +ports = + 6382:6382/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6382)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis5/master/redis.conf:/redis.conf + +[docker:redis5_replica] +name = redis5_replica +image = redisfab/redis-py:5.0-buster +links = + redis5_master:redis5_master +ports = + 6383:6383/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6383)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis5/replica/redis.conf:/redis.conf + +[docker:redis5_sentinel_1] +name = redis5_sentinel_1 +image = redisfab/redis-py-sentinel:5.0-buster +links = + redis5_master:redis5_master +ports = + 26382:26382/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26382)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis5/sentinel/sentinel_1.conf:/sentinel.conf + +[docker:redis5_sentinel_2] +name = redis5_sentinel_2 +image = redisfab/redis-py-sentinel:5.0-buster +links = + redis5_master:redis5_master +ports = + 26383:26383/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26383)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis5/sentinel/sentinel_2.conf:/sentinel.conf + +[docker:redis5_sentinel_3] +name = redis5_sentinel_3 +image = redisfab/redis-py-sentinel:5.0-buster +links = + redis5_master:redis5_master +ports = + 26384:26384/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26384)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis5/sentinel/sentinel_3.conf:/sentinel.conf + +[docker:redis5_cluster] +name = redis5_cluster +image = redisfab/redis-py-cluster:5.0-buster +ports = + 16385:16385/tcp + 16386:16386/tcp + 16387:16387/tcp + 16388:16388/tcp + 16389:16389/tcp + 16390:16390/tcp +healtcheck_cmd = python -c "import socket;print(True) if all([0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',port)) for port in range(16385,16390)]) else False" +volumes = + bind:rw:{toxinidir}/docker/cluster/redis.conf:/redis.conf + +[docker:redis4_master] +name = redis4_master +image = redisfab/redis-py:4.0-buster +ports = + 6381:6381/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6381)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis4/master/redis.conf:/redis.conf + +[docker:redis4_sentinel_1] +name = redis4_sentinel_1 +image = redisfab/redis-py-sentinel:4.0-buster +links = + redis4_master:redis4_master +ports = + 26385:26385/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26385)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis4/sentinel/sentinel_1.conf:/sentinel.conf + +[docker:redis4_sentinel_2] +name = redis4_sentinel_2 +image = redisfab/redis-py-sentinel:4.0-buster +links = + redis4_master:redis4_master +ports = + 26386:26386/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26386)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis4/sentinel/sentinel_2.conf:/sentinel.conf + +[docker:redis4_sentinel_3] +name = redis4_sentinel_3 +image = redisfab/redis-py-sentinel:4.0-buster +links = + redis4_master:redis4_master +ports = + 26387:26387/tcp +healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',26387)) else False" +volumes = + bind:rw:{toxinidir}/docker/redis4/sentinel/sentinel_3.conf:/sentinel.conf + +[docker:redis4_cluster] +name = redis4_cluster +image = redisfab/redis-py-cluster:4.0-buster +ports = + 16391:16391/tcp + 16392:16392/tcp + 16393:16393/tcp + 16394:16394/tcp + 16395:16395/tcp + 16396:16396/tcp +healtcheck_cmd = python -c "import socket;print(True) if all([0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',port)) for port in range(16391,16396)]) else False" +volumes = + bind:rw:{toxinidir}/docker/cluster/redis.conf:/redis.conf + [isort] profile = black multi_line_output = 3 @@ -145,18 +268,55 @@ extras = ocsp: cryptography, pyopenssl, requests setenv = CLUSTER_URL = "redis://localhost:16379/0" -run_before = {toxinidir}/docker/stunnel/create_certs.sh commands = standalone: pytest --cov=./ --cov-report=xml:coverage_redis.xml -W always -m 'not onlycluster' {posargs} cluster: pytest --cov=./ --cov-report=xml:coverage_cluster.xml -W always -m 'not onlynoncluster and not redismod' --redis-url={env:CLUSTER_URL:} {posargs} +[testenv:redis5] +deps = + -r {toxinidir}/requirements.txt + -r {toxinidir}/dev_requirements.txt +docker = + redis5_master + redis5_replica + redis5_sentinel_1 + redis5_sentinel_2 + redis5_sentinel_3 + redis5_cluster +extras = + hiredis: hiredis + cryptography: cryptography, requests +setenv = + CLUSTER_URL = "redis://localhost:16385/0" +commands = + standalone: pytest --cov=./ --cov-report=xml:coverage_redis.xml -W always -m 'not onlycluster and not redismod' {posargs} + cluster: pytest --cov=./ --cov-report=xml:coverage_cluster.xml -W always -m 'not onlynoncluster and not redismod' --redis-url={env:CLUSTER_URL:} {posargs} + +[testenv:redis4] +deps = + -r {toxinidir}/requirements.txt + -r {toxinidir}/dev_requirements.txt +docker = + redis4_master + redis4_sentinel_1 + redis4_sentinel_2 + redis4_sentinel_3 + redis4_cluster +extras = + hiredis: hiredis + cryptography: cryptography, requests +setenv = + CLUSTER_URL = "redis://localhost:16391/0" +commands = + standalone: pytest --cov=./ --cov-report=xml:coverage_redis.xml -W always -m 'not onlycluster and not redismod' {posargs} + cluster: pytest --cov=./ --cov-report=xml:coverage_cluster.xml -W always -m 'not onlynoncluster and not redismod' --redis-url={env:CLUSTER_URL:} {posargs} + [testenv:devenv] skipsdist = true skip_install = true deps = -r {toxinidir}/dev_requirements.txt docker = {[testenv]docker} commands = /usr/bin/echo docker_up -run_before = {[testenv]run_before} [testenv:linters] deps_files = dev_requirements.txt