Tuesday, August 23, 2011

MySQL Clusters on Amazon EC2 - verified AMIs

We regularly receive questions from our user community with regards to which AMIs to use when deploying database clusters on Amazon EC2.

As part of our ongoing development work on the Severalnines Configurator and ClusterControl, we have recently done some testing on deploying MySQL Cluster on EC2 using Severalnines on three different AMIs. We thought we should share the results of these tests, hence the reason for this week's blog!

If you would like to test such a deployment yourself, feel free to use the parameters and guidelines below to do so. You can also check out these new videos to see Severalnines technology in action prior to getting started with your testing.

These are the three AMIs that we have tested the deployment on so as to have a good representative mix:

* RightImage_CentOS_5.4_x64_v5.5.9
* Amazon QuickStart AMI: amzn-ami-2011.02.1.x86_64-ebs
* Canonical AMI: ubuntu-maverick-5g-64bit

Of course, it would be great to hear from you on how your testing went and on what AMIs you are currently using yourself. Feel free to share your feedback with us on Facebook, Twitter, LinkedIn or leave a comment on this blog.

Here are the parameters that you can use to test your MySQL Cluster deployment using the Severalnines Configurator.

In all cases, the Internal IP was used as the Hostname in the Configurator and the following was used for all tests:

* Instance type: m1.larg
* Number of instances: 5 (1 for ClusterControl), 2 for data nodes, 2 for MySQL servers and management servers.

RightImage_CentOS_5.4_x64_v5.5.9 (ami-0f42a966)

* Cloud Provider [Configurator]: Amazon EC2
* OS user [Configurator]: root
* Operating System [Configurator]: Redhat/Fedora/Centos/Oracle
* Data directories [Configurator]: /mnt/data/mysqlcluster for data nodes and management servers and /mnt/data/mysql (for the mysql servers) both RPM and tar.gz installation was tested using 'deploy.sh'

Canonical AMI: ubuntu-maverick-5g-64bit (ami-ac41b7c5)

* Cloud Provider [Configurator]: Amazon EC2
* OS user [Configurator]: ubuntu
* Operating System [Configurator]: Ubuntu/Debian
* DataMemory [Configurator]: 512MB
Set it down in the Configurator - yes, it is tiny, but the default disk in this AMI is tiny, so you should add a 20GB EBS Volume if you want to test with the default suggested DataMemory
* Data directories [Configurator]: default suggested ones.
* Installation was tested using 'deploy.sh'

Amazon QuickStart AMI: amzn-ami-2011.02.1.x86_64-ebs (ami-8e1fece7)


* Cloud Provider [Configurator]: Amazon EC2
* OS user [Configurator]: ec2-user
* Operating System [Configurator]: Redhat/Fedora/Centos/Oracle
* DataMemory [Configurator]: 512MB
Set it down in the Confgurator. Yes, it is tiny, but the default disk in this AMI is tiny, so you should add a 20GB EBS Volume if you want to test with the default suggested DataMemory.
* Data directories [Configurator]: default suggested ones.
* .tar.gz installation using 'deploy.sh' no problems.
* RPM installation - dependency problems with libmysqlclient.so.16 vs libmysqlclient.so.14.
This can be fixed by editing the mysqlcluster-71-rpm/cluster/scripts/install/install-rpm.sh before running 'deploy.sh':
Change this, in the function named install_rpm_cmonmysql() :
MySQL-Cluster-gpl-shared-compat-${version}-1.${rhel}.${arch}.rpm
to
MySQL-Cluster-gpl-shared-${version}-1.${rhel}.${arch}.rpm
Now you can run ./deploy.sh

Finally, do not forget to set the EC2 Keypair in the Configurator and upload it to the ClusterControl server before running deploy.sh.

You should now be up and running with your MySQL Cluster on EC2; if you have any questions or comments, please do let us know. We welcome your feedback on Facebook, Twitter, LinkedIn or directly on this blog.

For more information on AMIs: http://aws.amazon.com/amis/
For more information on EC2: http://aws.amazon.com/ec2/

1 comment:

xvrsfrnssks said...

Hi Johan,

Can i ask for detail instructions (with commands) in deploying mysql cluster on ec2? I am a beginner on this.

Thank you.