Commit graph

208 commits

Author SHA1 Message Date
Igor Galić
63e0da0b71 option to specify a script that runs after backups
This script could be used to sync backups to a central server, or just
to create a file to let external scripts know that backups are
(sucessfully) done and can be picked up.

The postscript option (defaults to false) and can be either a string or
an array of strings. These strings will be directly put into the
mysqlbackup.sh and as such can either be shell commands, or externally
managed files.
2014-02-06 16:44:07 +01:00
John Bond
10f346eaca Add logic to ignore mysql.events 2014-01-30 12:31:21 +01:00
Jim Radford
dabb29dd6e Actually use upstart on Ubuntu by fixing misspelled variable name 2014-01-23 13:01:08 -08:00
Ashley Penney
edfaeccfa8 Merge pull request #394 from danielfoglio/master
changed log_error to log-error and pid_file to pid-file to match the mys...
2013-12-19 16:39:56 -08:00
Igor Galić
d5fd46de59 Merge pull request #400 from duritong/fix_backupuser_dependency
Fix backupuser dependency
2013-12-18 22:13:27 -08:00
Ashley Penney
c32ae645e0 Apparently we were restarting no matter what the parameter said,
awkward.
2013-12-18 15:12:04 -05:00
Ashley Penney
5bba2e04b3 Add a comment to make this clearer. 2013-12-18 14:13:00 -05:00
Ashley Penney
b7dcdd1714 Add $restart support.
Previously this parameter did nothing, lets make it actually work.
2013-12-18 13:59:56 -05:00
mh
765afe4f61 Fix #321 - root_user should be setup before configuring backup user
Otherwise puppet might try to setup the backup user even before
the service is running and will fail.
2013-12-18 13:35:20 +01:00
Foglio, Daniel
3d98b1de0d changed log_error to log-error and pid_file to pid-file to match the mysqld service script 2013-12-17 17:39:04 -05:00
Guillaume Virlet
3da12ac622 migrate key_buffer (deprecated) to key_buffer_size in config_file 2013-12-14 23:15:13 +01:00
Guillaume Virlet
9460db2ec1 fix typo on bind-address in config_file 2013-12-14 23:14:01 +01:00
Evan Heidtmann
c654fe1ba8 Parameterize backup directory mode and ownership 2013-11-15 20:55:21 -08:00
Mason Malone
b86de6b88e Comment mysql::server::providers and update README.md
I added a "$" to the parameter examples because the Github syntax highlighting
looks off without it.
2013-11-11 09:57:31 -05:00
Mason Malone
d66efd82a2 Better hiera integration
This adds hash parameters to mysql::server to allow specifying grants, users, and databases to
create automatically, which works nicely with Hiera's automatic parameter lookup functionality
2013-11-10 22:25:55 -05:00
Ashley Penney
52b8714081 Fix owner -> user typo. 2013-11-06 11:36:55 -05:00
Igor Galić
333be5fd76 ensure /root/.my.cnf is 0600 and root owned
explicitly set /root/.my.cnf's owner and mode to ensure it will be
created with as root owned and 0600. This change fixes #357
2013-11-05 19:56:27 +01:00
Ashley Penney
a4d329f846 Fix the broken anchoring. 2013-11-05 16:41:41 +01:00
Jonathan Machado
62ef6564d7 Update the Anchor pattern workaround
Add a step to the anchor pattern and add comment to clarify the need of this workaround.
Ref : http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues
2013-10-31 13:16:32 +09:00
Jonathan Machado
e7c26a1c57 Add Anchor pattern to client.pp
The class mysql::client::install is "contained" in the mysql::client to avoid floating.
2013-10-29 19:24:04 +09:00
Ashley Penney
91b068cad4 Fix description for PE3.1
In PE3.1 it parses the comment #Deprecated at the top of the parameters
as if it's the class description.  Move this so PE3.1 doesn't falsely
claim mysql::server is now deprecated.
2013-10-16 11:42:35 -04:00
Ashley Penney
5d17f10f93 Port of a6101dc (mysql::server::monitor fix) to 2.x. 2013-10-07 09:55:13 -04:00
Ashley Penney
52a9f2e293 Duplicate parameter removed. 2013-10-03 19:10:35 -04:00
Ashley Penney
c0b35a2cf7 Add all the params here as undef to make it clear what the intent is. 2013-10-03 17:15:24 -04:00
Ashley Penney
dec3e1f7f1 Fix typoed parameter. 2013-09-30 13:04:15 -04:00
Ashley Penney
17597bf261 Merge pull request #282 from mediatemple/fix/master/merge_function
Fixes issue #274 by using recursive hash merge.
2013-09-26 06:57:16 -07:00
Ashley Penney
1719424b23 Fix mysql::client.
This was still relying on globals.  Allow you to pass params into
mysql::client properly to set the package.
2013-09-26 09:30:44 -04:00
Justin Burnham
1b4a486bf9 Fixes issue #274 by using recursive hash merge. 2013-09-25 10:38:08 -07:00
Ashley Penney
e0c4434815 Merge pull request #280 from apenney/fix-php
Removing the bindings compat stuff.
2013-09-25 10:07:27 -07:00
Ashley Penney
b8261abbdf Removing the bindings compat stuff. 2013-09-25 12:48:14 -04:00
Ashley Penney
46fe1ea512 Remove mysql::globals.
This turned out to be a fairly bad idea.  It begun as a way to try
and mirror what happens in the postgresql module for consistency
but instead made things complex.

I've changed it to have the override_options in mysql::server which
leads much more naturally out of the design and shape of MySQL.
2013-09-24 18:04:29 -04:00
David Collom
0614fba911 Update mysqltuner.pp
Enable present/absence.. in those cases when you only want mysqltuner installed for debugging
2013-09-24 14:43:11 +01:00
Ashley Penney
9d0f9010c6 Merge pull request #241 from red-trela/support-fedora-rawhide
Support Fedora's rolling development "release", Rawhide
2013-09-23 14:09:16 -07:00
Ashley Penney
4d6962e868 Various adjustments to classes to align with refactored work.
Handful of changes here, such as removing flush (so that mysql_user
can be used for root password changes) and other tweaks here.

Add time option to mysql::backup.
2013-09-13 13:14:48 -04:00
Ashley Penney
3f9297e10e Rework the mysql::bindings to be less complex.
This removes all the internal class parameters and shrinks these classes
to be more straightforward, relying on the values set in bindings.pp.
2013-09-13 13:14:39 -04:00
Ashley Penney
2c902b0f93 Add all the distribution specific params and other defaults not related
to the hash used in mysql::globals.
2013-09-13 13:09:48 -04:00
Ashley Penney
b930438d9a Deprecate this class while attempting to provide backwards
compatibility.
2013-09-13 13:09:05 -04:00
Ashley Penney
e4d5671e7f Add mysql::globals and refactor mysql::server.
This work adds a new mysql::globals class which contains a hash used to
build my.cnf from.  It's used to share this data across multiple classes
so that the client and server can share this data.

End users can modify content in my.cnf by including mysql::globals and
passing in override_options as a hash that looks like:

override_options = { 'mysqld' => { 'max_connections' => '120' } }

This completely replaces the mess of parameters that existed in the main
mysql class before.

Completely refactor mysql::server and rework the API.  This changes
ordering, changes from execs{} to mysql_user for the root password,
removes some functionality (like the etc_root_password), and generally
makes some tough decisions about how mysql::server should be built.
2013-09-13 13:04:42 -04:00
Ashley Penney
e3843ceb6f Refactor to use mysql::globals.
This initial round of work focuses on adding the concept of
mysql::globals to the module.  This is a shared place to provide all the
data the module needs, and then clients, servers, and providers can all
rely on this information to set things up.

This is being primarily used at first to allow a default_options hash
that contains all the previous parameters and takes a overrides_options
that allows you to then further customize any of the options in my.cnf.
2013-09-09 11:34:39 -04:00
Ashley Penney
2abccab4d9 Refactor and rename database_grant to mysql_grant.
This provider has undergone the largest set of changes and currently
just accepts a full SQL grant string as the name and then applies it,
making things easier for DBAs and removes the awkward attempts at
modelling grants into Puppet.
2013-09-03 17:24:21 -04:00
Ashley Penney
369c83126b Use new provider names in manifests.
Modify manifests and tests to handle the renamed providers.
2013-08-28 18:11:21 -04:00
Trey Dockendorf
627699fc49 Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file 2013-08-27 15:15:29 -05:00
Ashley Penney
40db3e801d Merge pull request #244 from willametteuniversity/master
Added support to back up specified databases only with 'mysqlbackup'
2013-08-27 09:26:25 -07:00
Casey Feskens
ad479e6a81 Changed backupdatabases default from false to [] 2013-08-15 06:04:14 -07:00
Mark Phillips
ae367272a2 Add HOME environment variable for .my.cnf to mysqladmin command when (re)setting root password 2013-08-14 15:48:56 -04:00
Casey Feskens
359d88175c Added support to back up specified databases only with 'mysqlbackup'
parameter.  Each database is backed up separately to a named file.
2013-08-13 14:44:41 -07:00
Hunter Haugen
82c4b81ba3 Add environment variable for .my.cnf and specs 2013-08-13 13:08:39 -07:00
Sandro Mathys
070daf86b4 Support Fedora's rolling development "release", Rawhide
Since Rawhide is a rolling kind of release with no version numbers,
the operatingsystemrelease will actually return "Rawhide" instead
of any Integer. So we better check whether operatingsystemrelease
is an Integer before comparing numbers and cover Rawhide, too.
2013-08-11 18:25:33 +02:00
Ashley Penney
c22e72a97a Add compatibility classes to handle the backwards incompatible changes. 2013-07-26 10:08:37 -04:00
Ewoud Kohl van Wijngaarden
b1ae1523a4 Fix puppet 2.6 compatibility 2013-07-25 14:57:23 +02:00