ha-mode: true
mongodb:
charm: mongodb-k8s
- channel: latest/edge
+ channel: 5/edge
scale: 3
series: kubernetes
storage:
series: kubernetes
keystone:
charm: osm-keystone
- channel: latest/stable
+ channel: latest/beta
scale: 1
resources:
keystone-image: opensourcemano/keystone:testing-daily
nbi:
charm: osm-nbi
channel: latest/beta
- series: focal
trust: true
scale: 1
options:
ro:
charm: osm-ro
channel: latest/beta
- series: focal
trust: true
scale: 1
options:
ng-ui:
charm: osm-ng-ui
channel: latest/beta
- series: focal
trust: true
scale: 1
resources:
lcm:
charm: osm-lcm
channel: latest/beta
- series: focal
scale: 1
options:
database-commonkey: osm
mon:
charm: osm-mon
channel: latest/beta
- series: focal
trust: true
scale: 1
options:
pol:
charm: osm-pol
channel: latest/beta
- series: focal
scale: 1
options:
log-level: DEBUG
vca:
charm: osm-vca-integrator
channel: latest/beta
- series: focal
scale: 1
ingress:
charm: nginx-ingress-integrator
series: kubernetes
keystone:
charm: osm-keystone
- channel: latest/stable
+ channel: latest/beta
scale: 1
resources:
keystone-image: opensourcemano/keystone:testing-daily
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
```
bases:
- build-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
run-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
parts:
charm:
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"),
)
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)
@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(
# 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
```
bases:
- build-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
run-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
parts:
charm:
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():
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)
@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(
# 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
```
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/*
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"),
# 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():
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)
@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],
# 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
```
bases:
- build-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
run-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
parts:
charm:
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
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),
)
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():
@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])
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
```
bases:
- build-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
run-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
parts:
charm:
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"),
)
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():
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
```
bases:
- build-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
run-on:
- name: "ubuntu"
- channel: "20.04"
+ channel: "22.04"
parts:
charm:
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():
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():
# 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
```
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
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],
@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
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():
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)
@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
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)