From: Patricia Reinoso Date: Fri, 12 May 2023 09:04:10 +0000 (+0000) Subject: Build jammy charms for osm X-Git-Tag: release-v14.0-start~42 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F13379%2F13;p=osm%2Fdevops.git Build jammy charms for osm 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 --- diff --git a/installers/charm/bundles/osm-ha/bundle.yaml b/installers/charm/bundles/osm-ha/bundle.yaml index dde4ade9..96a2ff37 100644 --- a/installers/charm/bundles/osm-ha/bundle.yaml +++ b/installers/charm/bundles/osm-ha/bundle.yaml @@ -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 diff --git a/installers/charm/bundles/osm/bundle.yaml b/installers/charm/bundles/osm/bundle.yaml index 4d0777ec..86373292 100644 --- a/installers/charm/bundles/osm/bundle.yaml +++ b/installers/charm/bundles/osm/bundle.yaml @@ -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 diff --git a/installers/charm/osm-lcm/CONTRIBUTING.md b/installers/charm/osm-lcm/CONTRIBUTING.md index 28c9c896..d4fd8b99 100644 --- a/installers/charm/osm-lcm/CONTRIBUTING.md +++ b/installers/charm/osm-lcm/CONTRIBUTING.md @@ -74,5 +74,5 @@ juju add-model dev juju model-config logging-config="=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 ``` diff --git a/installers/charm/osm-lcm/charmcraft.yaml b/installers/charm/osm-lcm/charmcraft.yaml index 2f542942..f5e3ff37 100644 --- a/installers/charm/osm-lcm/charmcraft.yaml +++ b/installers/charm/osm-lcm/charmcraft.yaml @@ -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: diff --git a/installers/charm/osm-lcm/tests/integration/test_charm.py b/installers/charm/osm-lcm/tests/integration/test_charm.py index a9913390..00bb2603 100644 --- a/installers/charm/osm-lcm/tests/integration/test_charm.py +++ b/installers/charm/osm-lcm/tests/integration/test_charm.py @@ -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( diff --git a/installers/charm/osm-mon/CONTRIBUTING.md b/installers/charm/osm-mon/CONTRIBUTING.md index 901f7157..1ade9b30 100644 --- a/installers/charm/osm-mon/CONTRIBUTING.md +++ b/installers/charm/osm-mon/CONTRIBUTING.md @@ -73,6 +73,6 @@ juju add-model dev # Enable DEBUG logging juju model-config logging-config="=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 ``` diff --git a/installers/charm/osm-mon/charmcraft.yaml b/installers/charm/osm-mon/charmcraft.yaml index 2f542942..f5e3ff37 100644 --- a/installers/charm/osm-mon/charmcraft.yaml +++ b/installers/charm/osm-mon/charmcraft.yaml @@ -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: diff --git a/installers/charm/osm-mon/tests/integration/test_charm.py b/installers/charm/osm-mon/tests/integration/test_charm.py index c5807e9a..caf8deda 100644 --- a/installers/charm/osm-mon/tests/integration/test_charm.py +++ b/installers/charm/osm-mon/tests/integration/test_charm.py @@ -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( diff --git a/installers/charm/osm-nbi/CONTRIBUTING.md b/installers/charm/osm-nbi/CONTRIBUTING.md index cbaef1fc..c59b9703 100644 --- a/installers/charm/osm-nbi/CONTRIBUTING.md +++ b/installers/charm/osm-nbi/CONTRIBUTING.md @@ -73,6 +73,6 @@ juju add-model dev # Enable DEBUG logging juju model-config logging-config="=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 ``` diff --git a/installers/charm/osm-nbi/charmcraft.yaml b/installers/charm/osm-nbi/charmcraft.yaml index 8395be9f..3fce6d04 100644 --- a/installers/charm/osm-nbi/charmcraft.yaml +++ b/installers/charm/osm-nbi/charmcraft.yaml @@ -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/* diff --git a/installers/charm/osm-nbi/tests/integration/test_charm.py b/installers/charm/osm-nbi/tests/integration/test_charm.py index a7146383..85551758 100644 --- a/installers/charm/osm-nbi/tests/integration/test_charm.py +++ b/installers/charm/osm-nbi/tests/integration/test_charm.py @@ -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], diff --git a/installers/charm/osm-ng-ui/CONTRIBUTING.md b/installers/charm/osm-ng-ui/CONTRIBUTING.md index c08f76ae..8a91a44c 100644 --- a/installers/charm/osm-ng-ui/CONTRIBUTING.md +++ b/installers/charm/osm-ng-ui/CONTRIBUTING.md @@ -73,6 +73,6 @@ juju add-model dev # Enable DEBUG logging juju model-config logging-config="=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 ``` diff --git a/installers/charm/osm-ng-ui/charmcraft.yaml b/installers/charm/osm-ng-ui/charmcraft.yaml index 25ff5906..072529c6 100644 --- a/installers/charm/osm-ng-ui/charmcraft.yaml +++ b/installers/charm/osm-ng-ui/charmcraft.yaml @@ -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: diff --git a/installers/charm/osm-ng-ui/tests/integration/test_charm.py b/installers/charm/osm-ng-ui/tests/integration/test_charm.py index b9aa9101..3f87078f 100644 --- a/installers/charm/osm-ng-ui/tests/integration/test_charm.py +++ b/installers/charm/osm-ng-ui/tests/integration/test_charm.py @@ -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]) diff --git a/installers/charm/osm-pol/CONTRIBUTING.md b/installers/charm/osm-pol/CONTRIBUTING.md index 92811802..4bbbeeae 100644 --- a/installers/charm/osm-pol/CONTRIBUTING.md +++ b/installers/charm/osm-pol/CONTRIBUTING.md @@ -74,5 +74,5 @@ juju add-model dev juju model-config logging-config="=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 ``` diff --git a/installers/charm/osm-pol/charmcraft.yaml b/installers/charm/osm-pol/charmcraft.yaml index 2f542942..f5e3ff37 100644 --- a/installers/charm/osm-pol/charmcraft.yaml +++ b/installers/charm/osm-pol/charmcraft.yaml @@ -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: diff --git a/installers/charm/osm-pol/tests/integration/test_charm.py b/installers/charm/osm-pol/tests/integration/test_charm.py index 87132d1d..92100006 100644 --- a/installers/charm/osm-pol/tests/integration/test_charm.py +++ b/installers/charm/osm-pol/tests/integration/test_charm.py @@ -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(): diff --git a/installers/charm/osm-ro/CONTRIBUTING.md b/installers/charm/osm-ro/CONTRIBUTING.md index d0495f6b..61f2a0a5 100644 --- a/installers/charm/osm-ro/CONTRIBUTING.md +++ b/installers/charm/osm-ro/CONTRIBUTING.md @@ -74,5 +74,5 @@ juju add-model dev juju model-config logging-config="=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 ``` diff --git a/installers/charm/osm-ro/charmcraft.yaml b/installers/charm/osm-ro/charmcraft.yaml index 2f542942..f5e3ff37 100644 --- a/installers/charm/osm-ro/charmcraft.yaml +++ b/installers/charm/osm-ro/charmcraft.yaml @@ -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: diff --git a/installers/charm/osm-ro/tests/integration/test_charm.py b/installers/charm/osm-ro/tests/integration/test_charm.py index 38dc40f9..38e9ad9a 100644 --- a/installers/charm/osm-ro/tests/integration/test_charm.py +++ b/installers/charm/osm-ro/tests/integration/test_charm.py @@ -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(): diff --git a/installers/charm/vca-integrator-operator/CONTRIBUTING.md b/installers/charm/vca-integrator-operator/CONTRIBUTING.md index 94fc3039..32a5d04f 100644 --- a/installers/charm/vca-integrator-operator/CONTRIBUTING.md +++ b/installers/charm/vca-integrator-operator/CONTRIBUTING.md @@ -69,6 +69,6 @@ juju add-model test-osm-vca-integrator # Enable DEBUG logging juju model-config logging-config="=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 ``` diff --git a/installers/charm/vca-integrator-operator/charmcraft.yaml b/installers/charm/vca-integrator-operator/charmcraft.yaml index 95d0e96d..199e221d 100644 --- a/installers/charm/vca-integrator-operator/charmcraft.yaml +++ b/installers/charm/vca-integrator-operator/charmcraft.yaml @@ -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 diff --git a/installers/charm/vca-integrator-operator/tests/integration/test_charm.py b/installers/charm/vca-integrator-operator/tests/integration/test_charm.py index 394386e3..8d69e7b0 100644 --- a/installers/charm/vca-integrator-operator/tests/integration/test_charm.py +++ b/installers/charm/vca-integrator-operator/tests/integration/test_charm.py @@ -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)