Package starcluster :: Package plugins :: Module mysql :: Class MysqlCluster
[hide private]
[frames] | no frames]

Class MysqlCluster

source code



This plugin configures a mysql cluster on StarCluster
Author: Marc Resnick

Steps for mysql-cluster to work:
1. mkdir -p /var/lib/mysql-cluster/backup
2. chown -R mysql:mysql /var/lib/mysql-cluster/
3. generate ndb-mgmd for master
4. generate my.cnf for data nodes
5. /etc/init.d/mysql-ndb-mgm restart on master
6. pkill -9 mysql on data nodes
7. /etc/init.d/mysql start on data nodes
8. /etc/init.d/mysql-ndb restart on data nodes

Correction to above, do this:
1. define plugin section in config named mysql
2. start cluster mysql (will fail)
3. starcluster runplugin mysql mysql

Instance Methods [hide private]
 
__init__(self, num_replicas, data_memory, index_memory, dump_file, dump_interval, dedicated_query, num_data_nodes)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_install_mysql_cluster(self, node) source code
 
_backup_and_reset(self, node) source code
 
_write_my_cnf(self, node) source code
 
run(self, nodes, master, user, user_shell, volumes)
Start cluster configuration
source code
 
generate_ndb_mgmd(self) source code
 
generate_my_cnf(self) source code
 
generate_mysqldump_crontab(self, path) source code

Inherited from clustersetup.DefaultClusterSetup: on_add_node, on_remove_node

Inherited from clustersetup.ClusterSetup: on_restart, on_shutdown

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from clustersetup.DefaultClusterSetup: nodes, pool, running_nodes

Inherited from object: __class__

Method Details [hide private]

__init__(self, num_replicas, data_memory, index_memory, dump_file, dump_interval, dedicated_query, num_data_nodes)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

run(self, nodes, master, user, user_shell, volumes)

source code 

Start cluster configuration

Overrides: clustersetup.ClusterSetup.run
(inherited documentation)