charm-mysql-router/src
Peter Matulis 9cc7f6f13a Review README
Small review of README

  Add Documentation section

  Minor changes

  Fix a bug by adding an admonishment

Also synced tox/pip boilerplate in order to include:
* https://github.com/openstack-charmers/release-tools/pull/156
* https://github.com/openstack-charmers/release-tools/pull/157

Closes-Bug: #1881171
Change-Id: I405e8f2692be76695ac3f57a7618deae98e45225
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
2021-09-27 11:08:50 +02:00
..
actions Use systemd to start/stop mysqlrouter 2020-01-07 16:16:11 -08:00
files Release sync for 20.08 2020-07-27 20:55:09 +01:00
lib Merge "Ensure update config function can handle new headers" 2021-07-22 17:14:06 +00:00
reactive Implement validated restart on change 2021-03-04 18:53:41 -08:00
templates Configure /run/mysql location for PID file 2021-06-14 15:43:10 +01:00
tests Use an actual instantiation of mysql-router 2021-06-09 11:27:22 -07:00
HACKING.md Upstream charm 2019-10-17 09:41:43 -07:00
README.md Review README 2021-09-27 11:08:50 +02:00
actions.yaml Use systemd to start/stop mysqlrouter 2020-01-07 16:16:11 -08:00
config.yaml Implement validated restart on change 2021-03-04 18:53:41 -08:00
icon.svg Required files 2019-10-04 14:12:47 -07:00
layer.yaml Upstream charm 2019-10-17 09:41:43 -07:00
metadata.yaml Add impish to metadata.yaml 2021-06-15 12:07:09 +00:00
test-requirements.txt Sync release-tools 2021-07-22 14:57:24 +02:00
tox.ini Review README 2021-09-27 11:08:50 +02:00
wheelhouse.txt Pin Tenacity 2021-07-16 16:17:08 -07:00

README.md

Overview

The mysql-router charm provides a MySQL 8 Router; it proxies database requests from a principle application to a MySQL 8 InnoDB Cluster. MySQL Router handles cluster communication and understands the cluster schema.

It is a subordinate charm that is used in conjunction with the mysql-innodb-cluster charm. It is also used with a principle charm that supports the 'mysql-shared' interface. The current list of such charms can be obtained from the Charm Store (the charms officially supported by the OpenStack Charms project are published by 'openstack-charmers').

Important: The eoan series is the first series supported by the mysql-innodb-cluster and mysql-router charms. These charms replace the percona-cluster charm starting with the focal series.

Usage

The charm is deployed as a subordinate to a principle application and then related to the central mysql-innodb-cluster application:

principle charm A <---> mysql-router A <--->
principle charm B <---> mysql-router B <---> mysql-innodb-cluster
principle charm C <---> mysql-router C <--->

Configuration

See file config.yaml for the full list of configuration options, along with their descriptions and default values.

Deployment

To deploy a MySQL 8 Router for joining, say, Keystone to the cloud database:

juju deploy mysql-router keystone-mysql-router

Note: The mysql-router application is typically given a name that corresponds to the associated principle application.

Add a relation to the principle application (via the shared-db endpoint):

juju add-relation keystone:shared-db keystone-mysql-router:shared-db

Then add a relation to the mysql-innodb-cluster application (via the db-router endpoint):

juju add-relation keystone-msyql-router:db-router mysql-innodb-cluster:db-router

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.

Scale out is accomplished by adding units to the principle application:

juju add-unit keystone

Note: If more than one mysql-router application is placed on the same machine the base-port configuration option is needed to ensure non-conflicting TCP port numbers are used (the default is '3306').

Actions

This section lists Juju actions supported by the charm. Actions allow specific operations to be performed on a per-unit basis. To display action descriptions run juju actions --schema mysql-router. If the charm is not deployed then see file actions.yaml.

  • stop-mysqlrouter
  • start-mysqlrouter
  • restart-mysqlrouter

Documentation

The OpenStack Charms project maintains two documentation guides:

Bugs

Please report bugs on Launchpad.