diff --git a/009_define_file_templates.tf b/009_define_file_templates.tf index 86f11fd..e407e26 100644 --- a/009_define_file_templates.tf +++ b/009_define_file_templates.tf @@ -157,11 +157,13 @@ locals { flag_enable_data_studio = var.flag_enable_data_studio, data_studio_container_version = var.data_studio_container_version, + updated_redis_version = tonumber(length(regexall("^v24.2.[0-9]", var.tower_container_version))) >= 1 ? true : false } ) } + ## ------------------------------------------------------------------------------------ ## Seqerakit - Everything But Compute Environments ## ------------------------------------------------------------------------------------ diff --git a/assets/src/docker_compose/docker-compose.yml.tpl b/assets/src/docker_compose/docker-compose.yml.tpl index b329ecc..87b3db4 100644 --- a/assets/src/docker_compose/docker-compose.yml.tpl +++ b/assets/src/docker_compose/docker-compose.yml.tpl @@ -29,7 +29,12 @@ services: %{ if flag_use_container_redis == true ~} redis: - image: cr.seqera.io/public/redis:6.0 + image: +%{ if updated_redis_version ~} + cr.seqera.io/public/redis:7 +%{ else ~} + cr.seqera.io/public/redis:6.0 +%{ endif ~} networks: - backend expose: diff --git a/scripts/installer/validation/check_configuration.py b/scripts/installer/validation/check_configuration.py index ca57ebf..a156753 100644 --- a/scripts/installer/validation/check_configuration.py +++ b/scripts/installer/validation/check_configuration.py @@ -542,6 +542,33 @@ def verify_alb_settings(data: SimpleNamespace): ) +def verify_redis_version(data: SimpleNamespace): + """Warn that versions of Seqera Platform >= 24.2 will default to Redis v7.0 container image.""" + + if data.tower_container_version >= "v24.2.0": + + if data.flag_use_container_redis: + + logger.warning( + "Seqera Platform version >= 24.2.0 uses a Redis v7.0 container (previously Redis v6.0)." + ) + + if data.flag_create_external_redis: + # TO DO + # As of Jan 9/25, the external redis are hardcoded into the `003-database.tf` file. + # This uses a redis 7.0 as baseline and thus is compliant to the needs of 24.2.2. + # In future this may need to change if Tower demands require a version > Redis 7.0 OR we + # choose to make the external redis values configurable. + logger.warning( + "The external Elasticache instance is hardcoded to use Redis 7.0." + ) + + else: + logger.warning( + "When you upgrade to Seqera Platform >= v24.2, a Redis version >= 6.2 will be required." + ) + + # ------------------------------------------------------------------------------------ # MAIN # ------------------------------------------------------------------------------------ @@ -570,6 +597,7 @@ def verify_alb_settings(data: SimpleNamespace): verify_if_v24_1_3(data) verify_if_v24_1_4(data) verify_connect_version_tls(data) + verify_redis_version(data) # Verify tfvars fields logger.info("----- Verifying TFVARS file -----") diff --git a/templates/TEMPLATE_terraform.tfvars b/templates/TEMPLATE_terraform.tfvars index 8a5d016..0409a8d 100644 --- a/templates/TEMPLATE_terraform.tfvars +++ b/templates/TEMPLATE_terraform.tfvars @@ -127,6 +127,8 @@ flag_use_existing_external_db = false flag_use_container_db = true # Only one of these can be true. +# NOTE: Redis versions and ports are hard-coded in their respective files (docker-compose.yaml & +# 003-database.tf) flag_create_external_redis = false flag_use_container_redis = true