The database resource is used by Undine to represent a single Percona Server database. This may represent a pristine database, or one imported via a local database dump.
Optionally, the declaration may also declare include a remote source for the database, in which case it will be retrieved via mysqldump over SSH. To ensure that the database will not be inadvertently clobbered during provisioning, it will only be retrieved when the local database defined in db_name is empty (SHOW TABLES returns an empty set).
Creates a new database called "mysite_db" with the latin1 character set, using the latin1_swedish_ci collation.
undine_percona::database { ‘mysite_db’:
charset => 'latin1', collation => 'latin1_swedish_ci',
}
Creates a new database called "mysite_db" (with the default character set and collation) from user@ssh.example.com via SSH, connecting to the database rmdb as remote_mysql_user:correcthorsebatterystaple. Note that the host is added to known_hosts using src_ssh_known_host_key.
undine_percona::database { 'mysite_db': src_ssh_user => 'user', src_hostname => 'ssh.example.com', src_ssh_known_host_key => '|1|nddsvUkIUHNdM31TTSc+sPT57yg=|nQqEyJJthk/ ...', src_db_name => 'rmdb', src_db_user => 'remote_mysql_user', src_db_pass => 'correcthorsebatterystaple', }
The database resource is used by Undine to represent a single Percona Server database. This may represent a pristine database, or one imported via a local database dump.
Optionally, the declaration may also declare include a remote source for the database, in which case it will be retrieved via mysqldump over SSH. To ensure that the database will not be inadvertently clobbered during provisioning, it will only be retrieved when the local database defined in db_name is empty (SHOW TABLES returns an empty set).
Creates a new database called "mysite_db" with the latin1 character set, using the latin1_swedish_ci collation.
undine_percona::database { ‘mysite_db’:
charset => 'latin1', collation => 'latin1_swedish_ci',
}
Creates a new database called "mysite_db" (with the default character set and collation) from user@ssh.example.com via SSH, connecting to the database rmdb as remote_mysql_user:correcthorsebatterystaple. Note that the host is added to known_hosts using src_ssh_known_host_key.
undine_percona::database { 'mysite_db': src_ssh_user => 'user', src_hostname => 'ssh.example.com', src_ssh_known_host_key => '|1|nddsvUkIUHNdM31TTSc+sPT57yg=|nQqEyJJthk/ ...', src_db_name => 'rmdb', src_db_user => 'remote_mysql_user', src_db_pass => 'correcthorsebatterystaple', }
The misc_conf_file resource represents a single configuration file to manage, triggering an restart of the Percona server when modified. Fundamentally, this is a wrapper around a file resource that notifies the Percona service.
undine_percona::misc_conf_file { '/etc/mysql/conf.d/override.cnf': source => 'puppet:///modules/my_percona_module/override.cnf', }
The misc_conf_file resource represents a single configuration file to manage, triggering an restart of the Percona server when modified. Fundamentally, this is a wrapper around a file resource that notifies the Percona service.
undine_percona::misc_conf_file { '/etc/mysql/conf.d/override.cnf': source => 'puppet:///modules/my_percona_module/override.cnf', }