From b2035745fc4d4e7ecd1474d12256eaa4cb02e29c Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Thu, 11 Aug 2016 14:14:07 +0300 Subject: [PATCH] Fix and clean up CDC documentation The CDC_users.md document was not linked to and was in the wrong place. It should reside in the protocol directory since it relates to the CDC protocol. --- Documentation/Documentation-Contents.md | 7 ++++ Documentation/Protocols/CDC.md | 4 ++- Documentation/Protocols/CDC_users.md | 36 ++++++++++++++++++++ Documentation/Reference/CDC_users.md | 45 ------------------------- Documentation/Routers/Avrorouter.md | 2 +- 5 files changed, 47 insertions(+), 47 deletions(-) create mode 100644 Documentation/Protocols/CDC_users.md delete mode 100644 Documentation/Reference/CDC_users.md diff --git a/Documentation/Documentation-Contents.md b/Documentation/Documentation-Contents.md index 0979b4e72..993c347cd 100644 --- a/Documentation/Documentation-Contents.md +++ b/Documentation/Documentation-Contents.md @@ -98,6 +98,13 @@ Module specific documentation. - [Multi-Master Monitor](Monitors/MM-Monitor.md) - [MySQL Cluster Monitor](Monitors/NDB-Cluster-Monitor.md) +## Protocols + +Documentation for MaxScale protocol modules. + + - [Change Data Capture (CDC) Protocol](Protocols/CDC.md) + - [Change Data Capture (CDC) Users](Protocols/CDC_users.md) + ## Utilities - [RabbitMQ Consumer Client](Filters/RabbitMQ-Consumer-Client.md) diff --git a/Documentation/Protocols/CDC.md b/Documentation/Protocols/CDC.md index 9f33eb62b..45cbe26f4 100644 --- a/Documentation/Protocols/CDC.md +++ b/Documentation/Protocols/CDC.md @@ -1,4 +1,4 @@ -#CDC Protocol +# Change Data Capture (CDC) Protocol CDC is a new protocol that allows compatible clients to authenticate and register for Change Data Capture events. The new protocol must be use in @@ -23,6 +23,8 @@ passwd=maxpwd If the `cdcusers` file cannot be found, the service user (_maxuser:maxpwd_ in the example) can be used to connect through the CDC protocol. +For more details, refer to the [CDC users documentation](CDC_users.md). + ## Protocol Phases ### Connection and Authentication diff --git a/Documentation/Protocols/CDC_users.md b/Documentation/Protocols/CDC_users.md new file mode 100644 index 000000000..bd9b25eec --- /dev/null +++ b/Documentation/Protocols/CDC_users.md @@ -0,0 +1,36 @@ +# Change Data Capture (CDC) users + +Change Data Capture (CDC) is a new MaxScale protocol that allows compatible +clients to authenticate and register for Change Data Capture events. The new +protocol must be use in conjunction with AVRO router which currently converts +MySQL binlog events into AVRO records. Clients connect to CDC listener and +authenticate using credentials provided in a format described in the [CDC Protocol documentation](CDC.md). + +**Note**: If no users are found in that file or if it doesn't exist, the only + available user will be the _service user_: + +``` +[avro-service] +type=service +router=avrorouter +source=replication-service +user=cdc_user +password=cdc_password +``` + +## Creating new CDC users + +``` +bash$ cdc_users [-h] USER PASSWORD +``` + +The output of this command should be appended to the _cdcusers_ file at +`/var/lib/maxscale//`. + +``` +bash$ cdc_users user1 pass1 >> /var/lib/maxscale/avro-service/cdcusers +``` + +Users can be deleted by removing the related rows in 'cdcusers' file. For +more details on the format of the _cdcusers_ file, read the [CDC Protocol documentation](CDC.md). + diff --git a/Documentation/Reference/CDC_users.md b/Documentation/Reference/CDC_users.md deleted file mode 100644 index 230dba011..000000000 --- a/Documentation/Reference/CDC_users.md +++ /dev/null @@ -1,45 +0,0 @@ -#Change Data Capture users - -CDC is a the new MaxScale protocol that allows compatible clients to authenticate and -register for Change Data Capture events. -The new protocol must be use in -conjunction with AVRO router which currently converts MySQL binlog events into -AVRO records. - - -Clients connect to CDC listener and try authentication using credentials such as username and password. - -Users could be created by adding an entry into the 'cdcusers' file that should be available in /$datadir/$service_name/ - -Example file location is:```/var/lib/maxscale/CDC_service/cdcusers``` - -**Note**: If no users are found in that file or if it doesn't exist, the only available user will be the ```service user```, if specified in service section: - -###The Avro conversion service -``` -[avro-service] -type=service -router=avrorouter -source=replication-service -## default service user -#user=cdc_user -#password=cdc_password -``` - -###How to create CDC users - -``` -bash$ cdc_users [-h] USER PASSWORD -``` - -The output of this command should be appended to ```/var/lib/maxscale//cdcusers``` - -``` -bash$ cdc_users user1 pass1 >> /var/lib/maxscale/avro-service/cdcusers -``` - -**Note:** New users will be loaded into MaxScale at the first authentication attempt. - -Users could be removed by deleting the related rows in 'cdcusers' file. - diff --git a/Documentation/Routers/Avrorouter.md b/Documentation/Routers/Avrorouter.md index 806f9f961..bc79731f7 100644 --- a/Documentation/Routers/Avrorouter.md +++ b/Documentation/Routers/Avrorouter.md @@ -159,7 +159,7 @@ avrorouter. Before using this client, you will need to install the Python 3 interpreter and add users to the service with the _cdc_users_ script. Fore more details about the user creation, please refer to the [CDC Protocol](../Protocols/CDC.md) -documentation. +and [CDC Users](../Protocols/CDC_users.md) documentation. Read the output of `cdc --help` for a full list of supported options and a short usage description of the client program.