diff --git a/.github/runner/set-k8s-secrets.sh b/.github/runner/set-k8s-secrets.sh index 1bd91876eb..0fadbdb051 100755 --- a/.github/runner/set-k8s-secrets.sh +++ b/.github/runner/set-k8s-secrets.sh @@ -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. diff --git a/.github/workflows/container-healthchecks.yml b/.github/workflows/container-healthchecks.yml index 192320039d..de5e01aaa2 100644 --- a/.github/workflows/container-healthchecks.yml +++ b/.github/workflows/container-healthchecks.yml @@ -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 diff --git a/.github/workflows/secrel.yml b/.github/workflows/secrel.yml index bb0f974f86..7665e1d871 100644 --- a/.github/workflows/secrel.yml +++ b/.github/workflows/secrel.yml @@ -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" diff --git a/.github/workflows/update-deployment-platform.yml b/.github/workflows/update-deployment-platform.yml index 4546a7eaf3..c8b756fd60 100644 --- a/.github/workflows/update-deployment-platform.yml +++ b/.github/workflows/update-deployment-platform.yml @@ -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: @@ -57,10 +52,6 @@ on: required: false type: string default: "latest" - redis: - required: false - type: string - default: "latest" jobs: update-deployment-platform: @@ -73,4 +64,3 @@ jobs: shutdown: ${{ inputs.shutdown }} deploy_prep_script: | export RABBITMQ_VER=${{ inputs.rabbitmq }} - export REDIS_VER=${{ inputs.redis }} diff --git a/app/Dockerfile b/app/Dockerfile index c1cf8d251a..207bcfb622 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -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 ./ diff --git a/app/docker-compose.yml b/app/docker-compose.yml index bdcb402247..d176af542b 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -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} @@ -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 diff --git a/app/src/main/resources/application.yml b/app/src/main/resources/application.yml index b9947d6d57..af1e17c8f6 100644 --- a/app/src/main/resources/application.yml +++ b/app/src/main/resources/application.yml @@ -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" diff --git a/dev-tools/Dockerfile b/dev-tools/Dockerfile index be379c987f..dac990d7b3 100644 --- a/dev-tools/Dockerfile +++ b/dev-tools/Dockerfile @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 1547045276..190868ff74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 @@ -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} @@ -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: @@ -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: diff --git a/domain-xample/docker-compose.yml b/domain-xample/docker-compose.yml index 4c7821e687..3b5452c4df 100644 --- a/domain-xample/docker-compose.yml +++ b/domain-xample/docker-compose.yml @@ -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} @@ -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 diff --git a/gradle-plugins/src/main/resources/docker/Dockerfile-java b/gradle-plugins/src/main/resources/docker/Dockerfile-java index 1b32ca01f1..770ac4a6db 100644 --- a/gradle-plugins/src/main/resources/docker/Dockerfile-java +++ b/gradle-plugins/src/main/resources/docker/Dockerfile-java @@ -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 diff --git a/helm/_shared/named_templates/_redis.tpl b/helm/_shared/named_templates/_redis.tpl deleted file mode 100644 index 5c9e309d61..0000000000 --- a/helm/_shared/named_templates/_redis.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* - For clients to connect to Redis -*/}} - -{{- define "vro.redisClient.envVars" -}} -- name: REDIS_PLACEHOLDERS_HOST - value: {{ .Values.global.hostnamePrefix }}-redis -- name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: vro-redis - key: REDIS_CLIENTUSER_PASS -{{- end }} diff --git a/helm/deploy.sh b/helm/deploy.sh index f16c93c621..dbb9c639f7 100755 --- a/helm/deploy.sh +++ b/helm/deploy.sh @@ -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" } diff --git a/helm/dev-tools/templates/named_templates/_redis.tpl b/helm/dev-tools/templates/named_templates/_redis.tpl deleted file mode 100644 index 5c9e309d61..0000000000 --- a/helm/dev-tools/templates/named_templates/_redis.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* - For clients to connect to Redis -*/}} - -{{- define "vro.redisClient.envVars" -}} -- name: REDIS_PLACEHOLDERS_HOST - value: {{ .Values.global.hostnamePrefix }}-redis -- name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: vro-redis - key: REDIS_CLIENTUSER_PASS -{{- end }} diff --git a/helm/domain-cc/templates/deployment.yaml b/helm/domain-cc/templates/deployment.yaml index de826ff8ed..46f8cdd4b8 100644 --- a/helm/domain-cc/templates/deployment.yaml +++ b/helm/domain-cc/templates/deployment.yaml @@ -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: diff --git a/helm/domain-ee-max-cfi-app/templates/deployment.yaml b/helm/domain-ee-max-cfi-app/templates/deployment.yaml index 51b73a4fc1..11bcf474c5 100644 --- a/helm/domain-ee-max-cfi-app/templates/deployment.yaml +++ b/helm/domain-ee-max-cfi-app/templates/deployment.yaml @@ -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 diff --git a/helm/domain-xample/templates/deployment.yaml b/helm/domain-xample/templates/deployment.yaml index fd607924fa..e5a137c3ce 100644 --- a/helm/domain-xample/templates/deployment.yaml +++ b/helm/domain-xample/templates/deployment.yaml @@ -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 diff --git a/helm/platform/Chart.yaml b/helm/platform/Chart.yaml index 10703893f3..95c7c26b32 100644 --- a/helm/platform/Chart.yaml +++ b/helm/platform/Chart.yaml @@ -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 diff --git a/helm/platform/charts/redis/Chart.yaml b/helm/platform/charts/redis/Chart.yaml deleted file mode 100644 index 388ae7b5ff..0000000000 --- a/helm/platform/charts/redis/Chart.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# https://helm.sh/docs/topics/charts/ - -apiVersion: v2 -type: application - -# numbers, lowercase, and dashes only -# https://helm.sh/docs/chart_best_practices/conventions/#chart-names -name: redis-chart -description: Redis cache service used by VRO and its microservices - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# TODO discuss: How can we enforce or automate incrementing this? -version: 0.2.0 diff --git a/helm/platform/charts/redis/templates/deployment.yaml b/helm/platform/charts/redis/templates/deployment.yaml deleted file mode 100644 index 2c4d2890e7..0000000000 --- a/helm/platform/charts/redis/templates/deployment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: vro-redis - labels: {{- toYaml .Values.labels | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: {{- toYaml .Values.labels | nindent 6 }} - template: - metadata: - labels: {{- toYaml .Values.labels | nindent 8 }} - sidecar.istio.io/inject: "false" - annotations: - {{- include "vro.annotations.pod" . | nindent 8 }} - spec: - {{- include "vro.imagePullSecrets" . | nindent 6 }} - containers: - - name: redis{{ include "vro.containerSuffix" . }} - image: ghcr.io/department-of-veterans-affairs/abd-vro-internal/vro-redis:{{ .Values.imageTag }} - env: - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: vro-redis - key: REDIS_CLIENTUSER_PASS - ports: - - containerPort: {{ .Values.service.redis.sourcePort }} - protocol: TCP - command: ["redis-server"] - args: ["--requirepass", "$(REDIS_PASSWORD)"] - resources: - requests: - cpu: 150m - memory: 512Mi - limits: - cpu: 1000m - memory: 1024Mi diff --git a/helm/platform/charts/redis/templates/destination-rule.yaml b/helm/platform/charts/redis/templates/destination-rule.yaml deleted file mode 100644 index 36fddebfd8..0000000000 --- a/helm/platform/charts/redis/templates/destination-rule.yaml +++ /dev/null @@ -1 +0,0 @@ -{{- include "vro.destinationrule" .}} diff --git a/helm/platform/charts/redis/templates/service.yaml b/helm/platform/charts/redis/templates/service.yaml deleted file mode 100644 index 9617966075..0000000000 --- a/helm/platform/charts/redis/templates/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - # name is used as the hostname of the service - name: {{ .Values.global.hostnamePrefix }}-{{ .Values.serviceNameSuffix }} - labels: {{- toYaml .Values.labels | nindent 4 }} -spec: - type: ClusterIP - ports: - - port: {{ .Values.service.redis.sourcePort }} - targetPort: {{ .Values.service.redis.targetPort }} - protocol: TCP - name: http - selector: {{- toYaml .Values.labels | nindent 4 }} diff --git a/helm/platform/charts/redis/values.yaml b/helm/platform/charts/redis/values.yaml deleted file mode 100644 index 70d5d3670a..0000000000 --- a/helm/platform/charts/redis/values.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Best practices: https://helm.sh/docs/chart_best_practices/values/ - -labels: - app: redis - -imageTag: "latest" - -serviceNameSuffix: redis - -replicaCount: 1 - -service: - redis: - sourcePort: 6379 - targetPort: 6379 diff --git a/helm/platform/values.yaml b/helm/platform/values.yaml index d733c8a4d0..eb7f460818 100644 --- a/helm/platform/values.yaml +++ b/helm/platform/values.yaml @@ -2,8 +2,6 @@ rabbitmq: enabled: true -redis: - enabled: true global: # Persistent Volumes diff --git a/helm/vro-app/templates/deployment.yaml b/helm/vro-app/templates/deployment.yaml index 10b2ce1890..4e4236040d 100644 --- a/helm/vro-app/templates/deployment.yaml +++ b/helm/vro-app/templates/deployment.yaml @@ -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 diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 536d40e4df..f9f024443c 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -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/* diff --git a/redis/Dockerfile b/redis/Dockerfile deleted file mode 100644 index 8832bbfca5..0000000000 --- a/redis/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM bitnami/redis:7.2 diff --git a/redis/build.gradle b/redis/build.gradle deleted file mode 100644 index b8d6fa883d..0000000000 --- a/redis/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'shared.docker.container-conventions' -} - -group = 'gov.va.vro' -version = '3.5.4-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - testImplementation platform('org.junit:junit-bom:5.10.2') - testImplementation 'org.junit.jupiter:junit-jupiter' -} - -test { - useJUnitPlatform() -} diff --git a/scripts/image-names.sh b/scripts/image-names.sh index 16604ea326..6cf28eeb7f 100755 --- a/scripts/image-names.sh +++ b/scripts/image-names.sh @@ -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 \ diff --git a/scripts/image_vars.src b/scripts/image_vars.src index 881de26580..655de93092 100755 --- a/scripts/image_vars.src +++ b/scripts/image_vars.src @@ -5,14 +5,14 @@ # Array of VRO images # shellcheck disable=SC2034 -VRO_IMAGES_ARR=( postgres redis rabbitmq app db-init dev-tools svc-bgs-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app ) +VRO_IMAGES_ARR=( postgres rabbitmq app db-init dev-tools svc-bgs-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app ) # Usage: for IMG in ${VRO_IMAGES_ARR[@]}; do echo "- $IMG"; done -export VRO_IMAGES="postgres redis rabbitmq app db-init dev-tools svc-bgs-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app" +export VRO_IMAGES="postgres rabbitmq app db-init dev-tools svc-bgs-api svc-bie-kafka svc-bip-api xample-workflows cc-app ee-max-cfi-app ee-ep-merge-app" # Array of variable prefixes # shellcheck disable=SC2034 -VAR_PREFIXES_ARR=( postgres redis rabbitmq app dbinit devtools svcbgsapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp ) -export VAR_PREFIXES="postgres redis rabbitmq app dbinit devtools svcbgsapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp" +VAR_PREFIXES_ARR=( postgres rabbitmq app dbinit devtools svcbgsapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp ) +export VAR_PREFIXES="postgres rabbitmq app dbinit devtools svcbgsapi svcbiekafka svcbipapi xampleworkflows ccapp eemaxcfiapp eeepmergeapp" ## Helper functions # Usage example to get the variable value for app_GRADLE_IMG: GRADLE_IMG_TAG=`getVarValue app _GRADLE_IMG` @@ -49,9 +49,6 @@ imageTagExists(){ export postgres_GRADLE_IMG="va/abd_vro-postgres" export postgres_IMG="vro-postgres" -export redis_GRADLE_IMG="va/abd_vro-redis" -export redis_IMG="vro-redis" - export rabbitmq_GRADLE_IMG="va/abd_vro-rabbitmq" export rabbitmq_IMG="vro-rabbitmq" diff --git a/scripts/setenv.sh b/scripts/setenv.sh index e514b21a90..599fdfc0ed 100755 --- a/scripts/setenv.sh +++ b/scripts/setenv.sh @@ -151,13 +151,6 @@ export POSTGRES_DOMAIN_CC_PW=domain_cc_password export RABBITMQ_USERNAME=user export RABBITMQ_PASSWORD=bitnami -# Credentials for Redis -# Redis assumes that the implicit username is "default" -- https://redis.io/commands/auth/ -export REDIS_PASSWORD=vro_redis_password - -# For local testing of dev and qa environments -# export PERSIST_TRACKING_FOLDER=/tmp/persist/tracking - ### ### Slack notifications ### diff --git a/settings.gradle b/settings.gradle index 76af1a3468..15478a770c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -51,5 +51,4 @@ include ':domain-xample:svc-hoppy-usage' include ':domain-cc:cc-app' include ':domain-ee:ee-max-cfi-app' include ':domain-ee:ee-ep-merge-app' -include 'redis' include 'rabbitmq'