From 5608c54bd24c84d2cc00425a6246322d8956b6cb Mon Sep 17 00:00:00 2001
From: Lauri Himanen <lauri.himanen@gmail.com>
Date: Thu, 30 Apr 2020 12:29:50 +0300
Subject: [PATCH] Got rid of redis dependencies in charts.

---
 nomad/config.py                                      |  9 ---------
 .../infrastructure/docker-compose.override.yml       |  6 ------
 ops/docker-compose/infrastructure/docker-compose.yml |  7 -------
 ops/helm/nomad/requirements.yaml                     |  3 ---
 ops/helm/nomad/templates/nomad-configmap.yml         |  2 --
 ops/helm/nomad/values.yaml                           | 12 ------------
 6 files changed, 39 deletions(-)

diff --git a/nomad/config.py b/nomad/config.py
index fe2216434a..0477ec2326 100644
--- a/nomad/config.py
+++ b/nomad/config.py
@@ -87,20 +87,11 @@ rabbitmq = NomadConfig(
     password='rabbitmq'
 )
 
-redis = NomadConfig(
-    host='localhost',
-    port=6379,
-)
-
 
 def rabbitmq_url():
     return 'pyamqp://%s:%s@%s//' % (rabbitmq.user, rabbitmq.password, rabbitmq.host)
 
 
-def redis_url():
-    return 'redis://%s:%d/0' % (redis.host, redis.port)
-
-
 celery = NomadConfig(
     max_memory=64e6,  # 64 GB
     timeout=1800,  # 1/2 h
diff --git a/ops/docker-compose/infrastructure/docker-compose.override.yml b/ops/docker-compose/infrastructure/docker-compose.override.yml
index 5d27a7a6be..cb6b7a753f 100644
--- a/ops/docker-compose/infrastructure/docker-compose.override.yml
+++ b/ops/docker-compose/infrastructure/docker-compose.override.yml
@@ -26,12 +26,6 @@ services:
         ports:
             - 5672:5672
 
-    # backend for celery
-    redis:
-        restart: 'no'
-        ports:
-            - 6379:6379
-
     # the search engine
     elastic:
         restart: 'no'
diff --git a/ops/docker-compose/infrastructure/docker-compose.yml b/ops/docker-compose/infrastructure/docker-compose.yml
index 38db2aad94..5912a3a259 100644
--- a/ops/docker-compose/infrastructure/docker-compose.yml
+++ b/ops/docker-compose/infrastructure/docker-compose.yml
@@ -46,13 +46,6 @@ services:
         volumes:
             - nomad_rabbitmq:/var/lib/rabbitmq
 
-    # result backend for celery
-    redis:
-        restart: unless-stopped
-        image: redis:5.0.8-alpine
-        container_name: nomad_redis
-        command: [sh, -c, "rm -f /data/dump.rdb && redis-server --save ''"]  # Disables db persistence to disk
-
     # the search engine
     elastic:
         restart: always
diff --git a/ops/helm/nomad/requirements.yaml b/ops/helm/nomad/requirements.yaml
index 72b108bcfb..5a1951dda5 100644
--- a/ops/helm/nomad/requirements.yaml
+++ b/ops/helm/nomad/requirements.yaml
@@ -2,6 +2,3 @@ dependencies:
 - name: rabbitmq
   version: "6.21.0"
   repository: "https://charts.bitnami.com/bitnami"
-- name: redis
-  version: "10.6.9"
-  repository: "https://charts.bitnami.com/bitnami"
diff --git a/ops/helm/nomad/templates/nomad-configmap.yml b/ops/helm/nomad/templates/nomad-configmap.yml
index f05fdfd9ac..480349fe12 100644
--- a/ops/helm/nomad/templates/nomad-configmap.yml
+++ b/ops/helm/nomad/templates/nomad-configmap.yml
@@ -29,8 +29,6 @@ data:
       admin_user_id: {{ .Values.keycloak.admin_user_id }}
     rabbitmq:
       host: "{{ .Release.Name }}-rabbitmq"
-    redis:
-      host: "{{ .Release.Name }}-redis-master"
     elastic:
       host: "{{ .Values.elastic.host }}"
       port: {{ .Values.elastic.port }}
diff --git a/ops/helm/nomad/values.yaml b/ops/helm/nomad/values.yaml
index 981ef039c4..47ff4191fa 100644
--- a/ops/helm/nomad/values.yaml
+++ b/ops/helm/nomad/values.yaml
@@ -100,18 +100,6 @@ rabbitmq:
     password: rabbitmq
     erlangCookie: SWQOKODSQALRPCLNMEQG
 
-## configuration of the chart dependency for redis
-redis:
-  cluster:
-    enabled: false
-  usePassword: false
-  master:
-    nodeSelector:
-      nomadtype: public
-    persistence:
-      enabled: false
-
-
 ## A common name/prefix for all dbs and indices.
 dbname: fairdi_nomad_latest
 
-- 
GitLab