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
2 changes: 1 addition & 1 deletion terraform/cos-lite/integrations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ resource "juju_integration" "grafana_ingress" {

application {
name = module.traefik.app_name
endpoint = module.traefik.endpoints.traefik_route
endpoint = module.traefik.endpoints.ingress
}

application {
Expand Down
8 changes: 4 additions & 4 deletions terraform/cos/integrations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ resource "juju_integration" "ingress" {
app_name = module.loki.app_names.loki_coordinator
endpoint = module.loki.endpoints.ingress
}
grafana = {
app_name = module.grafana.app_name
endpoint = module.grafana.endpoints.ingress
}
}
model_uuid = var.model_uuid

Expand All @@ -308,10 +312,6 @@ resource "juju_integration" "ingress" {

resource "juju_integration" "traefik_route" {
for_each = {
grafana = {
app_name = module.grafana.app_name
endpoint = module.grafana.endpoints.ingress
}
tempo = {
app_name = module.tempo.app_names.tempo_coordinator
endpoint = module.tempo.endpoints.ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@


def test_envvars():
assert all(S3_ENDPOINT.values())
assert all(S3_ENDPOINT.values()), (
f"export the following env vars (upper case) before running this test: {S3_ENDPOINT.keys()}"
)


def test_deploy_from_track(
tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju
):
# GIVEN a module deployed from track n
tf_manager.init(TRACK_2_TF_FILE)
tf_manager.apply(
target="ssc", ca_model=ca_model.model, cos_model=cos_model.model, **S3_ENDPOINT
)
tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model, **S3_ENDPOINT)
wait_for_active_idle_without_error([cos_model], timeout=5400)
tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates")
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/cos/tls_external/track-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ module "cos" {
model_uuid = data.juju_model.cos-model.uuid
channel = "2/edge"
internal_tls = "false"
external_certificates_offer_url = module.ssc.offers.certificates.url
external_certificates_offer_url = "admin/${var.ca_model}.certificates"
external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert"

s3_endpoint = var.s3_endpoint
s3_secret_key = var.s3_secret_key
Expand Down
7 changes: 3 additions & 4 deletions tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@


def test_envvars():
assert all(S3_ENDPOINT.values())
assert all(S3_ENDPOINT.values()), (
f"export the following env vars (upper case) before running this test: {S3_ENDPOINT.keys()}"
)


def test_deploy_from_track(
tmp_path, tf_manager, ca_model: jubilant.Juju, cos_model: jubilant.Juju
):
# GIVEN a module deployed from track n
tf_manager.init(TRACK_2_TF_FILE)
tf_manager.apply(
target="ssc", ca_model=ca_model.model, cos_model=cos_model.model, **S3_ENDPOINT
)
tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model, **S3_ENDPOINT)
wait_for_active_idle_without_error([cos_model], timeout=5400)
tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates")
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/cos/tls_full/track-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ module "cos" {
model_uuid = data.juju_model.cos-model.uuid
channel = "2/edge"
internal_tls = "true"
external_certificates_offer_url = module.ssc.offers.certificates.url
external_certificates_offer_url = "admin/${var.ca_model}.certificates"
external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert"

s3_endpoint = var.s3_endpoint
s3_secret_key = var.s3_secret_key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@


def test_envvars():
assert all(S3_ENDPOINT.values())
assert all(S3_ENDPOINT.values()), (
f"export the following env vars (upper case) before running this test: {S3_ENDPOINT.keys()}"
)


def test_deploy_from_track(tmp_path, tf_manager, cos_model: jubilant.Juju):
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@


def test_envvars():
assert all(S3_ENDPOINT.values())
assert all(S3_ENDPOINT.values()), (
f"export the following env vars (upper case) before running this test: {S3_ENDPOINT.keys()}"
)


def test_deploy_from_track(tf_manager, cos_model: jubilant.Juju):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def test_deploy_from_track(
):
# GIVEN a module deployed from track n-1
tf_manager.init(TRACK_1_TF_FILE)
tf_manager.apply(target="ssc", ca_model=ca_model.model, cos_model=cos_model.model)
tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model)
wait_for_active_idle_without_error([ca_model, cos_model])

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/cos_lite/tls_external/track-1.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module "cos-lite" {
model_uuid = data.juju_model.cos-model.uuid
channel = "1/stable"
internal_tls = "false"
external_certificates_offer_url = module.ssc.offers.certificates.url
external_certificates_offer_url = "admin/${var.ca_model}.certificates"
external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert"

traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable
}
3 changes: 2 additions & 1 deletion tests/integration/cos_lite/tls_external/track-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module "cos-lite" {
model_uuid = data.juju_model.cos-model.uuid
channel = "2/edge"
internal_tls = "false"
external_certificates_offer_url = module.ssc.offers.certificates.url
external_certificates_offer_url = "admin/${var.ca_model}.certificates"
external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert"

traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def test_deploy_from_track(
):
# GIVEN a module deployed from track n-1
tf_manager.init(TRACK_1_TF_FILE)
tf_manager.apply(target="ssc", ca_model=ca_model.model, cos_model=cos_model.model)
tf_manager.apply(ca_model=ca_model.model, cos_model=cos_model.model)
wait_for_active_idle_without_error([ca_model, cos_model])

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/cos_lite/tls_full/track-1.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module "cos-lite" {
model_uuid = data.juju_model.cos-model.uuid
channel = "1/stable"
internal_tls = "true"
external_certificates_offer_url = module.ssc.offers.certificates.url
external_certificates_offer_url = "admin/${var.ca_model}.certificates"
external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert"

traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable
}
3 changes: 2 additions & 1 deletion tests/integration/cos_lite/tls_full/track-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module "cos-lite" {
model_uuid = data.juju_model.cos-model.uuid
channel = "2/edge"
internal_tls = "true"
external_certificates_offer_url = module.ssc.offers.certificates.url
external_certificates_offer_url = "admin/${var.ca_model}.certificates"
external_ca_cert_offer_url = "admin/${var.ca_model}.send-ca-cert"

traefik = { channel = "latest/edge" } # TODO: Switch to latest/stable when rev257 hits stable
}
Expand Down