Hello, > Can anyone share how they configure MySQL for this kind of thing using > puppet given that multiple servers may be replicating different > databases and all servers require a unique ID?
This all boils down to each host having different options in it's my.cnf file. There is an official augeas lens for editing mysql's my.cnf file since a couple of days (not in any release yet). If this can be of any help, I used this code for a basic "1 master-1 slave" setup on a few projects: class mysql::master inherits mysql::server { augeas { "my.cnf/replication": context => "/files/etc/my.cnf/mysqld/", changes => [ "set log-bin mysql-bin", "set server-id ${mysql_serverid}", "set expire_logs_days 7", "set max_binlog_size 100M" ], } } class mysql::slave inherits mysql::master { augeas { "my.cnf/slave-replication": context => "/files/etc/my.cnf/mysqld/", changes => [ "set relay-log /var/lib/mysql/mysql-relay-bin", "set relay-log-index /var/lib/mysql/mysql-relay-bin.index", "set relay-log-info-file /var/lib/mysql/relay-log.info", "set relay_log_space_limit 2048M", "set max_relay_log_size 100M", "set master-host ${mysql_masterhost}", "set master-user ${mysql_masteruser}", "set master-password ${mysql_masterpw}", "set report-host ${hostname}" ], } } I used a home-brew augeas lens though. I'm not sure the paths are exactly the same with the official one. Cheers, Marc -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.