Testing Percona XtraDB Cluster 8.0 with DBdeployer

testing Percona XtraDB Cluster DBdeployerIn the light of support for Percona XtraDB Cluster (PXC), the DBdeployer anniversary, and the newly released Percona XtraDB Cluster 8.0, I’m happy to announce that Giuseppe Maxia has recently updated DBdeployer to support Percona XtraDB Cluster 8.0.

We at Percona, with my colleague Ramesh Sivaraman, have tested and deployed Percona XtraDB Cluster (PXC) 8.0.18  successfully using DBdeployer.

What is DBdeployer and How Do You Install it?

It’s an open source tool to test and deploy multiple MySQL topologies in a single host using different ports. It allows DBAs and developers to quickly launch and test certain functionalities, syntax, and features. It’s a critical tool to launch MySQL instances with minimum resources.

Here’s a quick rundown of DBdeployer:

DBdeployer use case with PXC-8.0

OS: Ubuntu Xenial

Note: Be sure to check your system and make sure that the packages are installed which Percona XtraDB Cluster 8.0 depends on.

Please select Linux Generic packages if you are downloading PXC from the web:

Configure a Single Node Percona XtraDB Cluster

The following command will help you to set up a single node cluster.

Before moving on to multi-node cluster, remove the single-node cluster.

Configure 3 Node Percona XtraDB Cluster

Testing and Verification

There are several pre-set scripts under this deployment. We can start with testing replication status for this cluster.

Also following $HOME/sandboxes/pxc_msb_pxc8_0_18/n[1-3] scripts will help to login to the respective PXC node.

You can also check the node status using the following command:

Sample functionality test script:

To restart cluster nodes use the following script:

How to Use DBdeployer to Automate Tests

Each node also has a script called metadata. Check the help of that command and you’ll find the available arguments.

We also have JSON files for each node to provide integration to third party software.

You may use a global script to execute SQL against all nodes. This is particularly good for monitoring variables among nodes.

Conclusion

As we can see, DBdeployer is a very handful tool to verify version differences in behavior as well as changes to default settings among versions. You can deploy multiple, replication, and single sandbox deployments using different tar-balls. You may run automation using existing scripts or bundle with other tools like ProxySQL, Sysbench, and Orchestrator to mimic your production use cases. 

In conclusion, this tool has already shown us one simple difference between 5.7 and 8.0 PXC cluster default setups (there are several changes in defaults). The initial deployment of 5.7 was faster ~40 seconds  – versus what 8.0 was taking ~80 seconds – due to initial State Snapshot Transfer (SST) using ‘rsync’  as the default method for 5.7 versus ‘xtrabackup’ in 8.0. You can find the results here


Percona XtraDB Cluster is a cost-effective and robust clustering solution created to support your business-critical data. It gives you the benefits and features of MySQL along with the added enterprise features of Percona Server for MySQL.

Download Percona XtraDB Cluster Datasheet

Share this post

Leave a Reply