Update readme with Juju 3 compatible commands

Add Juju 3 compatible commands to the README.

Change-Id: I221a2c09d1d56809e3ffe75ac42bae9502389a79
This commit is contained in:
Billy Olsen 2024-02-26 16:16:09 -07:00
parent 253c24011d
commit a4599fba13

View File

@ -29,10 +29,18 @@ machines '0', '1', and '2':
A cloud application is joined to the database via an instance of mysql-router.
For a pre-existing keystone application:
For Juju 2.x:
juju deploy mysql-router keystone-mysql-router
juju add-relation keystone-mysql-router:db-router mysql-innodb-cluster:db-router
juju add-relation keystone-mysql-router:shared-db keystone:shared-db
For Juju 3.x:
juju deploy mysql-router keystone-mysql-router
juju integrate keystone-mysql-router:db-router mysql-innodb-cluster:db-router
juju integrate keystone-mysql-router:shared-db keystone:shared-db
> **Important**: When network spaces are used, the mysql-router and
mysql-innodb-cluster charms must be configured such that the 'db-router'
endpoint is bound to the same space.
@ -45,10 +53,17 @@ Charms Deployment Guide][cdg] for more deploy information.
Passwords are automatically generated and stored by the application leader.
The root password required to use the `mysql` or `mysqlsh` utilities locally on the
units can be retrieved using the following command:
units can be retrieved from the leader unit. This command varies slightly between
Juju 2.x and Juju 3.x versions.
For Juju 2.x:
juju run --unit mysql-innodb-cluster/leader leader-get mysql.passwd
For Juju 3.x:
juju exec --unit mysql-innodb-cluster/leader leader-get mysql.passwd
## TLS
TLS communication between MySQL InnoDB Cluster and its cloud clients is
@ -57,8 +72,14 @@ itself. However, a better option is to use a certificate signed by a
Vault-based CA. This can be done once Vault has been initialised and has a root
CA:
For Juju 2.x:
juju add-relation mysql-innodb-cluster:certificates vault:certificates
For Juju 3.x:
juju integrate mysql-innodb-cluster:certificates vault:certificates
See the [vault][vault-charm-readme] charm README for more information.
## Adding a unit on a new subnet
@ -67,9 +88,16 @@ When adding a unit to an already formed cluster, and where that unit resides on
a subnet different from any existing unit, the following extra actions are
needed:
For Juju 2.x:
juju run-action --wait mysql-innodb-cluster/leader update-unit-acls
juju run-action --wait mysql-innodb-cluster/leader add-instance address=<address of new unit>
For Juju 3.x:
juju run --wait mysql-innodb-cluster/leader update-unit-acls
juju run --wait mysql-innodb-cluster/leader add-instance address=<address of new unit>
## Actions
This section lists Juju [actions][juju-docs-actions] supported by the charm.