Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/on-pull_request-opened-synchronize-reopened.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 0 additions & 8 deletions .github/workflows/on-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion Jenkinsfile-OTA
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -57,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)
}

Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions docker/copy_dependencies_common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/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

# Change current directory to previous one so scripts calling this one can function properly
cd - > /dev/null
52 changes: 0 additions & 52 deletions docker/docker-compose.traefik.yaml

This file was deleted.

File renamed without changes.
18 changes: 18 additions & 0 deletions docker/nl/copy_dependencies.sh
Original file line number Diff line number Diff line change
@@ -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 "${@}"
8 changes: 4 additions & 4 deletions docker/docker-compose.yaml → docker/nl/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
# 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}
context: ../../
dockerfile: docker/common/service/Dockerfile
image: ${AERIUS_REGISTRY_URL}service:${AERIUS_IMAGE_TAG}
restart: unless-stopped
environment:
- TZ=${TIMEZONE}
20 changes: 5 additions & 15 deletions terraform/application_services/app.hcl
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
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"}
}

listener_rules = {
"rule1" = {tg = "tg1", application_type = "SEARCH", path_pattern = "/*", cognito = true}
"rule1" = {tg = "tg1", application_type = "SEARCH", path_pattern = "/*", cognito = false}
}

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}
}

}
2 changes: 1 addition & 1 deletion terraform/application_services/ecs_services/modules.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"url": "git@github.com:aerius/Cloud-infra-modules.git",
"version": "v1",
"version": "v1.1",
"checkout_path": "ecs_services"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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,
REGISTRY_URL = var.ecr_repo,
APP_VERSION = var.app_version,
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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
services:

service:
image: ${REGISTRY_URL}/search:${APP_VERSION}
cpu: 4096
image: ${REGISTRY_URL}/service:${APP_VERSION}
cpu: 2048
memory: 7100
desired_count: 1
target_group: tg1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
#==========================
Expand Down
10 changes: 10 additions & 0 deletions terraform/env.d/10-application_host_headers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# Crash on error
set -e

cat << EOF
application_host_headers = {
"SEARCH" = "${DEPLOY_WEBHOST}",
}
EOF