All Projects → lefred → Percona Cluster

lefred / Percona Cluster

Percona XtraDB Cluster test

Labels

Projects that are alternatives of or similar to Percona Cluster

Puppet Bro
Puppet module to manage Bro NSM
Stars: ✭ 11 (-65.62%)
Mutual labels:  puppet
Puppet Ansible
Deploy Ansible with puppet
Stars: ✭ 14 (-56.25%)
Mutual labels:  puppet
Fuel Plugin Neutron Lbaas
Fuel plugin for LBaaS for Neutron
Stars: ✭ 30 (-6.25%)
Mutual labels:  puppet
Monarch
Rule over hierarchical data!
Stars: ✭ 12 (-62.5%)
Mutual labels:  puppet
Fuel Plugin Detach Rabbitmq
MOVED: now at https://opendev.org/x/fuel-plugin-detach-rabbitmq
Stars: ✭ 14 (-56.25%)
Mutual labels:  puppet
Puppet Project config
MOVED: Now at https://opendev.org/opendev/puppet-project_config
Stars: ✭ 20 (-37.5%)
Mutual labels:  puppet
Puppet Cloudwatchlogs
Puppet module for configuring AWS Cloudwatch Logs on Amazon Linux, Ubuntu, Red Hat & CentOS EC2 instances.
Stars: ✭ 11 (-65.62%)
Mutual labels:  puppet
Puppet Openldap
LDAP Configuration Management Module for Puppet
Stars: ✭ 30 (-6.25%)
Mutual labels:  puppet
Puppet Autossh
MOVED: now at https://opendev.org/x/puppet-autossh
Stars: ✭ 14 (-56.25%)
Mutual labels:  puppet
Puppet Windowsfeature
Library that uses ServerAdministration api that comes with Windows Server 2008 and Windows Server 2012 to add / remove windows features
Stars: ✭ 29 (-9.37%)
Mutual labels:  puppet
Runyer
Stars: ✭ 12 (-62.5%)
Mutual labels:  puppet
Puppet Syncthing
Syncthing module for Puppet
Stars: ✭ 13 (-59.37%)
Mutual labels:  puppet
Puppet Gerritbot
MOVED: Now at https://opendev.org/opendev/puppet-gerritbot
Stars: ✭ 20 (-37.5%)
Mutual labels:  puppet
Puppet Django
a puppet module for deploying django - pythonbrew - supervisor - gunicorn install
Stars: ✭ 11 (-65.62%)
Mutual labels:  puppet
Puppet Puppetexplorer
Puppet module for installing Puppet Explorer
Stars: ✭ 30 (-6.25%)
Mutual labels:  puppet
Puppet Phpbrew
Puppet module for phpbrew.
Stars: ✭ 11 (-65.62%)
Mutual labels:  puppet
Puppetlabs Debbuilder
Module to build a debian package builder
Stars: ✭ 14 (-56.25%)
Mutual labels:  puppet
Web development vm how to
Instructions and scripts to quickly set up development and production environments for PHP, Nginx, and MySQL based infrastructure.
Stars: ✭ 31 (-3.12%)
Mutual labels:  puppet
Puppet Wordpress
Puppet module to set up an instance of wordpress
Stars: ✭ 30 (-6.25%)
Mutual labels:  puppet
Awaseroot
http://awaseroot.wordpress.com
Stars: ✭ 28 (-12.5%)
Mutual labels:  puppet

Percona XtraDB Cluster : Vagrant & pupppet recipes


This Vagrant setup can be used to deploy and test Percona XtraDB Cluster (Percona Server with Galera - http://www.percona.com/software/percona-xtradb-cluster) in VirtualBox.

The puppet code illustrates the latest improvement of PXC since version 5.5.31-23.7.5 (http://www.percona.com/doc/percona-xtradb-cluster/release-notes/Percona-XtraDB-Cluster-5.5.31-23.7.5.html):

  • bootstrap the cluster
  • use extended Xtrabackup features during SST

Puppet recipes can also be used without Vagrant

Requirements

You need :

  • a Centos 6 x86_64 box to use with Vagrant. (64 bit is mandatory if you use compression for xtrabackup stream, and you don't want to compile qpress by yourself)
  • VirtualBox - https://www.virtualbox.org/
  • a working Vagrant environment - http://vagrantup.com/
  • an Internet connection for the VM's

If you don't have a Centos 6 base box, you can download mine at https://dl.dropboxusercontent.com/u/11697684/centos63.box This box includes puppet, firewall is disabled and has a nice motd ;)

How to use it ?

Once you have your requirements ready, it's very easy to deploy your boxes::

$ git clone https://github.com/lefred/percona-cluster.git $ cd percona-cluster $ vagrant up

This will deploy the 3 machines: percona1, percona2 and percona3.

And this is all !

These recipes also install GLB (Galera Load Balancer) on percona1.

You can read more on shinguz's post : http://www.fromdual.com/mysql-and-galera-load-balancer

.. note:: Starting MySQL on percona2 and percona3 takes a lot of time as the sleep delay of the init script has been increased during SST.

Details about the new functionalities

bootstrap the cluster

Since PXC 5.5.31, it's now possible to bootstrap the cluster (http://www.percona.com/doc/percona-xtradb-cluster/manual/bootstrap.html) using bootstrap-pxc instead of start as command for the init script. Read this for more information related on how it had to be done before: http://www.mysqlperformanceblog.com/2013/01/29/how-to-start-a-percona-xtradb-cluster/

With this puppet code, we define in site.pp the node we want to use to bootstrap the cluster (percona1 in this case)::

class { 'percona::cluster': bootstrap => True }

If you use these puppet recipes in production, I recommend you to set bootstrap to True only when needed.

SST integration with Xtrabackup 2.1

Since PXC 5.5.31 it's alo possible to use the new xbstream options for Xtrabackup.

In the current environment, SST is performed by Xtrabackup in 2 parallel threads and compressed. (It's also possible to crypt it).

To achieve that, some easy additions to my.cnf are needed. So this is what I added in the template (modules/percona/templates/cluster/my.cnf.erb)::

[sst] streamfmt=xbstream

[xtrabackup] compress compact parallel=2 compress-threads=2 rebuild-threads=2

But it is also mandatory to have qpress (http://www.quicklz.com/) installed and the MySQL datadir must be empty (which is currently very boring, see https://bugs.launchpad.net/percona-xtrabackup/+bug/1193240).

There are 2 puppet classes performing these actions:

  • class qpress
  • class percona::cluster::xbstream

This is what you should see in mysql's error log if it worked as expected:: OO WSREP_SST: [INFO] Streaming with xbstream (20130627 13:05:20.991) WSREP_SST: [INFO] xbstream requires manual cleanup of data directory before SST - lp:1193240 (20130627 13:05:20.998) ... WSREP_SST: [INFO] Proceeding with SST (20130627 13:05:54.335) WSREP_SST: [INFO] Removing existing ib_logfile files (20130627 13:05:54.340) WSREP_SST: [INFO] Index compaction detected (20130627 13:05:54.348) WSREP_SST: [INFO] Rebuilding with 2 threads (20130627 13:05:54.356) WSREP_SST: [INFO] Compressed qpress files found (20130627 13:05:54.364) WSREP_SST: [INFO] Removing existing ibdata1 file (20130627 13:05:54.370) WSREP_SST: [INFO] Decompression with 1 threads (20130627 13:05:54.375)

How to setup the environment

These are the step to run to be able to setup everything you need.

VirtualBox

On RedHat/CentOS/Fedora...

::

yum install virtualbox

On Ubuntu/Debian

::

apt-get install virtualbox

Vagrant

I use Ruby gem to install Vagrant::

gem install vagrant

Import the base box ...................

::

wget https://dl.dropboxusercontent.com/u/11697684/centos63.box

vagrant box add centos63 centos63.box

rm centos63.box (if you don't need a copy)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].