Commit graph

70 commits

Author SHA1 Message Date
Morgan Haskel
2635469f0b lint cleanup 2015-02-09 15:30:55 -08:00
Morgan Haskel
b9fbba3b0d Merge pull request #578 from franzs/new_root_options
Add new parameters create_root_user and create_root_my_cnf.
2015-02-09 14:13:07 -08:00
Morgan Haskel
96f4d164a4 MODULES-1759: Remove dependency on stdlib >=4.1.0
Backported dirname => mysql_dirname since updating dependency to stdlib
4.1.0 is backwards incompatible with some versions of PE.
2015-02-09 12:34:44 -08:00
Rob Nelson
e08aa011f1 (MODULES-1731) Invalid parameter 'provider' removed from mysql_user instance. 2015-01-30 12:49:20 +00:00
TP Honey
1a87bae020 Merge pull request #637 from dveeden/account_localhost
Do the right thing when fqdn==localhost
2015-01-22 10:36:01 -08:00
Daniël van Eeden
c04fed1066 When fqdn==localhost account security breaks
This is because the root@localhost account is already
defined.

Remove localdomain accounts if fqdn is localhost
2015-01-18 15:02:17 +01:00
juniorsysadmin
2088fb8b36 Fix lint warning in server/service.pp 2015-01-11 15:35:10 +11:00
Igor Galić
d3f7254ecc Merge pull request #616 from takumin/install_db_with_freebsd
mysql_install_db freebsd support
2014-12-23 18:03:25 +01:00
Igor Galić
5f62e6d455 Merge pull request #615 from KlavsKlavsen/master
ensure mysql-config-file and server package is in place before trying to...
2014-12-22 10:32:35 +01:00
Morgan Haskel
a367b3e1e4 Clean up lint warnings 2014-12-16 11:19:04 -08:00
Morgan Haskel
3c872abcd2 Remove mysqltuner, fetch with staging instead
mysqltuner is licensed under GPL so we don't want to package it with the
module.
2014-12-16 10:52:39 -08:00
takumi
7d3962fc28 mysql_install_db freebsd support 2014-12-05 18:45:38 +09:00
Klavs Klavsen
a8fd4d375b ensure mysql-config-file and server package is in place before trying to start service - to ensure it gets started with correct settings and does not try to enable service before it actually exists :) 2014-12-04 16:14:09 +01:00
Igor Galić
56e52fc3fa Merge pull request #596 from NoodlesNZ/logbindir
Create log-bin directory if it doesn't exist
2014-11-12 15:39:02 +01:00
Nick Le Mouton
08a66b7bb9 Added log-bin dir creatation 2014-11-12 06:50:14 +13:00
Damon Conway
7de2316e15 [MODULES-1484] Add support for install_options for all package resources.
Add install_options parameter to mysql::bindings, mysql::client, and
mysql::server. The default is undef.
2014-11-08 00:30:00 -06:00
Colleen Murphy
ec6b97ea5d Ensure error log is present before trying to manage ownership
If mysql generates an error log in between puppet runs, the log's
ownership and group might not match the ownership and group set by the
file resource. This means sequential puppet runs will appear not to be
idempotent. This patch makes sure the file is there from the start so
that it doesn't have to change its ownership later.
2014-10-07 14:28:00 -07:00
Franz Schwartau
02564bfe08 Add new parameters create_root_user and create_root_my_cnf.
This allows the galera module and others to write ${::root_home}/.my.cnf
independently from create the mysql user. This is useful for cluster
setups where you want to create ${::root_home}/.my.cnf on every node
but create the user only once.
2014-10-06 10:53:30 +02:00
Martin Magr
293d35db4d Fixes manage_service feature
Module lacks of disabling service managing (ensure=>undef).
This patch is fixing this issue.
2014-08-21 17:44:27 +02:00
Hunter Haugen
1812fbca25 Rewrite some of the unit tests to work on more platforms.
This commit introduces puppet_facts, a gem that allows easier testing
against PE platforms.  We're using this gem to automatically parse the
metadata.json and test against appropriate versions of PE on platforms
we support.

We start by only running against centos-6-x86_64 and ubuntu 14.04 on a
regular basis but this is implemented as an ENV so it can be overwritten
by CI systems to test against all PE platforms.
2014-08-07 16:27:17 -04:00
I'm on Vacation until 18th of July
70cafdc283 Merge pull request #509 from xbezdick/master
Parametrize !includedir
2014-07-23 12:38:18 +02:00
I'm on Vacation until 18th of July
46643523ce Merge pull request #539 from stevesaliman/master
Grants for the backupuser should be conditional
2014-07-23 12:35:50 +02:00
Igor Galić
ea0b1fe442 Make sure we actually notify the service.
fix for the fix in c2d02ff721
thanks to @edestecd
2014-07-23 12:03:00 +02:00
Steve Saliman
30249552d4 Changed the backup user grant in backup.pp to use the ensure variable instead of always assuming 'present' 2014-07-11 11:25:10 -06:00
Ashley Penney
c2d02ff721 Make sure we notify the service. 2014-07-08 13:24:23 -04:00
Ashley Penney
5959715ff6 Rework the mysql initdb functionality.
This reworks a previously unmerged PR to clean up the code a little and
adds a test for it.
2014-07-08 12:53:20 -04:00
Reinhard Vicinus
6f5488827a run mysql_install_db if datadir is set annd mysql database is missing 2014-07-08 10:26:18 -04:00
Lukas Bezdicka
26204437ef Prametrize !includedir
Hardcoded path provided by puppet is now replaced by providing only the final directory as on
most systems includedir is provided by package and it's matter of user to provide it if he
wants to override it. This also allows disabling including at all.
2014-06-04 14:07:49 +02:00
nerdlich
b40865d740 Backup user needs PROCESS privilege when doing file-per-database backups
The following error occured:
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `INNODB_BUFFER_PAGE`': Access denied; you need (at least one of) the PROCESS privilege(s) for this operation (1227)
2014-04-22 13:08:58 +02:00
Ashley Penney
71d1f24bd9 Merge pull request #457 from igalic/independent-backup
mysqlbackup.sh should be able to find mysql
2014-04-10 13:46:19 -04:00
Martin Magr
c47d1fb586 Modified params.pp to work on latest Red Hat releases
On Fedora-20+ and RHEL-7+ mysqld service does not work any more
and has been replaced by mariadb service. This patch changes all
parameters accordingly.
2014-03-18 17:34:54 +01:00
Robin Gloster
47521aea8e add message to warn if disabling ssl 2014-03-04 14:58:17 +01:00
Igor Galić
d2b24e40d3 mysqlbackup.sh should be able to find mysql
anywhere. This should enable use to use mysql::server::backup
idependantly, even if mysql is preinstalled, and preinstalled in non
standard locations
2014-02-20 17:17:41 +01:00
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
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
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
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
5d17f10f93 Port of a6101dc (mysql::server::monitor fix) to 2.x. 2013-10-07 09:55:13 -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
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