From e59665dc0183e5e1f80a6c224aa7e6d07984367d Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Tue, 17 Dec 2024 15:30:22 +0100 Subject: [PATCH 1/2] fix: use noble in TF module --- terraform/main.tf | 1 + terraform/variables.tf | 6 ++++++ tests/integration/test_integration.py | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/terraform/main.tf b/terraform/main.tf index bb106cc..6321ac6 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -9,6 +9,7 @@ resource "juju_application" "gnbsim" { name = "sdcore-gnbsim-k8s" channel = var.channel revision = var.revision + base = var.base } config = var.config diff --git a/terraform/variables.tf b/terraform/variables.tf index b21ca37..2198a85 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 7f89631..0394b7d 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -26,6 +26,7 @@ TLS_CHARM_CHANNEL = "latest/stable" GRAFANA_AGENT_CHARM_NAME = "grafana-agent-k8s" GRAFANA_AGENT_CHARM_CHANNEL = "latest/stable" +SDCORE_CHARMS_BASE = "ubuntu@24.04" TIMEOUT = 5 * 60 @@ -99,6 +100,7 @@ async def _deploy_amf(ops_test: OpsTest): AMF_CHARM_NAME, application_name=AMF_CHARM_NAME, channel=AMF_CHARM_CHANNEL, + base=SDCORE_CHARMS_BASE, trust=True, ) await ops_test.model.integrate(relation1=AMF_CHARM_NAME, relation2=NRF_CHARM_NAME) @@ -140,6 +142,7 @@ async def _deploy_nrf(ops_test: OpsTest): NRF_CHARM_NAME, application_name=NRF_CHARM_NAME, channel=NRF_CHARM_CHANNEL, + base=SDCORE_CHARMS_BASE, trust=True, ) await ops_test.model.integrate(relation1=NRF_CHARM_NAME, relation2=DB_CHARM_NAME) @@ -153,6 +156,7 @@ async def _deploy_nms(ops_test: OpsTest): NMS_CHARM_NAME, application_name=NMS_CHARM_NAME, channel=NMS_CHARM_CHANNEL, + base=SDCORE_CHARMS_BASE, ) await ops_test.model.integrate( relation1=f"{NMS_CHARM_NAME}:common_database", relation2=f"{DB_CHARM_NAME}" From cea149b328235c6fb713094bdbd779bd33c1f978 Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Wed, 18 Dec 2024 14:44:39 +0100 Subject: [PATCH 2/2] use series instead of base --- tests/integration/test_integration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_integration.py b/tests/integration/test_integration.py index 0394b7d..50fe874 100644 --- a/tests/integration/test_integration.py +++ b/tests/integration/test_integration.py @@ -26,7 +26,7 @@ TLS_CHARM_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 = 5 * 60 @@ -100,7 +100,7 @@ async def _deploy_amf(ops_test: OpsTest): AMF_CHARM_NAME, application_name=AMF_CHARM_NAME, channel=AMF_CHARM_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 trust=True, ) await ops_test.model.integrate(relation1=AMF_CHARM_NAME, relation2=NRF_CHARM_NAME) @@ -142,7 +142,7 @@ async def _deploy_nrf(ops_test: OpsTest): NRF_CHARM_NAME, application_name=NRF_CHARM_NAME, channel=NRF_CHARM_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 trust=True, ) await ops_test.model.integrate(relation1=NRF_CHARM_NAME, relation2=DB_CHARM_NAME) @@ -156,7 +156,7 @@ async def _deploy_nms(ops_test: OpsTest): NMS_CHARM_NAME, application_name=NMS_CHARM_NAME, channel=NMS_CHARM_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_CHARM_NAME}:common_database", relation2=f"{DB_CHARM_NAME}"