@@ -0,0 +1,691 @@
+from fabric.api import *%0D%0A%0D%0A%0D%0Aclass MysqlManage(object):%0D%0A    %22%22%22Manage Galera Cluster for MySQL%22%22%22%0D%0A%0D%0A    def __init__(self, user, hosts, parallel=True):%0D%0A        self.user = user%0D%0A        self.hosts = hosts%0D%0A        self.parallel = parallel%0D%0A        env.user = self.user%0D%0A        env.hosts = self.hosts%0D%0A        env.parallel = self.parallel%0D%0A%0D%0A    @serial%0D%0A    def _start_wsrep_new_cluster(self):%0D%0A        sudo('service mysql start --wsrep-new-cluster')%0D%0A%0D%0A    def _start_mysql(self):%0D%0A        sudo('service mysql start')%0D%0A%0D%0A    def _stop_mysql(self):%0D%0A        sudo('service mysql stop')%0D%0A%0D%0A    def _change_root_password(self, pwd):%0D%0A        sudo('mysqladmin -uroot password %25s' %25 pwd)%0D%0A%0D%0A

Add MySQL HA