Commit graph

49 commits

Author SHA1 Message Date
Michael Arnold
fbee243ff6 Rip out backup class parameter defaults.
No need for setting default values to class parameters and then testing
to confirm they are set to non-default values.  Simply do not give them
values to begin with.
2012-04-30 08:07:46 -07:00
Michael Arnold
4158137278 Added mysql::backup class.
Installs a mysql backup script, cronjob, and priviledged backup user. 
Includes rspec tests and updated documentation.
2012-04-23 22:53:59 -07:00
Derek Higgins
9ff99ba336 set platform dependent error logfile location 2012-04-12 00:06:35 +00:00
William Van Hevelingen
f7e0ea5893 (#13203) Add ssl support
This commit adds a ssl parameter to the mysql::config class.
Setting ssl to true adds the following parameters to the template.

   ssl_ca             - path to ssl-ca
   ssl_cert           - path to ssl-cert
   ssl_key            - path to ssl-key
2012-03-21 14:48:22 -07:00
Dan Bode
ce606a9525 Merge pull request #53 from nanliu/tb/travis
Add travis.ci to module
2012-03-20 17:31:45 -07:00
Nan Liu
9ebbbc434d Fix Puppet 2.6 compilation issues.
In Puppet 2.6, negate boolean wasn't handled in resources attribues.
Also hashes values were not accepted in functions. The manifests have
been updated to resolve compilation issues in Puppet 2.6.
2012-03-18 01:56:13 -05:00
William Van Hevelingen
f353fc6a2d (#13163) Datadir should be configurable
Previously datadir was hardcoded to /var/lib/mysql.
This commit makes datadir configurable for MySQL
installations with custom datadir paths.
2012-03-17 20:19:55 -07:00
Nan Liu
72da2c5838 Fix mysql service on Ubuntu.
On Ubuntu, mysql should use upstart provider instead of init.d. This
change overrides the init provider until the issue with init provider
can be addressed.
2012-03-16 18:15:12 -05:00
Nan Liu
812ba01509 Merge pull request #46 from bodepd/add_rspec_tests_for_config_class
Add rspec tests for config class
2012-03-16 11:25:28 -07:00
François Charlier
b14c7d14d2 Add a test to check path for 'mysqld-restart'
And fix a coma error in mysql::config class.

Signed-off-by: François Charlier <fcharlier@ploup.net>
2012-03-16 18:13:16 +01:00
François Charlier
1a9ae6bddf Fix path for 'mysqld-restart'
And log output on failure.

Signed-off-by: François Charlier <fcharlier@ploup.net>
2012-03-16 15:31:42 +01:00
Dan Bode
da62ad66f0 Moved class dependency between sever and config to server
Prevously, the server class declared the config class and
the config class had a relationship to the server class.

This actually meant that the config class could never be declared
by itself b/c it exlicity depended on the server class (which it
could never resolve externally b/c it would result in a redeclaration
of the config class itself.)

This issue actually made it impossible to test the manifest on its
own with rspec-puppet. This commit makes it much easier to write
rspec tests for the config class.
2012-03-15 00:51:35 -07:00
Dan Bode
0832a2c1d2 Notify mysql restart from set_mysql_rootpw exec
Since the set_mysql_rootpw exec is only created
when the password is being managed, having the mysql
resource (which always exists) reference it leads
to an error when the mysql root password is not being
managed.

This commit resolves the issue by having the set
mysql rootpw exec notify the mysql restart if it
changes.
2012-03-14 23:12:12 -07:00
Dan Bode
e472d3b48d Mention osfamily value in failure message
This commit displays the detected osfamily that
is not supported by this module.

It was previously unclear to users seeing the failure
what the value of osfamily was that was causing the
failure.
2012-03-14 23:07:02 -07:00
Nan Liu
b1f90fd1d2 Major refactor of mysql module.
This is a major change to the module and would be released as a new
version.

* Add self.instances to database and database_user for puppet resource.
* Update database provider to use flush method.
* Update module to conform to puppet-lint recommendations.
* Cleanup some unecessary logic in mysql::db define type.
* Move mysql_restart to config class.
* Use class to class dependency instead of resource dependency.
* Change appropriate rspec-puppet tests.
* Add fixtures directory to simplify testing.
* Update raketask and spec_helper to reflect fixture changes.
* Update mysql_password function to support validation.
* Move client installation to a separate class.
* Update documentation and readme.
2012-03-13 15:19:53 -07:00
Justin Ellison
1e926b4516 Ruby and Python's MySQL libraries are named differently on different
distros.
2012-02-28 10:34:19 -08:00
Justin Ellison
09af083e3c Per @ghoneycutt, we should fail explicitly and explain why. 2012-02-28 10:34:19 -08:00
Justin Ellison
7513d0308c Removing duplicate declaration 2012-02-28 10:34:19 -08:00
Justin Ellison
031a47dfad Instead of hardcoding the config file target, pull it from mysql::params 2012-02-28 10:34:19 -08:00
Justin Ellison
360eacd4e0 Moved $socket to within the case to toggle between distros. Added
a $config_file variable to allow per-distro config file destinations.
2012-02-28 10:34:19 -08:00
Justin Ellison
3462e6bf13 Pretty sure this is a bug, 99% of Linux distros out there won't
ever hit the default.

Moving the variables to just after the case statement will set
them, removing the default part of the case will cause this class
to fail on unsupported distros.
2012-02-28 10:34:19 -08:00
Carl Caum
0783c748b7 Only notify Exec to import sql if sql is given
Commit e3b9fd broke the mysql::db defined type by always notifying the
Exec[${name}-import-import] resource even though the resource may not be
declared if the $sql parameter was not given. This commit adds an
in-selector to only notify the Exec resource if the $sql parameter has a
value.  More extensive rspec-puppet tests have been provided to protect
against this in the future.
2011-12-19 20:48:47 -08:00
Carl Caum
e3b9fd90a6 (#11508) Only load sql_scripts on DB creation
Previous to this commit, if the sql parameter was provided to a
declaration of the mysql::db defined type, the defined type would always
load the sql script on every catalog run. This changes the exec that
loads that sql script to be refreshonly unless the enforce_sql parameter
is set to true.
2011-12-19 07:25:35 -08:00
Justin Ellison
3058feb1f3 Require not needed due to implicit dependencies 2011-12-13 18:57:38 -06:00
Justin Ellison
a557b8d7c8 Bug #11375: puppetlabs-mysql fails on CentOS/RHEL 2011-12-13 17:36:56 -06:00
Christian G. Warden
92660497a2 (#11185) Fully qualify $operatingsystem
Fully qualify $operatingsystem from root scope as $::operatingsystem. This
should help remove the warnings in Puppet 2.7.x.
2011-12-05 23:34:53 +00:00
Ken Barber
68e4c6af32 Merge pull request #21 from bodepd/config_hash_update
(#10391) Update docs to reflect config_hash.
2011-10-31 11:06:00 -07:00
Dan Bode
e1cb227803 (#10391) Update docs to reflect config_hash.
Configuration was moved to config hash param of the mysql::server class.

This was done so that additional parameters can be
added in the future and not have to be added to
both mysql::config and mysql::server as class params

This patch updates the README, docs, and examples to
correctly use the parameter.
2011-10-31 11:01:57 -07:00
Dan Bode
319644cec5 (#10390) Manage /etc/mysql directory.
/etc/mysql/my.cnf was being managed and /etc/mysql was not.
This was causing failures if the directory was not created
by the package.

This commit manages it in case it was not created by the package.
2011-10-31 10:39:08 -07:00
Dan Bode
eb608164e4 Fixed dep issue.
the exec was set to depend on a conditional resource
resulting in possible errors. Reversed the conditional
to be set on the conditonal resource.
2011-06-24 10:28:55 -07:00
Dan Bode
9f77e8a24a Merge pull request #14 from bodepd/issue/master/root_pw_cleanup
Cleaned up implementation for setting root pw
2011-06-24 10:17:46 -07:00
Ken Barber
a1bd55423b 15 - Fix resource names in monitor.pp 2011-06-24 15:05:46 +01:00
Dan Bode
0963d2eb4f Cleaned up implementation for setting root pw
- param of rather or not to set rootpw in
/etc/my.cnf

- fixed bug for rootpw conditional

- config files are only used for managing rootpw
2011-06-23 23:41:38 -07:00
Dan Bode
b93e0f65cb Fixed bug with updating mysql root pw.
root_password was being set to an undefined variable.
2011-06-23 16:45:28 -07:00
Dan Bode
a24881a682 Created config class and extended params.
It makes way more sense to just allow it as a 
class param.

Also added some additional config for setting bind
address and port.

Added management of /etc/mysql/my.cnf

Documented a dependency on create_resources 0.0.1
2011-06-22 11:38:11 -07:00
Dan Bode
0f3f58f6ca Merge pull request #9 from glarizza/feature/master/password_ordering
Mysql Module Fixes
2011-06-17 15:49:15 -07:00
Gary Larizza
bba9589770 Fix service path
Restrict the path for the service binary to '/sbin/:/usr/sbin/'
2011-06-16 16:33:09 -07:00
Gary Larizza
1d16d45f4e Fix root password ordering issue
This commit fixes an ordering issue for setting the 
mysql root password.
2011-06-16 15:35:16 -07:00
Gary Larizza
6b98633cc8 Add client package variable
The mysql client package is different on CentOS. This commit adds
a parameter for the mysql client package and defaults to a variable
in the mysql::params class.
2011-06-16 15:34:04 -07:00
Gary Larizza
c15ef0ad1b Remove path to service binary
This commit removes the path to the service binary (which didn't
work on CentOS) and instead added a path parameter.
2011-06-16 15:32:07 -07:00
Gary Larizza
f4291778cc Refactor ruby package provider
Allow a parameter for the ruby-mysql package provider.  This
will allow you to use providers other than gem.
2011-06-16 14:03:05 -07:00
Dan Bode
fb00c75ced Debian should not manage root password
- previously setting the root password failed on 
  Debian b/c a root password was already set
  during package installation
- Debian already installs mysql with a 
   maintainance user capable of performing any
   required database actions.
- this patch splits setting of root password to
  be redhat specific.
- as a consequence, users will not be able to 
  specify a root password on Debian (which 
  needs to be opened as a seperate ticket)
2011-06-16 10:49:15 -07:00
Dan Bode
b7761efd5b corrected /etc/my.cnf path 2011-06-01 20:20:11 -07:00
Dan Bode
344d644d5c Added documentation and license to module. 2011-05-31 20:47:19 -07:00
Dan Bode
03d2ad5550 Added ensure param to mysql::ruby.
allows users of the module to specify the 
package version.
2011-05-31 20:46:02 -07:00
Dan Bode
fa7f0ebf17 removed accidentally checked in swap file.
removed spurious logging from db class
2011-05-29 18:15:55 -07:00
Dan Bode
0b5cc21348 cleaned up style a little:
- updated mysql::ruby to use params value for
  package_name
- updated server to use params value for service
  and package
- clarified some param names to make them more
  consistent
2011-05-26 18:11:24 -07:00
Dan Bode
30338032a5 added module to install python tools for mysql 2011-05-26 18:10:08 -07:00
Dan Bode
d28f0e0327 adding first commit for mysql. 2011-05-24 23:22:43 -07:00