From 75a05b4b040ba302fcbb3da6ac8cf22ef89895e5 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Fri, 18 Jul 2025 15:16:22 +0200 Subject: [PATCH 01/15] Update docker structure Updated docker structure to use new deployment method. Updated Jenkindsfile to include theme. Removed old files no longer used. --- Jenkinsfile-OTA | 2 + docker/{ => common}/service/Dockerfile | 0 docker/copy_dependencies_common.sh | 26 +++++++++++++ docker/docker-compose.traefik.yaml | 52 -------------------------- docker/{ => nl}/.env | 0 docker/nl/copy_dependencies.sh | 18 +++++++++ docker/{ => nl}/docker-compose.yaml | 9 ++--- 7 files changed, 50 insertions(+), 57 deletions(-) rename docker/{ => common}/service/Dockerfile (100%) create mode 100644 docker/copy_dependencies_common.sh delete mode 100644 docker/docker-compose.traefik.yaml rename docker/{ => nl}/.env (100%) create mode 100644 docker/nl/copy_dependencies.sh rename docker/{ => nl}/docker-compose.yaml (85%) diff --git a/Jenkinsfile-OTA b/Jenkinsfile-OTA index 431bd62..cbbbed6 100644 --- a/Jenkinsfile-OTA +++ b/Jenkinsfile-OTA @@ -16,6 +16,8 @@ pipeline { AERIUS_REGISTRY_URL = "${env.AERIUS_REGISTRY_HOSTNAME}/${env.AERIUS_REGISTRY_PATH}/" AERIUS_IMAGE_TAG = sh(script: "${CICD_SCRIPTS_DIR}/docker/get_image_tag.sh", returnStdout: true) + SERVICE_THEME = "${env.SERVICE_THEME ?: 'NL'}" + } stages { diff --git a/docker/service/Dockerfile b/docker/common/service/Dockerfile similarity index 100% rename from docker/service/Dockerfile rename to docker/common/service/Dockerfile diff --git a/docker/copy_dependencies_common.sh b/docker/copy_dependencies_common.sh new file mode 100644 index 0000000..4dc6db1 --- /dev/null +++ b/docker/copy_dependencies_common.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Do not execute this script yourself, make use of the 'copy_dependencies.sh' scripts as present in the profile directories. e.g.: in directory 'nature'. + +SOURCE_DIR='..' +DOCKER_COMMON_DIR='common' + +# Exit on error +set -e + +# Change current directory to directory of script so it can be called from everywhere +SCRIPT_PATH=$(readlink -f "${0}") +SCRIPT_DIR=$(dirname "${SCRIPT_PATH}") +cd "${SCRIPT_DIR}" + +# include functions +source "${CICD_SCRIPTS_DIR}"/docker/images/v1.0/functions.sh + +# worker +if _cicd_is_module_enabled "${1}" 'service'; then + cp -auv "${SOURCE_DIR}"/search-service/target/app.jar \ + "${DOCKER_COMMON_DIR}"/service/app.jar +fi + +# Change current directory to previous one so scripts calling this one can function properly +cd - > /dev/null diff --git a/docker/docker-compose.traefik.yaml b/docker/docker-compose.traefik.yaml deleted file mode 100644 index 9abcd89..0000000 --- a/docker/docker-compose.traefik.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright the State of the Netherlands -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# - -version: "3" - -services: - traefik: - image: traefik:v2.2 - command: - - "--log.level=DEBUG" - - "--api.insecure=true" - - "--providers.docker.endpoint=unix:///var/run/docker.sock" - - "--providers.docker.swarmMode=true" - - "--providers.docker.exposedbydefault=false" - - "--providers.docker.network=web" - - "--entrypoints.web.address=:80" - ports: - - 80:80 -# - 4001:8080 - volumes: - # So that Traefik can listen to the Docker events - - /var/run/docker.sock:/var/run/docker.sock:ro - networks: - - web - - service: - deploy: - labels: - - "traefik.enable=true" - - "traefik.http.routers.search-local-service-data.rule=Host(`localhost`) || Host(`127.0.0.1`)" - - "traefik.http.routers.search-local-service-data.entrypoints=web" - - "traefik.http.services.search-local-service-data.loadbalancer.server.port=8090" - networks: - - web - -networks: - web: - external: true diff --git a/docker/.env b/docker/nl/.env similarity index 100% rename from docker/.env rename to docker/nl/.env diff --git a/docker/nl/copy_dependencies.sh b/docker/nl/copy_dependencies.sh new file mode 100644 index 0000000..12f6ad0 --- /dev/null +++ b/docker/nl/copy_dependencies.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +SOURCE_DIR='../../' +DOCKER_COMMON_DIR='../common' + +# Exit on error +set -e + +# Change current directory to directory of script so it can be called from everywhere +SCRIPT_PATH=$(readlink -f "${0}") +SCRIPT_DIR=$(dirname "${SCRIPT_PATH}") +cd "${SCRIPT_DIR}" + +# include functions +source "${CICD_SCRIPTS_DIR}"/docker/images/v1.0/functions.sh + +# Also copy common dependencies +../copy_dependencies_common.sh "${@}" diff --git a/docker/docker-compose.yaml b/docker/nl/docker-compose.yaml similarity index 85% rename from docker/docker-compose.yaml rename to docker/nl/docker-compose.yaml index 2e5ea84..fb137a9 100644 --- a/docker/docker-compose.yaml +++ b/docker/nl/docker-compose.yaml @@ -15,15 +15,14 @@ # along with this program. If not, see http://www.gnu.org/licenses/. # -version: "3" +version: "3.8" services: service: - build: - context: . - dockerfile: docker/service/Dockerfile - image: ${REGISTRY_URL}service:${IMAGE_TAG} + build: + context: ../common/service + image: ${AERIUS_REGISTRY_URL}service:${AERIUS_IMAGE_TAG} restart: unless-stopped environment: - TZ=${TIMEZONE} From ac7659661e6fbb784e98f538d96d4e04b0ab67bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serhat=20G=C3=BCl=C3=A7i=C3=A7ek?= Date: Fri, 18 Jul 2025 15:42:16 +0200 Subject: [PATCH 02/15] Add executable bit to scripts --- docker/copy_dependencies_common.sh | 0 docker/nl/copy_dependencies.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 docker/copy_dependencies_common.sh mode change 100644 => 100755 docker/nl/copy_dependencies.sh diff --git a/docker/copy_dependencies_common.sh b/docker/copy_dependencies_common.sh old mode 100644 new mode 100755 diff --git a/docker/nl/copy_dependencies.sh b/docker/nl/copy_dependencies.sh old mode 100644 new mode 100755 From 09858b0fb28e447246d1ccbcdda56b915539d435 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 11:26:16 +0200 Subject: [PATCH 03/15] Removed build part from Dockerfile Also updates file location in copy_dependencies script. --- docker/common/service/Dockerfile | 16 +--------------- docker/copy_dependencies_common.sh | 2 +- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/docker/common/service/Dockerfile b/docker/common/service/Dockerfile index 4301331..583416d 100644 --- a/docker/common/service/Dockerfile +++ b/docker/common/service/Dockerfile @@ -1,17 +1,3 @@ -# Builder part for maven packaging. -FROM maven:3-eclipse-temurin-21 as builder - -WORKDIR /app - -# Do the actual build -COPY . /app -RUN mvn --no-transfer-progress -DskipTests=true clean package - -# Move the resultant jar to a known name so it can be picked up by the final image. -RUN mv -v search-service/target/search-service-*.jar app.jar \ -# Clean up image so we can rerun without the cache being invalidated because target files are changed - && mvn clean - FROM eclipse-temurin:21-jre WORKDIR /app @@ -20,7 +6,7 @@ WORKDIR /app ENV JAVA_OPTIONS="-XX:MaxRAMPercentage=75" # Copy the app -COPY --from=builder /app/app.jar /app/ +COPY common/service/app.jar /app/app.jar # Start application CMD java $JAVA_OPTIONS -jar app.jar diff --git a/docker/copy_dependencies_common.sh b/docker/copy_dependencies_common.sh index 4dc6db1..aabf47a 100755 --- a/docker/copy_dependencies_common.sh +++ b/docker/copy_dependencies_common.sh @@ -18,7 +18,7 @@ source "${CICD_SCRIPTS_DIR}"/docker/images/v1.0/functions.sh # worker if _cicd_is_module_enabled "${1}" 'service'; then - cp -auv "${SOURCE_DIR}"/search-service/target/app.jar \ + cp -auv "${SOURCE_DIR}"/search-service/target/search-service-*.jar \ "${DOCKER_COMMON_DIR}"/service/app.jar fi From 063c19f086c5563150e86ec57c2228901fd3f7eb Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 11:44:28 +0200 Subject: [PATCH 04/15] fixed location mismatch --- docker/common/service/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/common/service/Dockerfile b/docker/common/service/Dockerfile index 583416d..5ffaeb1 100644 --- a/docker/common/service/Dockerfile +++ b/docker/common/service/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app ENV JAVA_OPTIONS="-XX:MaxRAMPercentage=75" # Copy the app -COPY common/service/app.jar /app/app.jar +COPY app.jar . # Start application CMD java $JAVA_OPTIONS -jar app.jar From 8bf01eeeac01297340d52bc1f3c9e1bbd7135446 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 14:01:14 +0200 Subject: [PATCH 05/15] Updated Terraform structure for automated deploys --- terraform/application_services/app.hcl | 18 ++++------------ .../service_configuration/services.yaml.tftpl | 2 +- .../service_configuration/vars.tf | 21 ++++++++++--------- .../env.d/10-application_host_headers.sh | 10 +++++++++ 4 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 terraform/env.d/10-application_host_headers.sh diff --git a/terraform/application_services/app.hcl b/terraform/application_services/app.hcl index 27b10ec..bb67803 100644 --- a/terraform/application_services/app.hcl +++ b/terraform/application_services/app.hcl @@ -1,10 +1,8 @@ locals { - basicinfra_version = "v1" + basicinfra_version = "v1" + ecr_repo = "028339422996.dkr.ecr.eu-west-1.amazonaws.com" - ecr_repo = "nexus-docker.aerius.nl" - - app_name = "aerius" - app_timezone = "Europe/Amsterdam" + app_timezone = "Europe/Amsterdam" target_groups = { "tg1" = {name = "search", protocol = "HTTP", port = "8090", path = "/", matcher = "200-399"} @@ -16,15 +14,7 @@ locals { ssm_passwords = {} - ecs_ctr_fes_1_instance_type = "c5.xlarge" + ecs_ctr_fes_1_instance_type = "m5.large" ecs_ctr_fes_1_max_instance_size = "2" - ecs_capacity_providers = { - "01" = {description = "On_demand_capacity", number = "001", asg = "01"} - } - - ecs_autoscaling_group = { - "01" = {description = "On_demand_capacity", number = "001", spot = false} - } - } diff --git a/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl b/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl index 81b4f79..ff5c5e4 100644 --- a/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl +++ b/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl @@ -19,7 +19,7 @@ services: service: image: ${REGISTRY_URL}/search:${APP_VERSION} - cpu: 4096 + cpu: 2048 memory: 7100 desired_count: 1 target_group: tg1 diff --git a/terraform/application_services/ecs_services/service_configuration/vars.tf b/terraform/application_services/ecs_services/service_configuration/vars.tf index 9bc7302..6ea61aa 100644 --- a/terraform/application_services/ecs_services/service_configuration/vars.tf +++ b/terraform/application_services/ecs_services/service_configuration/vars.tf @@ -21,16 +21,6 @@ variable "environment" { description = "A string for the Environment used in the terragrunt repository directory structure. E.g development, test, apps_shared_service. etc" } -variable "loc" { - type = string - description = "A string containing the region Code e.g LDN" -} - -variable "tf_bucket_key_prefix" { - type = string - description = "A string containing the region Code e.g LDN" -} - #========================== # ECS Service Variables #========================== @@ -56,6 +46,17 @@ variable "ecr_directory" { default = null } +variable "asg_name_suffix" { + type = string + description = "A string containing the suffix name for the ASG to support ECS cluster" +} + +variable "ssm_passwords" { + type = map(string) + sensitive = true + description = "The generated SSM passwords" +} + variable "application_host_headers" { type = map description = "Map containing host headers for specific applications" diff --git a/terraform/env.d/10-application_host_headers.sh b/terraform/env.d/10-application_host_headers.sh new file mode 100644 index 0000000..eca3a59 --- /dev/null +++ b/terraform/env.d/10-application_host_headers.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Crash on error +set -e + +cat << EOF + application_host_headers = { + "SEARCH" = "${DEPLOY_WEBHOST}", + } +EOF From 9ec5a71255f30dfc369d64226a78f269a507c69b Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 14:02:20 +0200 Subject: [PATCH 06/15] Updated Terraform to use latest modules --- terraform/application_services/ecs_services/modules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/application_services/ecs_services/modules.json b/terraform/application_services/ecs_services/modules.json index 042a66c..2d698b8 100644 --- a/terraform/application_services/ecs_services/modules.json +++ b/terraform/application_services/ecs_services/modules.json @@ -1,7 +1,7 @@ [ { "url": "git@github.com:aerius/Cloud-infra-modules.git", - "version": "v1", + "version": "v1.1", "checkout_path": "ecs_services" } ] From 5bed6071f7dfb1f1a9314ee7f49b99e388ff9017 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 14:13:09 +0200 Subject: [PATCH 07/15] Made file executable --- terraform/env.d/10-application_host_headers.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 terraform/env.d/10-application_host_headers.sh diff --git a/terraform/env.d/10-application_host_headers.sh b/terraform/env.d/10-application_host_headers.sh old mode 100644 new mode 100755 From 8fa77d931fd51bf3e18a470689faf301606b9034 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 14:24:49 +0200 Subject: [PATCH 08/15] Adjusted APP_VERSION Was set to latest for all dev builds. With new way of building we can use the generated var.app_version. --- .../ecs_services/service_configuration/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/application_services/ecs_services/service_configuration/outputs.tf b/terraform/application_services/ecs_services/service_configuration/outputs.tf index 7f843d7..bb1d1b7 100644 --- a/terraform/application_services/ecs_services/service_configuration/outputs.tf +++ b/terraform/application_services/ecs_services/service_configuration/outputs.tf @@ -2,7 +2,7 @@ output "services" { description = "The services object containing all configuration" value = yamldecode(templatefile("${path.module}/services.yaml.tftpl", { APP_TIMEZONE = var.app_timezone, - APP_VERSION = var.service["type"] == "DEV" ? "latest" : var.app_version, + APP_VERSION = var.app_version, REGISTRY_URL = var.ecr_repo, BING_APIKEY = nonsensitive(data.aws_ssm_parameter.bing_apikey_search.value) From 4fa6c53cd847fa4adac762b1fb9e721aa20992eb Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 14:48:17 +0200 Subject: [PATCH 09/15] Updated registry url Updated registry url output to match new way of deploying. --- .../ecs_services/service_configuration/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/application_services/ecs_services/service_configuration/outputs.tf b/terraform/application_services/ecs_services/service_configuration/outputs.tf index bb1d1b7..5897dcd 100644 --- a/terraform/application_services/ecs_services/service_configuration/outputs.tf +++ b/terraform/application_services/ecs_services/service_configuration/outputs.tf @@ -3,7 +3,7 @@ output "services" { value = yamldecode(templatefile("${path.module}/services.yaml.tftpl", { APP_TIMEZONE = var.app_timezone, APP_VERSION = var.app_version, - REGISTRY_URL = var.ecr_repo, + REGISTRY_URL = var.ecr_directory == null ? "${var.ecr_repo}/${lower(var.environment)}" : "${var.ecr_repo}/${var.ecr_directory}", BING_APIKEY = nonsensitive(data.aws_ssm_parameter.bing_apikey_search.value) From 2ac67a1425d42ecf0916e6846be3f379a0529241 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 15:10:49 +0200 Subject: [PATCH 10/15] Updated name in service configuration Image build and pushed as service, should be service in the services list as well. --- .../ecs_services/service_configuration/services.yaml.tftpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl b/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl index ff5c5e4..2efaab8 100644 --- a/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl +++ b/terraform/application_services/ecs_services/service_configuration/services.yaml.tftpl @@ -18,7 +18,7 @@ services: service: - image: ${REGISTRY_URL}/search:${APP_VERSION} + image: ${REGISTRY_URL}/service:${APP_VERSION} cpu: 2048 memory: 7100 desired_count: 1 From 26858e10b8e9f35a3e70043499db1ed20edd5a87 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Mon, 21 Jul 2025 15:25:49 +0200 Subject: [PATCH 11/15] Set cognito to false As this dev service needs to be available for other environments we need to disable cognito. This is accepted as all the data within search is open. --- terraform/application_services/app.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/application_services/app.hcl b/terraform/application_services/app.hcl index bb67803..30c950b 100644 --- a/terraform/application_services/app.hcl +++ b/terraform/application_services/app.hcl @@ -9,7 +9,7 @@ locals { } listener_rules = { - "rule1" = {tg = "tg1", application_type = "SEARCH", path_pattern = "/*", cognito = true} + "rule1" = {tg = "tg1", application_type = "SEARCH", path_pattern = "/*", cognito = false} } ssm_passwords = {} From c320fbcd785314964a8081cbf9fe9e502f75d96c Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Tue, 22 Jul 2025 10:47:48 +0200 Subject: [PATCH 12/15] Refactor to build docker within docker Changed it around again and updated files to remove unnecessary stuff and only leave boilerplate. --- Jenkinsfile-OTA | 2 +- docker/common/service/Dockerfile | 16 +++++++++++++++- docker/copy_dependencies_common.sh | 6 ------ docker/nl/docker-compose.yaml | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile-OTA b/Jenkinsfile-OTA index cbbbed6..343ff70 100644 --- a/Jenkinsfile-OTA +++ b/Jenkinsfile-OTA @@ -59,7 +59,7 @@ pipeline { environment { DEPLOY_OTA_ENVIRONMENT_CICD_URL = credentials('DEPLOY_OTA_ENVIRONMENT_CICD_URL') DEPLOY_OTA_ENVIRONMENT_CICD_LOGIN = credentials('DEPLOY_OTA_ENVIRONMENT_CICD_LOGIN') - FLAGS = "${env.JOB_SPECIFIC_FLAGS ?: ''}" + FLAGS = "DISABLE_COGNITO, ${env.JOB_SPECIFIC_FLAGS ?: ''}" CICD_JOB_MESSAGES = sh(script: """${CICD_SCRIPTS_DIR}/job/add_job_duration.sh build "${currentBuild.durationString}" """, returnStdout: true) } diff --git a/docker/common/service/Dockerfile b/docker/common/service/Dockerfile index 5ffaeb1..4301331 100644 --- a/docker/common/service/Dockerfile +++ b/docker/common/service/Dockerfile @@ -1,3 +1,17 @@ +# Builder part for maven packaging. +FROM maven:3-eclipse-temurin-21 as builder + +WORKDIR /app + +# Do the actual build +COPY . /app +RUN mvn --no-transfer-progress -DskipTests=true clean package + +# Move the resultant jar to a known name so it can be picked up by the final image. +RUN mv -v search-service/target/search-service-*.jar app.jar \ +# Clean up image so we can rerun without the cache being invalidated because target files are changed + && mvn clean + FROM eclipse-temurin:21-jre WORKDIR /app @@ -6,7 +20,7 @@ WORKDIR /app ENV JAVA_OPTIONS="-XX:MaxRAMPercentage=75" # Copy the app -COPY app.jar . +COPY --from=builder /app/app.jar /app/ # Start application CMD java $JAVA_OPTIONS -jar app.jar diff --git a/docker/copy_dependencies_common.sh b/docker/copy_dependencies_common.sh index aabf47a..0ab5f63 100755 --- a/docker/copy_dependencies_common.sh +++ b/docker/copy_dependencies_common.sh @@ -16,11 +16,5 @@ cd "${SCRIPT_DIR}" # include functions source "${CICD_SCRIPTS_DIR}"/docker/images/v1.0/functions.sh -# worker -if _cicd_is_module_enabled "${1}" 'service'; then - cp -auv "${SOURCE_DIR}"/search-service/target/search-service-*.jar \ - "${DOCKER_COMMON_DIR}"/service/app.jar -fi - # Change current directory to previous one so scripts calling this one can function properly cd - > /dev/null diff --git a/docker/nl/docker-compose.yaml b/docker/nl/docker-compose.yaml index fb137a9..d9ffeb9 100644 --- a/docker/nl/docker-compose.yaml +++ b/docker/nl/docker-compose.yaml @@ -22,6 +22,7 @@ services: service: build: context: ../common/service + dockerfile: Dockerfile image: ${AERIUS_REGISTRY_URL}service:${AERIUS_IMAGE_TAG} restart: unless-stopped environment: From f1a0ccd5e446e602ec20ea1479e4dd7a3a89b562 Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Tue, 22 Jul 2025 11:31:58 +0200 Subject: [PATCH 13/15] Update docker context location --- docker/nl/docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/nl/docker-compose.yaml b/docker/nl/docker-compose.yaml index d9ffeb9..0e3be84 100644 --- a/docker/nl/docker-compose.yaml +++ b/docker/nl/docker-compose.yaml @@ -21,8 +21,8 @@ services: service: build: - context: ../common/service - dockerfile: Dockerfile + context: ../../ + dockerfile: docker/common/service/Dockerfile image: ${AERIUS_REGISTRY_URL}service:${AERIUS_IMAGE_TAG} restart: unless-stopped environment: From b080aa485c34026f243db31e41b2bef38b841f0f Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Tue, 22 Jul 2025 12:01:58 +0200 Subject: [PATCH 14/15] Removed old var definitions --- docker/nl/docker-compose.yaml | 2 +- .../ecs_services/service_configuration/vars.tf | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/docker/nl/docker-compose.yaml b/docker/nl/docker-compose.yaml index 0e3be84..7d6dd8b 100644 --- a/docker/nl/docker-compose.yaml +++ b/docker/nl/docker-compose.yaml @@ -20,7 +20,7 @@ version: "3.8" services: service: - build: + build: context: ../../ dockerfile: docker/common/service/Dockerfile image: ${AERIUS_REGISTRY_URL}service:${AERIUS_IMAGE_TAG} diff --git a/terraform/application_services/ecs_services/service_configuration/vars.tf b/terraform/application_services/ecs_services/service_configuration/vars.tf index 6ea61aa..8c3e4d2 100644 --- a/terraform/application_services/ecs_services/service_configuration/vars.tf +++ b/terraform/application_services/ecs_services/service_configuration/vars.tf @@ -46,17 +46,6 @@ variable "ecr_directory" { default = null } -variable "asg_name_suffix" { - type = string - description = "A string containing the suffix name for the ASG to support ECS cluster" -} - -variable "ssm_passwords" { - type = map(string) - sensitive = true - description = "The generated SSM passwords" -} - variable "application_host_headers" { type = map description = "Map containing host headers for specific applications" From 2188528f567120b41337b5d305f23dc42e2d277d Mon Sep 17 00:00:00 2001 From: fmadjdian Date: Tue, 22 Jul 2025 12:17:00 +0200 Subject: [PATCH 15/15] Updated github actions --- ...ll_request-opened-synchronize-reopened.yml | 27 ------------------- .github/workflows/on-push.yml | 8 ------ .github/workflows/on-release-published.yml | 8 ------ 3 files changed, 43 deletions(-) delete mode 100644 .github/workflows/on-pull_request-opened-synchronize-reopened.yml diff --git a/.github/workflows/on-pull_request-opened-synchronize-reopened.yml b/.github/workflows/on-pull_request-opened-synchronize-reopened.yml deleted file mode 100644 index a2d509b..0000000 --- a/.github/workflows/on-pull_request-opened-synchronize-reopened.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: pull_request-opened-synchronize-reopened-event - -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - job: - runs-on: ubuntu-latest - - steps: - - name: Check out github-actions repo - uses: actions/checkout@v4 - with: - repository: aerius/github-actions - path: aerius-github-actions - ref: v1.1 - - - uses: aerius/github-actions/events/pull_request-event-action@v1.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: aerius/github-actions/extras/docker-build-action@v1.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_IMAGE_NAME: ${{ github.event.repository.name }} - DOCKERFILE_LOCATION: docker/service/Dockerfile diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 7dd8e83..7c80dd9 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -21,11 +21,3 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - - - uses: aerius/github-actions/extras/docker-build-or-publish-based-on-maven-project-version-action@v1.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_REGISTRY_USERNAME: ${{ secrets.NEXUS_USERNAME }} - DOCKER_REGISTRY_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - DOCKER_IMAGE_NAME: ${{ github.event.repository.name }} - DOCKERFILE_LOCATION: docker/service/Dockerfile diff --git a/.github/workflows/on-release-published.yml b/.github/workflows/on-release-published.yml index f944477..583389a 100644 --- a/.github/workflows/on-release-published.yml +++ b/.github/workflows/on-release-published.yml @@ -22,11 +22,3 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - - - uses: aerius/github-actions/extras/docker-publish-action@v1.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_REGISTRY_USERNAME: ${{ secrets.NEXUS_USERNAME }} - DOCKER_REGISTRY_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - DOCKER_IMAGE_NAME: ${{ github.event.repository.name }} - DOCKERFILE_LOCATION: docker/service/Dockerfile