Build jammy charms for osm 79/13379/13
authorPatricia Reinoso <patricia.reinoso@canonical.com>
Fri, 12 May 2023 09:04:10 +0000 (09:04 +0000)
committerbeierlm <mark.beierl@canonical.com>
Mon, 29 May 2023 13:39:23 +0000 (15:39 +0200)
jammy charms were already published in charmhub

Remove series:focal from bundle

Fix ha bundle

Update charmcraft files to build on jammy.

Update integration tests

Change-Id: Ifc0056287e731638235720b80b229bda5926f728
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
23 files changed:
installers/charm/bundles/osm-ha/bundle.yaml
installers/charm/bundles/osm/bundle.yaml
installers/charm/osm-lcm/CONTRIBUTING.md
installers/charm/osm-lcm/charmcraft.yaml
installers/charm/osm-lcm/tests/integration/test_charm.py
installers/charm/osm-mon/CONTRIBUTING.md
installers/charm/osm-mon/charmcraft.yaml
installers/charm/osm-mon/tests/integration/test_charm.py
installers/charm/osm-nbi/CONTRIBUTING.md
installers/charm/osm-nbi/charmcraft.yaml
installers/charm/osm-nbi/tests/integration/test_charm.py
installers/charm/osm-ng-ui/CONTRIBUTING.md
installers/charm/osm-ng-ui/charmcraft.yaml
installers/charm/osm-ng-ui/tests/integration/test_charm.py
installers/charm/osm-pol/CONTRIBUTING.md
installers/charm/osm-pol/charmcraft.yaml
installers/charm/osm-pol/tests/integration/test_charm.py
installers/charm/osm-ro/CONTRIBUTING.md
installers/charm/osm-ro/charmcraft.yaml
installers/charm/osm-ro/tests/integration/test_charm.py
installers/charm/vca-integrator-operator/CONTRIBUTING.md
installers/charm/vca-integrator-operator/charmcraft.yaml
installers/charm/vca-integrator-operator/tests/integration/test_charm.py

index dde4ade..96a2ff3 100644 (file)
@@ -56,7 +56,7 @@ applications:
       ha-mode: true
   mongodb:
     charm: mongodb-k8s
-    channel: latest/edge
+    channel: 5/edge
     scale: 3
     series: kubernetes
     storage:
@@ -139,7 +139,7 @@ applications:
     series: kubernetes
   keystone:
     charm: osm-keystone
-    channel: latest/stable
+    channel: latest/beta
     scale: 1
     resources:
       keystone-image: opensourcemano/keystone:testing-daily
index 4d0777e..8637329 100644 (file)
@@ -62,7 +62,6 @@ applications:
   nbi:
     charm: osm-nbi
     channel: latest/beta
-    series: focal
     trust: true
     scale: 1
     options:
@@ -73,7 +72,6 @@ applications:
   ro:
     charm: osm-ro
     channel: latest/beta
-    series: focal
     trust: true
     scale: 1
     options:
@@ -83,7 +81,6 @@ applications:
   ng-ui:
     charm: osm-ng-ui
     channel: latest/beta
-    series: focal
     trust: true
     scale: 1
     resources:
@@ -91,7 +88,6 @@ applications:
   lcm:
     charm: osm-lcm
     channel: latest/beta
-    series: focal
     scale: 1
     options:
       database-commonkey: osm
@@ -101,7 +97,6 @@ applications:
   mon:
     charm: osm-mon
     channel: latest/beta
-    series: focal
     trust: true
     scale: 1
     options:
@@ -113,7 +108,6 @@ applications:
   pol:
     charm: osm-pol
     channel: latest/beta
-    series: focal
     scale: 1
     options:
       log-level: DEBUG
@@ -122,7 +116,6 @@ applications:
   vca:
     charm: osm-vca-integrator
     channel: latest/beta
-    series: focal
     scale: 1
   ingress:
     charm: nginx-ingress-integrator
@@ -144,7 +137,7 @@ applications:
     series: kubernetes
   keystone:
     charm: osm-keystone
-    channel: latest/stable
+    channel: latest/beta
     scale: 1
     resources:
       keystone-image: opensourcemano/keystone:testing-daily
index 28c9c89..d4fd8b9 100644 (file)
@@ -74,5 +74,5 @@ juju add-model dev
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
 juju deploy ./osm-lcm_ubuntu-22.04-amd64.charm \
-    --resource lcm-image=opensourcemano/lcm:testing-daily
+    --resource lcm-image=opensourcemano/lcm:testing-daily --series jammy
 ```
index 2f54294..f5e3ff3 100644 (file)
@@ -23,10 +23,10 @@ type: charm
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 
 parts:
   charm:
index a991339..00bb260 100644 (file)
@@ -51,18 +51,18 @@ APPS = [KAFKA_APP, MONGO_DB_APP, ZOOKEEPER_APP, RO_APP, LCM_APP]
 async def test_lcm_is_deployed(ops_test: OpsTest):
     charm = await ops_test.build_charm(".")
     resources = {"lcm-image": METADATA["resources"]["lcm-image"]["upstream-source"]}
-    ro_deploy_cmd = f"juju deploy {RO_CHARM} {RO_APP} --resource ro-image=opensourcemano/ro:testing-daily --channel=latest/beta --series=focal"
+    ro_deploy_cmd = f"juju deploy {RO_CHARM} {RO_APP} --resource ro-image=opensourcemano/ro:testing-daily --channel=latest/beta --series=jammy"
 
     await asyncio.gather(
         ops_test.model.deploy(
-            charm, resources=resources, application_name=LCM_APP, series="focal"
+            charm, resources=resources, application_name=LCM_APP, series="jammy"
         ),
         # RO charm has to be deployed differently since
         # bug https://github.com/juju/python-libjuju/issues/822
         # deploys different charms wrt cli
         ops_test.run(*shlex.split(ro_deploy_cmd), check=True),
         ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
     )
 
@@ -77,11 +77,15 @@ async def test_lcm_is_deployed(ops_test: OpsTest):
 
     logger.info("Adding relations for other components")
     await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
-    await ops_test.model.add_relation(RO_APP, MONGO_DB_APP)
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(RO_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(RO_APP, KAFKA_APP)
 
-    logger.info("Adding relations")
-    await ops_test.model.add_relation(LCM_APP, MONGO_DB_APP)
+    logger.info("Adding relations for LCM")
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(LCM_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(LCM_APP, KAFKA_APP)
     await ops_test.model.add_relation(LCM_APP, RO_APP)
 
@@ -179,7 +183,9 @@ async def test_lcm_action_debug_mode_enabled(ops_test: OpsTest):
 @pytest.mark.abort_on_fail
 async def test_lcm_integration_vca(ops_test: OpsTest):
     await asyncio.gather(
-        ops_test.model.deploy(VCA_CHARM, application_name=VCA_APP, channel="beta"),
+        ops_test.model.deploy(
+            VCA_CHARM, application_name=VCA_APP, channel="latest/beta", series="jammy"
+        ),
     )
     async with ops_test.fast_forward():
         await ops_test.model.wait_for_idle(
index 901f715..1ade9b3 100644 (file)
@@ -73,6 +73,6 @@ juju add-model dev
 # Enable DEBUG logging
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
-juju deploy ./osm-mon_ubuntu-20.04-amd64.charm \
-    --resource mon-image=opensourcemano/mon:testing-daily
+juju deploy ./osm-mon_ubuntu-22.04-amd64.charm \
+    --resource mon-image=opensourcemano/mon:testing-daily --series jammy
 ```
index 2f54294..f5e3ff3 100644 (file)
@@ -23,10 +23,10 @@ type: charm
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 
 parts:
   charm:
index c5807e9..caf8ded 100644 (file)
@@ -58,15 +58,16 @@ async def test_mon_is_deployed(ops_test: OpsTest):
 
     await asyncio.gather(
         ops_test.model.deploy(
-            charm, resources=resources, application_name=MON_APP, series="focal"
+            charm, resources=resources, application_name=MON_APP, series="jammy"
         ),
         ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
         ops_test.model.deploy(MARIADB_CHARM, application_name=MARIADB_APP, channel="stable"),
         ops_test.model.deploy(PROMETHEUS_CHARM, application_name=PROMETHEUS_APP, channel="stable"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
     )
-    cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image=opensourcemano/keystone:12"
+    keystone_image = "opensourcemano/keystone:testing-daily"
+    cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image={keystone_image} --channel=latest/beta --series jammy"
     await ops_test.run(*shlex.split(cmd), check=True)
 
     async with ops_test.fast_forward():
@@ -81,8 +82,10 @@ async def test_mon_is_deployed(ops_test: OpsTest):
     await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
     await ops_test.model.add_relation(MARIADB_APP, KEYSTONE_APP)
 
-    logger.info("Adding relations")
-    await ops_test.model.add_relation(MON_APP, MONGO_DB_APP)
+    logger.info("Adding relations for MON")
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(MON_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(MON_APP, KAFKA_APP)
     await ops_test.model.add_relation(MON_APP, KEYSTONE_APP)
     await ops_test.model.add_relation(MON_APP, PROMETHEUS_APP)
@@ -179,7 +182,9 @@ async def test_mon_action_debug_mode_enabled(ops_test: OpsTest):
 @pytest.mark.abort_on_fail
 async def test_mon_integration_vca(ops_test: OpsTest):
     await asyncio.gather(
-        ops_test.model.deploy(VCA_CHARM, application_name=VCA_APP, channel="beta"),
+        ops_test.model.deploy(
+            VCA_CHARM, application_name=VCA_APP, channel="latest/beta", series="jammy"
+        ),
     )
     async with ops_test.fast_forward():
         await ops_test.model.wait_for_idle(
index cbaef1f..c59b970 100644 (file)
@@ -73,6 +73,6 @@ juju add-model dev
 # Enable DEBUG logging
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
-juju deploy ./osm-nbi_ubuntu-20.04-amd64.charm \
-    --resource nbi-image=opensourcemano/nbi:testing-daily
+juju deploy ./osm-nbi_ubuntu-22.04-amd64.charm \
+    --resource nbi-image=opensourcemano/nbi:testing-daily --series jammy
 ```
index 8395be9..3fce6d0 100644 (file)
@@ -23,14 +23,14 @@ type: charm
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 
 parts:
   charm:
     build-packages:
       - git
     prime:
-      - files/*
\ No newline at end of file
+      - files/*
index a714638..8555175 100644 (file)
@@ -58,10 +58,10 @@ async def test_nbi_is_deployed(ops_test: OpsTest):
 
     await asyncio.gather(
         ops_test.model.deploy(
-            charm, resources=resources, application_name=NBI_APP, series="focal"
+            charm, resources=resources, application_name=NBI_APP, series="jammy"
         ),
         ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
         ops_test.model.deploy(MARIADB_CHARM, application_name=MARIADB_APP, channel="stable"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
         ops_test.model.deploy(PROMETHEUS_CHARM, application_name=PROMETHEUS_APP, channel="stable"),
@@ -69,7 +69,8 @@ async def test_nbi_is_deployed(ops_test: OpsTest):
     # Keystone charm has to be deployed differently since
     # bug https://github.com/juju/python-libjuju/issues/766
     # prevents setting correctly the resources
-    cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image=opensourcemano/keystone:12"
+    keystone_image = "opensourcemano/keystone:testing-daily"
+    cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image={keystone_image} --channel=latest/beta --series jammy"
     await ops_test.run(*shlex.split(cmd), check=True)
 
     async with ops_test.fast_forward():
@@ -84,8 +85,10 @@ async def test_nbi_is_deployed(ops_test: OpsTest):
     await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
     await ops_test.model.add_relation(MARIADB_APP, KEYSTONE_APP)
 
-    logger.info("Adding relations")
-    await ops_test.model.add_relation(NBI_APP, MONGO_DB_APP)
+    logger.info("Adding relations for NBI")
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(NBI_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(NBI_APP, KAFKA_APP)
     await ops_test.model.add_relation(NBI_APP, PROMETHEUS_APP)
     await ops_test.model.add_relation(NBI_APP, KEYSTONE_APP)
@@ -181,9 +184,12 @@ async def test_nbi_action_debug_mode_enabled(ops_test: OpsTest):
 
 @pytest.mark.abort_on_fail
 async def test_nbi_integration_ingress(ops_test: OpsTest):
-    await asyncio.gather(
-        ops_test.model.deploy(INGRESS_CHARM, application_name=INGRESS_APP, channel="beta"),
-    )
+    # Temporal workaround due to python-libjuju 2.9.42.2 bug fixed in
+    # https://github.com/juju/python-libjuju/pull/854
+    # To be replaced when juju version 2.9.43 is used.
+    cmd = f"juju deploy {INGRESS_CHARM} {INGRESS_APP} --channel stable"
+    await ops_test.run(*shlex.split(cmd), check=True)
+
     async with ops_test.fast_forward():
         await ops_test.model.wait_for_idle(
             apps=APPS + [INGRESS_APP],
index c08f76a..8a91a44 100644 (file)
@@ -73,6 +73,6 @@ juju add-model dev
 # Enable DEBUG logging
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
-juju deploy ./osm-ng-ui_ubuntu-20.04-amd64.charm \
-    --resource ng-ui-image=opensourcemano/ng-ui:testing-daily
+juju deploy ./osm-ng-ui_ubuntu-22.04-amd64.charm \
+    --resource ng-ui-image=opensourcemano/ng-ui:testing-daily --series jammy
 ```
index 25ff590..072529c 100644 (file)
@@ -23,10 +23,10 @@ type: charm
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 
 parts:
   charm:
index b9aa910..3f87078 100644 (file)
@@ -70,20 +70,19 @@ ALL_APPS = [
 async def test_ng_ui_is_deployed(ops_test: OpsTest):
     ng_ui_charm = await ops_test.build_charm(".")
     ng_ui_resources = {"ng-ui-image": METADATA["resources"]["ng-ui-image"]["upstream-source"]}
-    keystone_deploy_cmd = f"juju deploy -m {ops_test.model_full_name} {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image=opensourcemano/keystone:testing-daily"
+    keystone_image = "opensourcemano/keystone:testing-daily"
+    keystone_deploy_cmd = f"juju deploy -m {ops_test.model_full_name} {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image={keystone_image} --channel=latest/beta --series jammy"
 
     await asyncio.gather(
         ops_test.model.deploy(
-            ng_ui_charm, resources=ng_ui_resources, application_name=NG_UI_APP, series="focal"
-        ),
-        ops_test.model.deploy(NBI_CHARM, application_name=NBI_APP, channel="beta"),
-        ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(
-            MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="latest/stable"
+            ng_ui_charm, resources=ng_ui_resources, application_name=NG_UI_APP, series="jammy"
         ),
         ops_test.model.deploy(
-            PROMETHEUS_CHARM, application_name=PROMETHEUS_APP, channel="latest/edge"
+            NBI_CHARM, application_name=NBI_APP, channel="latest/beta", series="jammy"
         ),
+        ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
+        ops_test.model.deploy(PROMETHEUS_CHARM, application_name=PROMETHEUS_APP, channel="stable"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
         ops_test.model.deploy(MYSQL_CHARM, application_name=MYSQL_APP, channel="stable"),
         # Keystone is deployed separately because the juju python library has a bug where resources
@@ -99,7 +98,7 @@ async def test_ng_ui_is_deployed(ops_test: OpsTest):
         ops_test.model.relate(KAFKA_APP, ZOOKEEPER_APP),
         ops_test.model.relate(KEYSTONE_APP, NBI_APP),
         ops_test.model.relate(KAFKA_APP, NBI_APP),
-        ops_test.model.relate(MONGO_DB_APP, NBI_APP),
+        ops_test.model.relate("{}:mongodb".format(NBI_APP), "{}:database".format(MONGO_DB_APP)),
         ops_test.model.relate(PROMETHEUS_APP, NBI_APP),
     )
 
@@ -110,7 +109,7 @@ async def test_ng_ui_is_deployed(ops_test: OpsTest):
     unit = ops_test.model.applications[NG_UI_APP].units[0]
     assert unit.workload_status_message == "need nbi relation"
 
-    logger.info("Adding relations")
+    logger.info("Adding relations for NG-UI")
     await ops_test.model.relate(NG_UI_APP, NBI_APP)
 
     async with ops_test.fast_forward():
@@ -144,9 +143,12 @@ async def test_ng_ui_blocks_without_relation(ops_test: OpsTest):
 
 @pytest.mark.abort_on_fail
 async def test_ng_ui_integration_ingress(ops_test: OpsTest):
-    await asyncio.gather(
-        ops_test.model.deploy(INGRESS_CHARM, application_name=INGRESS_APP, channel="beta"),
-    )
+    # Temporal workaround due to python-libjuju 2.9.42.2 bug fixed in
+    # https://github.com/juju/python-libjuju/pull/854
+    # To be replaced when juju version 2.9.43 is used.
+    cmd = f"juju deploy {INGRESS_CHARM} {INGRESS_APP} --channel stable"
+    await ops_test.run(*shlex.split(cmd), check=True)
+
     async with ops_test.fast_forward():
         await ops_test.model.wait_for_idle(apps=ALL_APPS + [INGRESS_APP])
 
index 9281180..4bbbeea 100644 (file)
@@ -74,5 +74,5 @@ juju add-model dev
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
 juju deploy ./osm-pol_ubuntu-22.04-amd64.charm \
-    --resource pol-image=opensourcemano/pol:testing-daily
+    --resource pol-image=opensourcemano/pol:testing-daily --series jammy
 ```
index 2f54294..f5e3ff3 100644 (file)
@@ -23,10 +23,10 @@ type: charm
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 
 parts:
   charm:
index 87132d1..9210000 100644 (file)
@@ -51,10 +51,10 @@ async def test_pol_is_deployed(ops_test: OpsTest):
 
     await asyncio.gather(
         ops_test.model.deploy(
-            charm, resources=resources, application_name=POL_APP, series="focal"
+            charm, resources=resources, application_name=POL_APP, series="jammy"
         ),
         ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
         ops_test.model.deploy(MARIADB_CHARM, application_name=MARIADB_APP, channel="stable"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
     )
@@ -70,9 +70,11 @@ async def test_pol_is_deployed(ops_test: OpsTest):
     logger.info("Adding relations for other components")
     await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
 
-    logger.info("Adding relations")
+    logger.info("Adding relations for POL")
     await ops_test.model.add_relation(POL_APP, KAFKA_APP)
-    await ops_test.model.add_relation(POL_APP, MONGO_DB_APP)
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(POL_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(POL_APP, MARIADB_APP)
 
     async with ops_test.fast_forward():
index d0495f6..61f2a0a 100644 (file)
@@ -74,5 +74,5 @@ juju add-model dev
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
 juju deploy ./osm-ro_ubuntu-22.04-amd64.charm \
-    --resource ro-image=opensourcemano/ro:testing-daily
+    --resource ro-image=opensourcemano/ro:testing-daily --series jammy
 ```
index 2f54294..f5e3ff3 100644 (file)
@@ -23,10 +23,10 @@ type: charm
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 
 parts:
   charm:
index 38dc40f..38e9ad9 100644 (file)
@@ -48,10 +48,10 @@ async def test_ro_is_deployed(ops_test: OpsTest):
     resources = {"ro-image": METADATA["resources"]["ro-image"]["upstream-source"]}
 
     await asyncio.gather(
-        ops_test.model.deploy(charm, resources=resources, application_name=RO_APP),
+        ops_test.model.deploy(charm, resources=resources, application_name=RO_APP, series="jammy"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
         ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
     )
 
     async with ops_test.fast_forward():
@@ -65,7 +65,9 @@ async def test_ro_is_deployed(ops_test: OpsTest):
 
     logger.info("Adding relations")
     await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
-    await ops_test.model.add_relation(RO_APP, MONGO_DB_APP)
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(RO_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(RO_APP, KAFKA_APP)
 
     async with ops_test.fast_forward():
index 94fc303..32a5d04 100644 (file)
@@ -69,6 +69,6 @@ juju add-model test-osm-vca-integrator
 # Enable DEBUG logging
 juju model-config logging-config="<root>=INFO;unit=DEBUG"
 # Deploy the charm
-juju deploy ./osm-vca-integrator_ubuntu-20.04-amd64.charm
+juju deploy ./osm-vca-integrator_ubuntu-22.04-amd64.charm --series jammy
 ```
 
index 95d0e96..199e221 100644 (file)
@@ -19,12 +19,12 @@ type: "charm"
 bases:
   - build-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
     run-on:
       - name: "ubuntu"
-        channel: "20.04"
+        channel: "22.04"
 parts:
   charm:
     charm-binary-python-packages: [cryptography, bcrypt]
     build-packages:
-      - libffi-dev
\ No newline at end of file
+      - libffi-dev
index 394386e..8d69e7b 100644 (file)
@@ -67,7 +67,7 @@ async def test_build_and_deploy(ops_test: OpsTest):
     Assert on the unit status before any relations/configurations take place.
     """
     charm = await ops_test.build_charm(".")
-    await ops_test.model.deploy(charm, application_name=VCA_APP)
+    await ops_test.model.deploy(charm, application_name=VCA_APP, series="jammy")
     async with ops_test.fast_forward():
         await ops_test.model.wait_for_idle(
             apps=[VCA_APP],
@@ -98,8 +98,8 @@ async def test_vca_configuration(ops_test: OpsTest):
 
 @pytest.mark.abort_on_fail
 async def test_vca_integration_lcm(ops_test: OpsTest):
-    lcm_deploy_cmd = f"juju deploy {LCM_CHARM} {LCM_APP} --resource lcm-image=opensourcemano/lcm:testing-daily --channel=latest/beta --series=focal"
-    ro_deploy_cmd = f"juju deploy {RO_CHARM} {RO_APP} --resource ro-image=opensourcemano/ro:testing-daily --channel=latest/beta --series=focal"
+    lcm_deploy_cmd = f"juju deploy {LCM_CHARM} {LCM_APP} --resource lcm-image=opensourcemano/lcm:testing-daily --channel=latest/beta --series=jammy"
+    ro_deploy_cmd = f"juju deploy {RO_CHARM} {RO_APP} --resource ro-image=opensourcemano/ro:testing-daily --channel=latest/beta --series=jammy"
 
     await asyncio.gather(
         # LCM and RO charms have to be deployed differently since
@@ -108,7 +108,7 @@ async def test_vca_integration_lcm(ops_test: OpsTest):
         ops_test.run(*shlex.split(lcm_deploy_cmd), check=True),
         ops_test.run(*shlex.split(ro_deploy_cmd), check=True),
         ops_test.model.deploy(KAFKA_CHARM, application_name=KAFKA_APP, channel="stable"),
-        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="edge"),
+        ops_test.model.deploy(MONGO_DB_CHARM, application_name=MONGO_DB_APP, channel="5/edge"),
         ops_test.model.deploy(ZOOKEEPER_CHARM, application_name=ZOOKEEPER_APP, channel="stable"),
     )
     async with ops_test.fast_forward():
@@ -120,10 +120,14 @@ async def test_vca_integration_lcm(ops_test: OpsTest):
         await ops_test.model.wait_for_idle(apps=[MONGO_DB_APP], status="active")
     logger.info("Adding relations")
     await ops_test.model.add_relation(KAFKA_APP, ZOOKEEPER_APP)
-    await ops_test.model.add_relation(RO_APP, MONGO_DB_APP)
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(RO_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(RO_APP, KAFKA_APP)
     # LCM specific
-    await ops_test.model.add_relation(LCM_APP, MONGO_DB_APP)
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(LCM_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(LCM_APP, KAFKA_APP)
     await ops_test.model.add_relation(LCM_APP, RO_APP)
 
@@ -144,8 +148,9 @@ async def test_vca_integration_lcm(ops_test: OpsTest):
 
 @pytest.mark.abort_on_fail
 async def test_vca_integration_mon(ops_test: OpsTest):
-    keystone_deploy_cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image=opensourcemano/keystone:testing-daily"
-    mon_deploy_cmd = f"juju deploy {MON_CHARM} {MON_APP} --resource mon-image=opensourcemano/mon:testing-daily --channel=latest/beta --series=focal"
+    keystone_image = "opensourcemano/keystone:testing-daily"
+    keystone_deploy_cmd = f"juju deploy {KEYSTONE_CHARM} {KEYSTONE_APP} --resource keystone-image={keystone_image} --channel=latest/beta --series jammy"
+    mon_deploy_cmd = f"juju deploy {MON_CHARM} {MON_APP} --resource mon-image=opensourcemano/mon:testing-daily --channel=latest/beta --series=jammy"
     await asyncio.gather(
         # MON charm has to be deployed differently since
         # bug https://github.com/juju/python-libjuju/issues/820
@@ -166,7 +171,9 @@ async def test_vca_integration_mon(ops_test: OpsTest):
     logger.info("Adding relations")
     await ops_test.model.add_relation(MARIADB_APP, KEYSTONE_APP)
     # MON specific
-    await ops_test.model.add_relation(MON_APP, MONGO_DB_APP)
+    await ops_test.model.add_relation(
+        "{}:mongodb".format(MON_APP), "{}:database".format(MONGO_DB_APP)
+    )
     await ops_test.model.add_relation(MON_APP, KAFKA_APP)
     await ops_test.model.add_relation(MON_APP, KEYSTONE_APP)
     await ops_test.model.add_relation(MON_APP, PROMETHEUS_APP)