21 Commits

Author SHA1 Message Date
Risto Laurikainen
e1e3f094a9 Require Class['mysql::server'], not Service['mysqld'] when creating DB.
When using version >= 2.2 of the MySQL module, setting up
the database for Keystone depended on the MySQL service
(Service['mysqld']). However, if the service is not managed
by Puppet (e.g. it is managed through Pacemaker instead),
this would cause catalog compilation to fail because there
is no Service['mysqld']. This is the case when the MySQL
module is called with service_manage => false. Requiring
Class['mysql::server'] instead fixes this.

Change-Id: Ia1b34051dd6e4fc0916ac788d6027c1f987418a8
Closes-Bug: 1349316
2014-07-28 12:28:38 +03:00
Chris Hoge
be78133b73 Fixed database service resource
Version 2.2+ of the puppetlabs-mysql moudule starts the MySQL database
with the Service resource name mysqld [1]. The puppet-keystone module
lists a requirement for a Service resource with name mysql. This will
lead to an undefined resource error.

This patch corrects the dependency.

[1] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/server/service.pp#L15

Change-Id: I2165b2c0529c0ecd9e9ba9853f3d15d5f86b0135
2014-04-23 14:30:00 -07:00
Ivan Chavero
496d73df18 Change keystone mysql default charset to utf8
Changed the default charset to uf8 and the
collation to utf8_unicode_ci.

Change-Id: I3818955c8f28691432d4869fd999bcae05e592d7
2014-03-31 22:45:16 -07:00
Hunter Haugen
7813820abd Use correct variable for host_access dependency
The keystone::db::mysql resource declares resources using
`$real_allowed_hosts` which is a copy of `$allowed_hosts` minus `$host`.
But then it declares dependencies using `$allowed_hosts` which includes
`$host` and will fail catalog compilation due to a missing dependency

This bug only affects users if the value of `$host` is included in the
array of `$allowed_hosts`

Change-Id: Ifdd8793bcf36178efd1a083ee35649d56dc3d768
2014-03-26 18:19:52 -07:00
Michael Chapman
36d87e0fc7 Add support for puppetlabs-mysql 2.2
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
keystone mysql and init classes allowing users to
use the new version. Previous behavior will continue
as normal when using the old version (0.9)

Change-Id: Idf7c46d9aab8db7cca7d8377431c60b24ae4c9c6
Closes-bug: #1266241
2014-03-18 15:43:32 +11:00
Dan Bode
215730d791 Update default db username to keystone
The current default db username for keystone is
keystone_admin. This is inconsistent with the default
db username for every other service which use the
same name as the name of the service.

The documented installation instruction for keystone
also use keystone as the database user.

This commit updates the default to use keystone instead of
keyston_admin.

Change-Id: I1cfaf3fbbc691ff9dbef415b69492f9f965dc113
2013-09-10 23:15:07 -07:00
Xingchao Yu
49b248344f Update allowed_hosts conditional statement
In the origin keystone::db::mysql, if the value of $allowed_hosts
contains or equals to $host, then puppet will complain duplicate
declaration error. This patch is aim to update the allowed_hosts
conditonal statement in keystone::db::mysql.

There are two cases to pass $allowed_hosts to $real_allowed_hosts:

   - If $allowed_hosts is array,then remove $host from $allowed_hosts;
   - elsif $allowed_hosts is string and not equivalent to $host;

At last, if $real_allowed_hosts is not undef, then run
keystone::db::mysql::host_access

Fix bug 1206444

Change-Id: I8701aea9344a9151ce3d7ac8fa5792895a5aac6c
2013-08-01 14:48:31 +08:00
danehans
21d91fde33 Remove Unnecessary mysql::server Dependency
Previously, the db::mysql class required mysql::server.  This is
unnecessary since the mysql::db define requires the mysql::config
class for db creattion.  Additionally, this prevents users from
using a different class such as galera::server to manage
the database.

Change-Id: Ifb0fa261f9f5921cf9fe5b309decceab608d4726
2013-07-18 22:38:28 +00:00
Mathieu Gagné
ce84d712de Various Puppet lint fixes
* Fixes following warnings:
    * indentation of => is not properly aligned
    * string containing only a variable
* Fixes following errors:
    * tab character found
    * two-space soft tabs not used
* Remove quotes around class in include/require statements

Change-Id: I7e17d9153d413792e32f9d7c430dfbd37852ba51
2013-07-01 17:07:54 -04:00
Dan Bode
49796d3e10 remove trailing whitespace
Change-Id: I1982e0deac14a829daacbc64a1d89a2277e18a93
2013-05-08 14:13:55 -07:00
Joe Topjian
1090ee2ea7 Removed quotes in allowed_hosts as it was causing a failure when allowed_hosts is an array of hosts 2013-03-24 21:43:29 +00:00
Vladimir Kuklin
adab1bd0b1 Ensure that mysql users are created before keystone-manage db_sync.
Otherwise keystone-manage might not have rights to populate keystone DDL.
2012-11-12 19:32:31 +04:00
Dan Bode
3e3201c15e Updates modules documentation. 2012-10-31 12:34:22 -07:00
Dan Bode
11b39e2bab minor style refactor
move reps to top of manifest
2012-10-23 15:32:40 -07:00
Dan Bode
5c86b6417c unset password defaults.
setting passwords by default in the keystone
manifest is a potential security risk.

This commit unsets them to force users to set their own.
2012-10-23 15:32:40 -07:00
Joe Topjian
83406ecb9c Setup better db reps
Ensure that mysql is installed before we configure
keystone to use it.
2012-10-23 15:32:39 -07:00
John Chilton
96bd60ed06 Allow override of mysql charset. 2012-05-16 09:31:37 -05:00
John Chilton
990522b8d8 Depend on mysql::config instead of mysql::server in order to allow mysql to fully configured before creating database. 2012-05-16 09:01:38 -05:00
François Charlier
64e77ac38f Update to use keystone::db::mysql::host_access 2012-04-24 12:55:18 +02:00
François Charlier
18c611bd76 Allow the database to be on another host
Without any keystone package
Handling allowed_hosts
2012-04-24 12:47:50 +02:00
Dan Bode
8d21eb9121 Move mysql to db::mysql
Since keystone can use different databases, it makes
sense to move the mysql classes to db::mysql. This way
there is a clear standard for where other DB implementations
should be located.

This commit moves keystone::mysql to keystone::db::mysql
and keystone::mysql::access to keystone::db::mysql::host_access.
2012-04-23 21:59:58 -07:00