From d68dd20d2aeabba718d548fa09be143158a19879 Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Wed, 18 Dec 2024 10:10:51 +0100 Subject: [PATCH 1/3] set noble base in tf modules --- terraform/main.tf | 1 + terraform/variables.tf | 6 ++++++ tests/integration/test_integration.py | 3 +++ 3 files changed, 10 insertions(+) diff --git a/terraform/main.tf b/terraform/main.tf index 38d4d7e..9298f4b 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -9,6 +9,7 @@ resource "juju_application" "ausf" { name = "sdcore-ausf-k8s" channel = var.channel revision = var.revision + base = var.base } config = var.config diff --git a/terraform/variables.tf b/terraform/variables.tf index 4fc0386..624f95c 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -43,6 +43,12 @@ variable "revision" { default = null } +variable "base" { + description = "The operating system on which to deploy" + type = string + default = "ubuntu@24.04" +} + variable "units" { description = "Number of units to deploy" type = number diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index 28ffbb0..9b02ac5 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -27,6 +27,7 @@ TLS_PROVIDER_CHANNEL = "latest/stable" GRAFANA_AGENT_CHARM_NAME = "grafana-agent-k8s" GRAFANA_AGENT_CHARM_CHANNEL = "latest/stable" +SDCORE_CHARMS_BASE = "ubuntu@24.04" TIMEOUT = 15 * 60 @@ -151,6 +152,7 @@ async def _deploy_nrf(ops_test: OpsTest): NRF_APPLICATION_NAME, application_name=NRF_APPLICATION_NAME, channel=NRF_APPLICATION_CHANNEL, + base=SDCORE_CHARMS_BASE, ) await ops_test.model.integrate(relation1=DB_APPLICATION_NAME, relation2=NRF_APPLICATION_NAME) await ops_test.model.integrate(relation1=NRF_APPLICATION_NAME, relation2=TLS_PROVIDER_NAME) @@ -166,6 +168,7 @@ async def _deploy_nms(ops_test: OpsTest): NMS_APPLICATION_NAME, application_name=NMS_APPLICATION_NAME, channel=NMS_APPLICATION_CHANNEL, + base=SDCORE_CHARMS_BASE, ) await ops_test.model.integrate( relation1=f"{NMS_APPLICATION_NAME}:common_database", relation2=DB_APPLICATION_NAME From 44ce8aec580bc25e375c12887d5dc2e626b3f784 Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Wed, 18 Dec 2024 15:08:31 +0100 Subject: [PATCH 2/3] replace base with series --- tests/integration/test_integration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index 9b02ac5..31631d1 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -27,7 +27,7 @@ TLS_PROVIDER_CHANNEL = "latest/stable" GRAFANA_AGENT_CHARM_NAME = "grafana-agent-k8s" GRAFANA_AGENT_CHARM_CHANNEL = "latest/stable" -SDCORE_CHARMS_BASE = "ubuntu@24.04" +SDCORE_CHARMS_SERIES = "noble" TIMEOUT = 15 * 60 @@ -152,7 +152,7 @@ async def _deploy_nrf(ops_test: OpsTest): NRF_APPLICATION_NAME, application_name=NRF_APPLICATION_NAME, channel=NRF_APPLICATION_CHANNEL, - base=SDCORE_CHARMS_BASE, + series=SDCORE_CHARMS_SERIES, # TODO: This should be replaced with base="ubuntu@24.04" once it's properly supported # noqa: E501 ) await ops_test.model.integrate(relation1=DB_APPLICATION_NAME, relation2=NRF_APPLICATION_NAME) await ops_test.model.integrate(relation1=NRF_APPLICATION_NAME, relation2=TLS_PROVIDER_NAME) @@ -168,7 +168,7 @@ async def _deploy_nms(ops_test: OpsTest): NMS_APPLICATION_NAME, application_name=NMS_APPLICATION_NAME, channel=NMS_APPLICATION_CHANNEL, - base=SDCORE_CHARMS_BASE, + series=SDCORE_CHARMS_SERIES, # TODO: This should be replaced with base="ubuntu@24.04" once it's properly supported # noqa: E501 ) await ops_test.model.integrate( relation1=f"{NMS_APPLICATION_NAME}:common_database", relation2=DB_APPLICATION_NAME From adc713f405778920c34c6a77aa84fdfbb71dc23b Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Wed, 18 Dec 2024 15:16:27 +0100 Subject: [PATCH 3/3] fix format --- tests/integration/test_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index 31631d1..da59c07 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -152,7 +152,7 @@ async def _deploy_nrf(ops_test: OpsTest): NRF_APPLICATION_NAME, application_name=NRF_APPLICATION_NAME, channel=NRF_APPLICATION_CHANNEL, - series=SDCORE_CHARMS_SERIES, # TODO: This should be replaced with base="ubuntu@24.04" once it's properly supported # noqa: E501 + series=SDCORE_CHARMS_SERIES, # TODO: This should be replaced with base="ubuntu@24.04" once it's properly supported # noqa: E501 ) await ops_test.model.integrate(relation1=DB_APPLICATION_NAME, relation2=NRF_APPLICATION_NAME) await ops_test.model.integrate(relation1=NRF_APPLICATION_NAME, relation2=TLS_PROVIDER_NAME) @@ -168,7 +168,7 @@ async def _deploy_nms(ops_test: OpsTest): NMS_APPLICATION_NAME, application_name=NMS_APPLICATION_NAME, channel=NMS_APPLICATION_CHANNEL, - series=SDCORE_CHARMS_SERIES, # TODO: This should be replaced with base="ubuntu@24.04" once it's properly supported # noqa: E501 + series=SDCORE_CHARMS_SERIES, # TODO: This should be replaced with base="ubuntu@24.04" once it's properly supported # noqa: E501 ) await ops_test.model.integrate( relation1=f"{NMS_APPLICATION_NAME}:common_database", relation2=DB_APPLICATION_NAME