Commit graph

171 commits

Author SHA1 Message Date
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
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
Ashley Penney
7c7195ba33 Refactor MySQL bindings and client packages.
The current MySQL module is hard to modify, test, and drop in
replacement components to.  This work starts out by refactoring
the bindings support in MySQL to a completely seperate bindings
class in order to reduce the amount of parameters in the main
class for a feature that is infrequently used.

In addition to this start the movement of client configuration
and packages to the mysql::client::* namespace.
2013-07-19 18:39:55 -04:00
Wolf Noble
fb1e37cf04 package is specifically named 'mysql_client' not in relation to the client package name parameter. 2013-07-13 19:32:50 -05:00
Wolf Noble
19637d2e84 include mysql_client package as a requirement for the db creation 2013-07-12 18:06:53 -05:00
Ashley Penney
4e6073de92 Fix a geninue potential issue, a non-quoted string. 2013-07-11 19:42:41 -04:00
Ashley Penney
926e94a4cb Merge pull request #170 from omalashenko/master
Harden mysqlbackup.sh script
2013-07-09 16:06:55 -07:00
Ashley Penney
9bc2eb67c7 Merge pull request #214 from paramite/roothome
Use $root_home for .my.cnf
2013-07-09 16:04:23 -07:00
Clemens Fuchslocher
2e82660446 Fixed PID file location for SLES 11 SP2. 2013-07-08 20:50:43 +02:00
Martin Magr
e3d74a65b0 Use $root_home for .my.cnf 2013-07-08 11:49:30 +02:00
Derek Higgins
48af8a727d Fix typo in fact name 2013-07-06 00:08:02 +01:00
Ashley Penney
2b91872407 Merge pull request #210 from red-trela/fedora-19-mariadb
Cover Fedora 19's move from mysql to mariadb packages
2013-07-05 09:56:59 -07:00
Sandro Mathys
3ca7d958df Cover Fedora 19's move from mysql to mariadb packages 2013-07-05 10:53:56 +02:00
Daniel De Marco
e12eb0e19f add ft_min_word_len and ft_max_word_len config options 2013-07-04 21:33:53 -04:00
Oleg Malashenko
d7460d4b02 backup: configurable cleanup sequence
$delete_before_dump controls whether old backups to be removed before
creating new one.
2013-07-05 11:27:29 +10:00
Oleg Malashenko
9e2540f4fc Harden mysqlbackup.sh script
* mysql::backup backuprotate parameter sets the number of backups to keep,
   default is 30.

 * Use bash in mysqlbackup.sh to get exit status of mysqldump when piped to
   bzip2. Unfortunately there is no easy portable way to do that.

 * Only delete old backups when current backup finished successfully.

 * Try hard not to delete files that we didn't create (i.e. README or other
   backups).
2013-07-05 11:27:29 +10:00
Lebedev Vadim
9d69afcae7 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
	spec/classes/mysql_config_spec.rb
2013-07-02 22:11:19 +04:00
Ashley Penney
aa5d1f070b Merge pull request #198 from mhellmic/maxconnections
add a maximum connection parameter and set the default to 1000
2013-07-02 10:43:29 -07:00
Lebedev Vadim
6cef2e8af4 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql 2013-07-02 21:42:49 +04:00
Ashley Penney
f3e5c89551 Merge pull request #187 from RsrchBoy/topic/perl
add mysql::perl helper class
2013-07-02 10:37:10 -07:00
Ashley Penney
1b5dc3ce68 Merge pull request #186 from apenney/rootpassword
(WIP) #20562: Minor fix for ordering
2013-07-02 10:36:31 -07:00
Lebedev Vadim
ead86b5a3f Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
2013-07-02 21:26:43 +04:00
Ashley Penney
d9ce083f20 Merge pull request #162 from frimik/19744
fixes #19744 - no restart on root/.my.cnf change
2013-07-02 09:56:10 -07:00
Simon Effenberg
7f7e886d71 handling of my.cnf config file is now optional
This adds a parameter (default value is like old behavior) so that the
my.cnf file isn't managed (created/updated) by the mysql module at all
which is necessary for our environment. We need to set all parameters by
ourself. If we don't set a parameter then the default from the mysqld
binary should be used instead of any default parameter the mysql module
provides us.
2013-07-02 10:01:21 +02:00
Martin Hellmich
880eaae3e8 changed the max_connections default to 151
this is the default according to the mysql manual.
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections
2013-06-28 11:21:58 +02:00
Martin Hellmich
3089d3a59b add a maximum connection parameter and set the default to 1000
Conflicts:
	manifests/config.pp
	templates/my.cnf.erb
2013-06-28 10:15:58 +02:00
Lebedev Vadim
a42d5bea53 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql 2013-06-26 14:06:01 +04:00
Niek Beernink
9dc1b946de make tmpdir configurable 2013-06-25 15:06:07 -07:00
Lebedev Vadim
fad4f06cb2 * Fixing lint warnings 2013-06-17 18:04:55 +04:00
Chris Weyl
beeb261c5a Merge branch 'master' into topic/perl
Conflicts:
	manifests/init.pp
2013-05-27 15:23:55 -07:00
Ashley Penney
811ebc62c8 A very small fix for the case where the root password has been changed
by hand and then you change your mysql::server entry to match.  If you
also change any mysql::db entries at the same time this causes those to
be attempted before your /root/.my.cnf is updated.

I can't add rspec testing for this until https://github.com/rodjek/rspec-puppet/pull/106
is merged.
2013-05-25 21:33:29 -04:00
Lebedev Vadim
1a13580f49 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
	manifests/params.pp
2013-05-21 20:40:50 +04:00
Lebedev Vadim
a171c52a89 * Puppet 2.6 fix 2013-05-21 01:21:38 +04:00
Mark Smith-Guerrero
242f6e5881 parameterized previously hardcoded max_allowed_packet config setting 2013-05-06 15:55:53 -04:00
Wolf Noble
cf78bea206 minor fix to alphabetization of package_ensure parameter 2013-05-03 17:06:06 -05:00
Wolf Noble
569448c0a6 Fix missing python_package_name parameter 2013-05-03 17:00:52 -05:00
Chris Weyl
fac48b8584 add mysql::perl
An additional helper class to ensure that the Perl MySQL DBD driver is
installed (DBD::mysql).
2013-05-03 09:25:30 -07:00
Francois Deppierraz
391abe753f Fix default-storage-engine default value
Without this commit, puppetlabs-mysql breaks mysql configuration by inserting a
dummy default-storage-engine directive. This will prevent mysql daemon from
starting up.

For example:

notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content:
--- /etc/mysql/my.cnf   2013-04-25 21:36:25.000000000 +0000
+++ /tmp/puppet-file20130425-12937-10tcf50-0    2013-04-25 21:42:49.000000000 +0000
@@ -29,6 +29,8 @@
 expire_logs_days   = 10
 max_binlog_size    = 100M

+default-storage-engine = undef
+

 [mysqldump]
2013-04-25 23:46:34 +02:00
Wolf Noble
e65775cd3d Removal of trailing commas to the last parameter of classes for backwards compatibility with Puppet2.6 2013-04-24 17:02:46 -05:00