Commit graph

238 commits

Author SHA1 Message Date
Ashley Penney
bb205ad2f0 Remove all the deprecated code. 2014-08-08 14:13:22 -04:00
Ashley Penney
cf2ffc6821 Handle graceful failure on RHEL4 and improve the messaging. 2014-08-08 11:55:31 -04: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
Ashley Penney
bbc7f2b33e Merge pull request #517 from edvinasme/archlinux_support
Add Archlinux support
2014-07-24 13:22:07 -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
Gael Chamoulaud
7b3cdd234a Adds Support for CentOS and Scientific Linux 7
CentOS Project has adopted a new rule for versioning numbers. The major number
matches the RHEL major number, but the minor number is generated from the
release date. For example, CentOS 7.0.1406.

Uses $::operatingsystemmajrelease instead of $::operatingsystemrelease for
avoiding issue like "Comparison of String with 7 failed" for CentOS 7.

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2014-07-21 20:13:26 +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
Edvinas Klovas
0f0d2e6815 Add Archlinux support
This commit adds Arch Linux support. Everything besides bindings for JAVA and
Ruby has been tested as properly working. JAVA and Ruby bindings cannot be
managed by puppet as official packages are not in official repositories but in
AUR instead. PHP bindings are installed by default with mysql/mariadb package so
there is no need to specify/install separate patches. To reflect this,
bindings.pp has been altered to throw a warning if user wants to install
PHP binding. It throws an error is user tries to install JAVA or Ruby binding.

Signed-off-by: Edvinas Klovas <edvinas@pnd.io>
2014-07-10 21:55:44 +02:00
Hunter Haugen
52d44be30f Merge pull request #536 from apenney/mysql_install
Handle changing the datadir properly.
2014-07-08 14:55:11 -07: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
Jaakko
16002dfe09 Fix acceptance test for mysql::bindings.
Fix acceptance test for bindings to use correct parameter names, when
instantiating mysql::bindings class. Fix client and server dev package names
for couple of distros.
2014-06-11 18:01:16 +02:00
Jaakko
96a64a9793 (MODULES-1096) Fix double quote / single quote issue in params.pp.
To follow style guide advice
(http://docs.puppetlabs.com/guides/style_guide.html#quoting) and make
puppet-lint happy, manifests should only use double quotes with strings that
contain variables.

This commit fixes the lone exception to this rule.
2014-06-06 11:48:56 +02:00
David Miller
18df1d08e5 fix param client_package_ensure 2014-06-04 10:45:46 -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
Aaron Hicks
b2090194f5 Install MySQL client and daemon dev libraries. 2014-05-19 09:41:25 +12:00
Morgan Haskel
6151590caf Change the package name in the manifest, too! 2014-05-09 16:46:03 -04:00
Morgan Haskel
dec2af67b8 MariaDB still uses my.cnf as the main config file. 2014-05-09 15:10:27 -04: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
Pan
df706eec5e Use ensure_resource for mysql_databasein mysql::db
This will allow exported resource mysql::db to define same database but different
hostname and enables the cluster web nodes to declear the mysql::db and
to be collected on db node.
2014-03-15 13:38:17 -07:00
Pan
2834498e4d Allow use different name for db resource other than db name
When defining the mysql::db as exported resources, there are chances that the
same resource names are defined across the site, which will cause puppet agent
fail. By adding an optional dbname parameter, default to the $name, it allows the
resouce name to be defined differently, e.g. ${dbname}_${domain}.
Also updated test and docs for dbname parameter and add acceptance test for
dbname parameter feature
2014-03-15 13:38:13 -07:00
Robin Gloster
47521aea8e add message to warn if disabling ssl 2014-03-04 14:58:17 +01:00
Robin Gloster
abcea00dcb handle mysql compiled without ssl
mysql doesn't allow ssl=true/false in my.cnf if it hasn't been compiled
with ssl, therefor add a new parameter ssl-disable which makes sure the
template doesn't write anything with ssl to the config.
2014-02-28 21:42:41 +01:00
Ashley Penney
2d1a9f981a This fixes:
* Bindings on SLES
* Makes sure we don't kill the service while testing conf file locations.
2014-02-26 14:54:54 +00: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
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