Charm used to update the OSM databases during an OSM upgrade process. To be used you should have an instance of OSM running that you may want to upgrade
juju add-model update-db juju deploy osm-update-db-operator --series focal
Set MongoDB and MySQL URIs:
juju config osm-update-db-operator mysql-uri=<mysql_uri> juju config osm-update-db-operator mongodb-uri=<mongodb_uri>
In case we want to update both databases, we need to run the following command:
juju run-action osm-update-db-operator/0 update-db current-version=<Number_of_current_version> target-version=<Number_of_target_version> # Example: juju run-action osm-update-db-operator/0 update-db current-version=9 target-version=10
In case only you just want to update MongoDB, then we can use a flag 'mongodb-only=True':
juju run-action osm-update-db-operator/0 update-db current-version=9 target-version=10 mongodb-only=True
In case only you just want to update MySQL database, then we can use a flag 'mysql-only=True':
juju run-action osm-update-db-operator/0 update-db current-version=9 target-version=10 mysql-only=True
You can check if the update of the database was properly done checking the result of the command:
juju show-action-output <Number_of_the_action>
Updates de database to apply the changes needed to fix a bug. You need to specify the bug number. Example:
juju run-action osm-update-db-operator/0 apply-patch bug-number=1837
Please see the Juju SDK docs for guidelines on enhancements to this charm following best practice guidelines, and CONTRIBUTING.md for developer guidance.