Skip to content

Commit

Permalink
rm unused redis (#2905)
Browse files Browse the repository at this point in the history
* mv api gateway

* run rabbit and redis on all profiles

* run rabbit and redis on all profiles

* rm unused redis

* rm redis ref
  • Loading branch information
msnwatson authored Apr 30, 2024
1 parent b420c6d commit 6870a97
Show file tree
Hide file tree
Showing 32 changed files with 15 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .github/runner/set-k8s-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ setK8Secret(){
}

# Corresponds to subfolder of the paths to Vault secrets
SERVICE_NAMES="db mq redis"
SERVICE_NAMES="db mq"
# For each SERVICE_NAMES, set a vro-$VAULT_SECRET_SUFFIX K8s secret, where
# each key-value pair has a single value (a normal secret).
# These secrets are used for third-party containers that expect environment variables to be set.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/container-healthchecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ jobs:
echo '```'
} | tee -a "$GITHUB_STEP_SUMMARY"
# Ignore mocks and redis-service since they don't have health checks
# Ignore mocks since they don't have health checks
# TODO: add health check for svc-bgs-api; ignore it for now
if docker container ls --format '{{.Names}} \t {{.Status}}' | grep -v "(healthy)" \
| grep -v "-mock-\|redis-service\|svc-bgs-api"; then
| grep -v "-mock-\|svc-bgs-api"; then
echo 'There are unexpected unhealthy containers!'
exit 2
fi
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/secrel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ on:
- dev-tools
- db-init
- app
- redis
- rabbitmq
image_tag:
description: "Image tag to run SecRel on. If 'all' is selected, then 'latest' will always be used. This does not define the image tag during publishing"
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/update-deployment-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ on:
required: true
default: 'latest'
type: string
redis:
description: 'Redis image tag'
required: true
default: 'latest'
type: string

# Allow other workflows to call this one
workflow_call:
Expand All @@ -57,10 +52,6 @@ on:
required: false
type: string
default: "latest"
redis:
required: false
type: string
default: "latest"

jobs:
update-deployment-platform:
Expand All @@ -73,4 +64,3 @@ jobs:
shutdown: ${{ inputs.shutdown }}
deploy_prep_script: |
export RABBITMQ_VER=${{ inputs.rabbitmq }}
export REDIS_VER=${{ inputs.redis }}
4 changes: 2 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM eclipse-temurin:17-jre-alpine

# hadolint ignore=DL3018
RUN apk add --no-cache curl redis sudo gcompat libxml2 && \
apk upgrade --available
RUN apk add --no-cache curl sudo gcompat libxml2 && \
apk upgrade --available

WORKDIR /app
COPY set-env-secrets.src entrypoint-wrapper.sh docker-entry*.sh ./
Expand Down
6 changes: 1 addition & 5 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ x-postgres-vars: &postgres-vars
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_SCHEMA: claims

x-redis-placeholder-vars: &redis-placeholder-vars
REDIS_PLACEHOLDERS_HOST: redis-service
REDIS_PASSWORD: ${REDIS_PASSWORD}

x-rabbitmq-placeholder-vars: &rabbitmq-placeholder-vars
RABBITMQ_PLACEHOLDERS_HOST: rabbitmq-service
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME}
Expand Down Expand Up @@ -64,7 +60,7 @@ services:
environment:
# ENV=local causes application-local.yml (and application-nonprod.yml) to be used, in addition to the default application.yml
# PERSIST_TRACKING_FOLDER is necessary for local testing when ENV=dev or qa
<<: [*api-vars, *postgres-vars, *redis-placeholder-vars, *rabbitmq-placeholder-vars, *common-vars]
<<: [*api-vars, *postgres-vars, *rabbitmq-placeholder-vars, *common-vars]
PERSIST_TRACKING_FOLDER: /persist/tracking
volumes:
# path needs to be consistent with PERSIST_TRACKING_FOLDER value above
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,6 @@ vro:
servers:
- url: ${STARTER_OPENAPI_SERVERURL:/}

spring.redis:
# database index used by the connection factory
database: 0
host: ${REDIS_PLACEHOLDERS_HOST}
port: 6379
password: ${REDIS_PASSWORD}

claim:
special_issue_1: "RDR1"
special_issue_2: "RRD"
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM bitnami/minideb:bookworm

# hadolint ignore=DL3018,DL3009
RUN apt-get update && \
install_packages curl redis sudo && \
install_packages curl sudo && \
install_packages postgresql-client

RUN adduser --disabled-password tron
Expand Down
18 changes: 0 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ volumes:
# Create the following volumes so that they have recognizable names rather than UUIDs
var_pgdata:
var_rabbitmq:
var_redis:

# Reusable blocks
# https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd
Expand All @@ -37,10 +36,6 @@ x-postgres-vars: &postgres-vars
POSTGRES_PORT: 5432
POSTGRES_SCHEMA: claims

x-redis-placeholder-vars: &redis-placeholder-vars
REDIS_PLACEHOLDERS_HOST: redis-service
REDIS_PASSWORD: ${REDIS_PASSWORD}

x-rabbitmq-placeholder-vars: &rabbitmq-placeholder-vars
RABBITMQ_PLACEHOLDERS_HOST: rabbitmq-service
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME}
Expand All @@ -54,8 +49,6 @@ x-svc-depends-on: &svc-depends-on
condition: service_healthy
postgres-service:
condition: service_healthy
redis-service:
condition: service_started

x-common-security-opt: &common-security-opt
security_opt:
Expand Down Expand Up @@ -94,17 +87,6 @@ services:
RABBITMQ_DISK_FREE_ABSOLUTE_LIMIT: "10GB"
RABBITMQ_MANAGEMENT_ALLOW_WEB_ACCESS: "true"

redis-service:
image: va/abd_vro-redis
<<: *image-platform
volumes:
- var_redis:/data
networks:
- intranet
ports:
- "6379:6379"
command: redis-server --requirepass ${REDIS_PASSWORD}

postgres-service:
image: va/abd_vro-postgres
healthcheck:
Expand Down
6 changes: 1 addition & 5 deletions domain-xample/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ x-postgres-vars: &postgres-vars
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_SCHEMA: claims

x-redis-placeholder-vars: &redis-placeholder-vars
REDIS_PLACEHOLDERS_HOST: redis-service
REDIS_PASSWORD: ${REDIS_PASSWORD}

x-rabbitmq-placeholder-vars: &rabbitmq-placeholder-vars
RABBITMQ_PLACEHOLDERS_HOST: rabbitmq-service
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME}
Expand All @@ -50,7 +46,7 @@ services:
image: va/abd_vro-xample-workflows:latest
<<: [*common-sde-security, *common-security-opt]
environment:
<<: [*postgres-vars, *rabbitmq-placeholder-vars, *redis-placeholder-vars]
<<: [*postgres-vars, *rabbitmq-placeholder-vars]
networks:
- vro_intranet
# Expose healthcheck port for end2end test
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugins/src/main/resources/docker/Dockerfile-java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM eclipse-temurin:17-jre-alpine

# curl is needed for HEALTHCHECK
# hadolint ignore=DL3018
RUN apk add --no-cache curl redis sudo gcompat libxml2 && \
RUN apk add --no-cache curl sudo gcompat libxml2 && \
apk upgrade --available

WORKDIR /app
Expand Down
13 changes: 0 additions & 13 deletions helm/_shared/named_templates/_redis.tpl

This file was deleted.

4 changes: 1 addition & 3 deletions helm/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ helmArgsForSubchart(){
}
platformChartArgs(){
HELM_ARGS="$HELM_ARGS \
$(helmArgsForSubchart rabbitmq "$RABBITMQ_VER") \
$(helmArgsForSubchart redis "$REDIS_VER") \
"
$(helmArgsForSubchart rabbitmq "$RABBITMQ_VER")"
echo "Platform HELM_ARGS: $HELM_ARGS"
}

Expand Down
13 changes: 0 additions & 13 deletions helm/dev-tools/templates/named_templates/_redis.tpl

This file was deleted.

1 change: 0 additions & 1 deletion helm/domain-cc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ spec:
{{- include "vro.commonEnvVars" . | nindent 12 }}
{{- include "vro.dbClient.envVars" . | nindent 12 }}
{{- include "vro.mqClient.envVars" . | nindent 12 }}
{{- include "vro.redisClient.envVars" . | nindent 12 }}
{{- include "domainCc.alembic.envVars" . | nindent 12 }}
resources:
requests:
Expand Down
1 change: 0 additions & 1 deletion helm/domain-ee-max-cfi-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ spec:
env:
{{- include "vro.commonEnvVars" . | nindent 12 }}
{{- include "vro.mqClient.envVars" . | nindent 12 }}
{{- include "vro.redisClient.envVars" . | nindent 12 }}
resources:
requests:
cpu: 150m
Expand Down
1 change: 0 additions & 1 deletion helm/domain-xample/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ spec:
{{- include "vro.commonEnvVars" . | nindent 12 }}
{{- include "vro.dbClient.envVars" . | nindent 12 }}
{{- include "vro.mqClient.envVars" . | nindent 12 }}
{{- include "vro.redisClient.envVars" . | nindent 12 }}
resources:
requests:
cpu: 150m
Expand Down
2 changes: 0 additions & 2 deletions helm/platform/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ dependencies:
# name must match the subchart's Chart.yaml's name
- name: rabbitmq-chart
condition: rabbitmq.enabled
- name: redis-chart
condition: redis.enabled
14 changes: 0 additions & 14 deletions helm/platform/charts/redis/Chart.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions helm/platform/charts/redis/templates/deployment.yaml

This file was deleted.

1 change: 0 additions & 1 deletion helm/platform/charts/redis/templates/destination-rule.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions helm/platform/charts/redis/templates/service.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions helm/platform/charts/redis/values.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions helm/platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

rabbitmq:
enabled: true
redis:
enabled: true

global:
# Persistent Volumes
Expand Down
1 change: 0 additions & 1 deletion helm/vro-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ spec:
{{- include "vro.commonEnvVars" . | nindent 12 }}
{{- include "vro.dbClient.envVars" . | nindent 12 }}
{{- include "vro.mqClient.envVars" . | nindent 12 }}
{{- include "vro.redisClient.envVars" . | nindent 12 }}

- name: JAVA_OPTS
value: -Xmx512m
Expand Down
2 changes: 1 addition & 1 deletion postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM postgres:14.11-alpine3.19

# hadolint ignore=DL3018
RUN apk update && \
apk --no-cache add curl redis sudo && \
apk --no-cache add curl sudo && \
apk upgrade openssl libssl3 libcrypto3 libxml2 && \
rm -rf /var/cache/apk/*

Expand Down
1 change: 0 additions & 1 deletion redis/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions redis/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion scripts/image-names.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ prodImageName() {
# These names should match directory names.
# Also add image to .github/workflows/delete-published-*images.yml
IMAGES=( postgres \
redis \
rabbitmq \
app db-init \
dev-tools \
Expand Down
Loading

0 comments on commit 6870a97

Please sign in to comment.