33 Commits

Author SHA1 Message Date
Takashi Kajinami
8ab7ef4044 Remove password hash generation in each puppet modules
... and migrate it to openstacklib so that all logics about database
configuration are implemented in one common place.

Depends-on: https://review.opendev.org/#/c/728595/
Change-Id: Ie564c3ae6023a36f317b963872059509754970e5
2020-05-19 20:14:26 +09:00
Tobias Urdin
fa11274b2f Convert all class usage to relative names
Change-Id: Ia631adf31be1eeadb7ab0f12b75f1eaed73d5fbf
2019-12-08 23:09:22 +01:00
Tobias Urdin
7fea7a2145 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Depends-On: https://review.openstack.org/#/c/639215/
Change-Id: Idd720f18893bea0ec1d26859e0a6907a5daa8980
2019-02-25 23:02:21 +00:00
Tobias Urdin
16f2265203 Use puppet 4 compatible mysql functions
These was introduced in 6.0.0 and is required to
support later version of puppetlabs-mysql.

Change-Id: I82ecf608820f940cffc53b679545d3e9aee71195
2019-02-08 12:14:47 +01:00
ZhongShengping
5f5eb4c369 Cleanup documentation
Make sure documentation is the same and follow
the standard which we are trying to enforce on
all modules.

Change-Id: I215f28f4ce417a3c098cbf4be21967b2ed4013bb
2018-12-13 17:11:02 +08:00
zhubingbing
487af5db88 Fix annotations
Change-Id: Ieef783b15ad2f5fb23567720d3cc248eda9b98a5
2018-06-15 15:07:37 +08:00
Matt Fischer
a5da52ec52 Keystone hooks support
This code moves all deps to an external class so that Keystone can be
installed with mechanisms besides packages (like venv or docker). This
also cleans-up the dependency tree by removing false or confusing
dependencies.

Change-Id: If69cd7cba267f75faad51fdbc80a58b24d2095d8
Co-Author: Clayton O'Neill <clayton.oneill@twcable.com>
2016-03-15 20:11:25 -06:00
Swapnil Kulkarni (coolsvap)
25905128a0 Update typos
Change-Id: Id44ff95e32fa80aef8ec5a786d327fca7ac78c62
2016-01-04 14:51:30 +05:30
Matt Fischer
d79020d163 Remove deprcated mysql_module
This has been deprecated and non-functional for awhile, remove it.

Change-Id: Ibc556b1d5c698d343853e1414c4e7861b0999e66
2015-10-21 21:30:39 -06:00
Emilien Macchi
1e4ede1730 MySQL: change default MySQL collate to utf8_general_ci
Install & configure MySQL database by using utf8_general_ci collation
which is the way documented in OpenStack [1] and already the default
in puppetlabs-mysql [2].

[1] http://goo.gl/GA5gyZ
[2] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/db.pp#L7

Change-Id: I2d5fc688c75c54703624797eb1829973623ef916
Closes-bug: #1446375
2015-04-21 18:54:56 -04:00
Sebastien Badia
a3bdaad473 Add missing puppetdoc and lint all parameter documentation
Un-pin puppet-lint gem and add puppet-lint-param-docs, this commit also
add missing puppetdoc and fixes lint issues.

Change-Id: I1eefc743c68c75eb54a65b3cc539922ef3a3b04d
2015-03-15 18:09:16 +01:00
Colleen Murphy
6e108f23b8 Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: I5dc293c1b8033000523fae504f789199599cf447
2014-08-28 08:56:55 -05:00
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