This removes the hard dependencies on mysql::server from
manifests/db.pp. This permits one to use this module to manage databases
in an existing server, possibly located on a remote host (with a
properly configured /root/.my.cnf).
A user might need to import several files on database creation.
Currently the module only allows the import of a single file.
This commit allows one to, from now on, import severals.
Before :
mysql::db { 'test' :
sql => '/tmp/my_import1.sql',
}
Now :
mysql::db { 'test' :
sql => [
'/tmp/my_import1.sql',
'/tmp/my_import2.sql',
]
}
The future parser treats the empty string '' as a truthy value. This
means that mysql::db will always try to include the db import exec in
the catalog. With the empty string as the $sql value, the command
attempts to import '' into a database, which fails. This patch changes
the default $sql value to undef so that the exec won't be included if
there is no sql to import.
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.
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
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.
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.
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.
Show that mysql:db can also import SQL from a file in order to, for
example, initialize a database schema. Since it requires class
mysql::server, we assume to run all commands as the root mysql user
against the local mysql server.
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.
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.
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.
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.
- 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