Wednesday, August 06, 2008

Evaluation and Development Packages

Hello Cluster users,

I have put together a set of evaluation and development packages that allows you to install a MySQL Cluster on "localhost" in a matter of seconds (ok, a minute is more realistic). If you want a fully distributed setup, please use the configuration tool.

The packages comes in four sizes (tiny, small, medium, large) and deploys a cluster consisting of:
  • 1 management server
  • 2 data nodes
  • 2 mysql servers
All installed on localhost. Of course, you also get a set of scripts to manage your cluster!

Check it out on http://www.severalnines.com/eval/
Download a package and follow the instructions below (tested on Linux):

To install and start MySQL Cluster 6.2:

tar xvfz mysqlcluster-62.tgz
cd mysqlcluster-62
cd scripts
## Download the latest MySQL Cluster 6.2 or use wget..
## Distribute the binary to "localhost" in this case
bash dist.sh mysql-cluster-gpl-6.2.15-linux-i686-glibc23.tar.gz
## Copy config files, install mysql servers (no processes are started yet)
bash bootstrap.sh
(bash stop-cluster.sh #i recommend this to get rid of any running mysql or cluster nodes)
## Start the cluster
bash start-cluster-initial.sh
## Start a mysql client to mysql server 1
bash mysqlclient1.sh
## In another terminal, start a mysql client to mysql server 2
bash mysqlclient2.sh


To install and start MySQL Cluster 6.3:

tar xvfz mysqlcluster-63.tgz
cd mysqlcluster-63
cd scripts
## Download the latest 6.3 src and compile it.
bash download-and-compile.sh
## Distribute the binary to "localhost" in this case
bash dist.sh
## Copy config files, install mysql servers (no processes are started yet)
bash bootstrap.sh
(bash stop-cluster.sh #i recommend this to get rid of any running mysql or cluster nodes)
## Start the cluster
bash start-cluster-initial.sh
## Start a mysql client to mysql server 1
bash mysqlclient1.sh
## In another terminal, start a mysql client to mysql server 2
bash mysqlclient2.sh

Testing the setup
In one terminal, we call it term1:

bash mysqlclient1.sh


In another terminal, we call it term2:

bash mysqlclient2.sh


In term1:

mysql> use test;
mysql> create table t1 ( a integer primary key, b integer) engine=ndb;
mysql> insert into t1 values(1,1);


In term2:

mysql> use test;
mysql> select * from t1;



Another script to launch the management client:

bash ndb_mgm.sh
ndb_mgm> all report mem

There are also other scripts to take backups, conduct rolling restarts etc.

Good luck. Future examples will be based on the infrastructure provided by severalnines.com.

1 comment:

Santo Leto said...

Hi!

You did an excellent work. I tested it on Ubuntu.

The following is a list of issues. Hope it helps.

1) In my archive [I chosen a tiny conf.], I got some errors in config files and bootstrap.sh due to //

/home/sleto/data/mysqlcluster//mysql_1

It hasn't been difficult to fix those errors: I edited the files.

I suggest you to add in the Config tool a remark for this issue near "This is where MySQL Cluster binaries will be installed." and "This is where the data nodes and MySQL Servers will put their filesystem".

2) parse error in config.ini at line 17 (Could not parse name-value pair in config file.)

SharedGlobalMemory=
24M

--> SharedGlobalMemory=24M

3) You may add a readme file in the archive, with the same instructions as in the email.


Cluster up and running in few mins. Thank you!