March 2013

Vagrant box with Severalnines database cluster deployment scripts

< class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-teaser">

Prerequisites

General

Using Vagrant's Multi-VM environment makes launching several VMs to form a cluster painless and it's easy to quickly start playing with the various database clusters and our Severalnines's ClusterControl in a contained environment.

NOTE: The vagrant box file's size is 390MB and can take some time to download.
(Mar/14): ClusterControl 1.2.5, MySQL Cluster 7.3, Percona XtraDB Cluster 5.6, Codership 5.6, MongoDB 2.4.x
(May/13): MySQL Cluster 7.2.12, Codership Galera 5.5.29(Source distribution, wsrep_23.7.3.r3853), Percona XtraDB Cluster 5.5.30-30.2(Percona Server (GPL), Release 30.2, wsrep_23.7.4.r3843), Mongodb 2.4.x

This vagrant box comes with a set of Severalnines's database cluster deployment scripts to bootstrap the following:

  • 3 node Galera Cluster for MySQL (Codership and Percona builds).
  • 4 node MySQL Cluster. 2 SQL nodes, 2 MGM nodes and 2 Data nodes.
  • 1 sharded MongoDB Cluster with config servers and routers on 3 hosts.

Tags: 

Bootstrap Galera Cluster for MySQL

< class="field field-name-body field-type-text-with-summary field-label-hidden view-mode-teaser">

The script is available at github. Only tested with Ubuntu 12.04 and RHEL 6.3.

$ git clone git@github.com:alyu/dbtools.git
$ cd dbtools/galera
$ ./bootstrap-galera.sh
!! Running this Galera bootstrap will wipe out any current MySQL installation that you have on your hosts !!
Continue? (Y/n):
Download Galera packages (Y/n):
What is your OS on your DB nodes [ubuntu|redhat]: (ubuntu)
Galera MySQL tarball (https://launchpad.net/codership-mysql/5.5/5.5.28-23.7/+download/mysql-5.5.28_wsrep_23.7-linux-x86_64.tar.gz): 
Galera wsrep library (https://launchpad.net/galera/2.x/23.2.2/+download/galera-23.2.2-amd64.deb): 
Downloading packages...
Generate install scripts (Y/n):
MySQL install dir (/usr/local):
MySQL data dir (/var/lib/mysql):
InnoDB buffer pools size (1G):
InnoDB log file size (1G):
Where are your Galera hosts () [ip1 ip2 ... ipN]: 10.0.3.140 10.0.3.150 10.0.3.160
Name your Galera Cluster (my_galera_cluster):
SST method [rsync|xtrabackup] (rsync):
Writeset slaves/parallel replication (1):
Generate tarball (Y/n):
SSH user (alex):
SSH pub key (/home/alex/.ssh/id_rsa.pub):
SSH port (22):
Creating tarball...
Deploy Galera (Y/n):
*** Bootstraping  10.0.3.140...
*** Installing Galera wsrep provider
Killing any MySQL server running...
...
Do you want to secure your Galera cluster (y/N): y
Enter a new MySQL root password: root123
Securing MySQL...
Galera Cluster for MySQL installed...
Done..0h:1m:52s

Tags: