From 9665ecfcb3c092f0b1baebc5a35cf8ce71d4a0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Falconnier?= Date: Thu, 8 Feb 2024 10:15:33 +0100 Subject: [PATCH] Remove pylibmc dependency --- Dockerfile | 10 ++-------- conf/puppet/zentral/base.json | 12 +++++++++++- conf/syslog/zentral/base.json | 12 +++++++++++- constraints.txt | 1 - requirements_aws.txt | 3 --- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ef2c81552..2977a6b65a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,6 @@ RUN apt-get update && \ python3-dev \ # dep for psycopg2 libpq-dev \ -# dep for pylibmc - libmemcached-dev \ # dep for python-ldap libldap2-dev \ libsasl2-dev \ @@ -171,9 +169,7 @@ RUN apt-get update && \ apt-get autoremove -y && \ apt-get install -y --no-install-recommends \ # pycurl for kombu[sqs] - libcurl4-openssl-dev \ - # for pylibmc - libmemcached11 && \ + libcurl4-openssl-dev && \ # clean cache rm -rf /var/lib/apt/lists/* @@ -185,9 +181,7 @@ RUN apt-get update && \ apt-get autoremove -y && \ apt-get install -y --no-install-recommends \ # pycurl for kombu[sqs] - libcurl4-openssl-dev \ - # for pylibmc - libmemcached11 && \ + libcurl4-openssl-dev && \ # clean cache rm -rf /var/lib/apt/lists/* diff --git a/conf/puppet/zentral/base.json b/conf/puppet/zentral/base.json index 2225ce1c40..cfabf85ce6 100644 --- a/conf/puppet/zentral/base.json +++ b/conf/puppet/zentral/base.json @@ -27,7 +27,17 @@ "*" ], "POSTGRES_HOST": "{{ env:POSTGRES_HOST }}", - "POSTGRES_PASSWORD": "{{ env:POSTGRES_PASSWORD }}" + "POSTGRES_PASSWORD": "{{ env:POSTGRES_PASSWORD }}", + "CACHES": { + "default": { + "BACKEND": "django_redis.cache.RedisCache", + "LOCATION": "redis://redis:6379/1", + "OPTIONS": { + "CLIENT_CLASS": "django_redis.client.DefaultClient", + "IGNORE_EXCEPTIONS": true + } + } + } }, "queues": { "backend": "zentral.core.queues.backends.kombu", diff --git a/conf/syslog/zentral/base.json b/conf/syslog/zentral/base.json index b76c7b4b84..7f8548d47f 100644 --- a/conf/syslog/zentral/base.json +++ b/conf/syslog/zentral/base.json @@ -25,7 +25,17 @@ "*" ], "POSTGRES_HOST": "{{ env:POSTGRES_HOST }}", - "POSTGRES_PASSWORD": "{{ env:POSTGRES_PASSWORD }}" + "POSTGRES_PASSWORD": "{{ env:POSTGRES_PASSWORD }}", + "CACHES": { + "default": { + "BACKEND": "django_redis.cache.RedisCache", + "LOCATION": "redis://redis:6379/1", + "OPTIONS": { + "CLIENT_CLASS": "django_redis.client.DefaultClient", + "IGNORE_EXCEPTIONS": true + } + } + } }, "queues": { "backend": "zentral.core.queues.backends.kombu", diff --git a/constraints.txt b/constraints.txt index d0a665b6a8..81a2a5b335 100644 --- a/constraints.txt +++ b/constraints.txt @@ -108,7 +108,6 @@ pycparser==2.21 pycryptodomex==3.15.0 pycurl==7.44.1 pydantic==1.9.1 -pylibmc==1.6.1 pyotp==2.6.0 pyparsing==3.0.9 pysaml2==7.1.2 diff --git a/requirements_aws.txt b/requirements_aws.txt index c9e8780de6..484783de8a 100644 --- a/requirements_aws.txt +++ b/requirements_aws.txt @@ -11,6 +11,3 @@ kombu[sqs]<6 # <6 for compatibility with celery<6 # to make sure that the celery workers will start # TODO: understand why!!! pycurl - -# Elasticache memcached -pylibmc