Skip to content

Commit

Permalink
Uses 1.5/edge for the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmerold committed Nov 28, 2024
1 parent 2ade436 commit ec6ffe8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions terraform/integration_tests.auto.tfvars.j2
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sdcore_model_name = "{{ sdcore_model_name }}"
ran_model_name = "{{ ran_model_name }}"
18 changes: 10 additions & 8 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ module "sdcore-router" {
source = "git::https://github.com/canonical/sdcore-router-k8s-operator//terraform?ref=v1.5"

model = juju_model.sdcore.name
channel = "1.5/edge"
depends_on = [juju_model.sdcore]
}

module "sdcore" {
source = "git::https://github.com/canonical/terraform-juju-sdcore-k8s//modules/sdcore-k8s?ref=v1.5"

model = juju_model.sdcore.name

depends_on = [module.sdcore-router]
model = juju_model.sdcore.name
sdcore_channel = "1.5/edge"
depends_on = [module.sdcore-router]
}

resource "juju_model" "ran-simulator" {
name = "ran"
name = var.ran_model_name
}

module "gnbsim" {
source = "git::https://github.com/canonical/sdcore-gnbsim-k8s-operator//terraform?ref=v1.5"

model = juju_model.ran-simulator.name
channel = "1.5/edge"
depends_on = [module.sdcore-router]
}

Expand Down Expand Up @@ -64,10 +66,10 @@ resource "juju_integration" "gnbsim-nms" {
}

module "cos" {
source = "git::https://github.com/canonical/terraform-juju-sdcore//modules/external/cos-lite"
model_name = "cos-lite"
deploy_cos_configuration = true
cos_configuration_config = {
source = "git::https://github.com/canonical/terraform-juju-sdcore//modules/external/cos-lite"
model_name = "cos-lite"
deploy_cos_configuration = true
cos_configuration_config = {
git_repo = "https://github.com/canonical/sdcore-cos-configuration"
git_branch = "main"
grafana_dashboards_path = "grafana_dashboards/sdcore/"
Expand Down
8 changes: 7 additions & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
# See LICENSE file for licensing details.

variable "sdcore_model_name" {
description = "Name of Juju model to deploy application to."
description = "Name of Juju model to deploy SD-Core applications to."
type = string
default = "sdcore"
}

variable "ran_model_name" {
description = "Name of Juju model to deploy RAN simulator to."
type = string
default = "ran"
}
1 change: 1 addition & 0 deletions tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def _generate_tfvars_file():
template = jinja2_environment.get_template(f"{TFVARS_FILE}.j2")
content = template.render(
sdcore_model_name=SDCORE_MODEL_NAME,
ran_model_name=RAN_MODEL_NAME,
)
with open(f"{TERRAFORM_DIR}/{TFVARS_FILE}", mode="w") as tfvars:
tfvars.write(content)
Expand Down

0 comments on commit ec6ffe8

Please sign in to comment.