{"id":18806698,"url":"https://github.com/lefred/percona-cluster","last_synced_at":"2025-04-13T19:13:12.196Z","repository":{"id":2223763,"uuid":"3174622","full_name":"lefred/percona-cluster","owner":"lefred","description":"Percona XtraDB Cluster test","archived":false,"fork":false,"pushed_at":"2014-02-07T14:47:25.000Z","size":390,"stargazers_count":32,"open_issues_count":1,"forks_count":13,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-27T09:52:06.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.percona.com/software/percona-xtradb-cluster/","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefred.png","metadata":{"files":{"readme":"Readme.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-13T21:48:11.000Z","updated_at":"2024-01-09T05:05:16.000Z","dependencies_parsed_at":"2022-07-31T12:08:01.693Z","dependency_job_id":null,"html_url":"https://github.com/lefred/percona-cluster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fpercona-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fpercona-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fpercona-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fpercona-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefred","download_url":"https://codeload.github.com/lefred/percona-cluster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766746,"owners_count":21158301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T22:49:20.925Z","updated_at":"2025-04-13T19:13:12.172Z","avatar_url":"https://github.com/lefred.png","language":"Puppet","funding_links":[],"categories":[],"sub_categories":[],"readme":"Percona XtraDB Cluster : Vagrant \u0026 pupppet recipes\n**************************************************\n\nThis 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 \nVirtualBox. \n\nThe puppet code illustrates the latest improvement of PXC since version 5.5.31-23.7.5 \n(http://www.percona.com/doc/percona-xtradb-cluster/release-notes/Percona-XtraDB-Cluster-5.5.31-23.7.5.html):\n\n* bootstrap the cluster \n* use extended Xtrabackup features during SST\n\nPuppet recipes can also be used without Vagrant\n\n\nRequirements\n============\n\nYou need : \n\n* 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)\n* VirtualBox - https://www.virtualbox.org/\n* a working Vagrant environment - http://vagrantup.com/\n* an Internet connection for the VM's\n \nIf you don't have a Centos 6 base box, you can download mine at https://dl.dropboxusercontent.com/u/11697684/centos63.box\nThis box includes puppet, firewall is disabled and has a nice motd ;)\n\nHow to use it ?\n===============\n\nOnce you have your requirements ready, it's very easy to deploy your boxes:: \n\n   $ git clone https://github.com/lefred/percona-cluster.git\n   $ cd percona-cluster\n   $ vagrant up \n\nThis will deploy the 3 machines: percona1, percona2 and percona3.\n\nAnd this is all !\n\nThese recipes also install GLB (Galera Load Balancer) on percona1.\n\nYou can read more on shinguz's post : http://www.fromdual.com/mysql-and-galera-load-balancer\n\n.. 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.\n\n\nDetails about the new functionalities\n=====================================\n\nbootstrap the cluster\n---------------------\n\nSince PXC 5.5.31, it's now possible to bootstrap the cluster (http://www.percona.com/doc/percona-xtradb-cluster/manual/bootstrap.html) using\n*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: \n http://www.mysqlperformanceblog.com/2013/01/29/how-to-start-a-percona-xtradb-cluster/\n \nWith this puppet code, we define in *site.pp* the node we want to use to bootstrap the cluster (percona1 in this case)::\n\n   class {\n         'percona::cluster':\n            bootstrap =\u003e True\n   }\n\nIf you use these puppet recipes in production, I recommend you to set *bootstrap* to **True** only when needed.\n\nSST integration with Xtrabackup 2.1\n-----------------------------------\n\nSince PXC 5.5.31 it's alo possible to use the new xbstream options for Xtrabackup.\n\nIn the current environment, SST is performed by Xtrabackup in 2 parallel threads and compressed. (It's also possible to crypt it).\n\nTo 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*)::\n\n   [sst]\n   streamfmt=xbstream\n   \n   [xtrabackup]\n   compress\n   compact\n   parallel=2\n   compress-threads=2\n   rebuild-threads=2\n    \nBut 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\nhttps://bugs.launchpad.net/percona-xtrabackup/+bug/1193240).\n\nThere are 2 puppet classes performing these actions:\n\n* class qpress \n* class percona::cluster::xbstream \n\nThis is what you should see in mysql's error log if it worked as expected::\nOO\n   WSREP_SST: [INFO] Streaming with xbstream (20130627 13:05:20.991)\n   WSREP_SST: [INFO] xbstream requires manual cleanup of data directory before SST - lp:1193240 (20130627 13:05:20.998)\n   ...\n   WSREP_SST: [INFO] Proceeding with SST (20130627 13:05:54.335)\n   WSREP_SST: [INFO] Removing existing ib_logfile files (20130627 13:05:54.340)\n   WSREP_SST: [INFO] Index compaction detected (20130627 13:05:54.348)\n   WSREP_SST: [INFO] Rebuilding with 2 threads (20130627 13:05:54.356)\n   WSREP_SST: [INFO] Compressed qpress files found (20130627 13:05:54.364)\n   WSREP_SST: [INFO] Removing existing ibdata1 file (20130627 13:05:54.370)\n   WSREP_SST: [INFO] Decompression with 1 threads (20130627 13:05:54.375)\n   \n\nHow to setup the environment\n============================\n\nThese are the step to run to be able to setup everything you need.\n\nVirtualBox\n----------\n\nOn RedHat/CentOS/Fedora...\n\n::\n\n   # yum install virtualbox\n\nOn Ubuntu/Debian\n\n::\n\n   # apt-get install virtualbox\n\n\nVagrant\n-------\n\nI use Ruby gem to install Vagrant::\n\n   # gem install vagrant\n  \nImport the base box\n...................\n\n::\n\n   # wget https://dl.dropboxusercontent.com/u/11697684/centos63.box\n   # vagrant box add centos63 centos63.box   \n   # rm centos63.box (if you don't need a copy)\n   \n   ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fpercona-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefred%2Fpercona-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fpercona-cluster/lists"}