MysqlInstallation¶
-
class
playback.mysql_installation.
MysqlInstallation
(user='ubuntu', hosts=None, key_filename=None, password=None, parallel=True, *args, **kwargs)¶ Bases:
playback.common.Common
Install Galera Cluster for MySQL
Parameters: - user(str) – the user for remote server to login
- hosts(list) – this is a second param
- key_filename(str) – the ssh private key to used, default None
- password(str) – the password for remote server
- parallel(bool) – paralleler execute on remote server, default True
Returns: None
Examples: # create mysql installation isinstance mysql = MysqlInstallation( user='ubuntu', hosts=['controller1', 'controller2'] ) # add mariadb galera cluster if xenial, galera cluster for mysql if trusty mysql.enable_repo() # install mysql ha on controller1 and controller2 mysql.install()
-
enable_repo
()¶ Setup repository for trusty only
Returns: None
-
install
()¶ Install Galera Cluster for MySQL if trusty, install MariaDB Galera Cluster if xenial
Returns: None