Commit Graph

24 Commits

Author SHA1 Message Date
Takashi Kajinami 3021cd9daf replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Depends-on: https://review.opendev.org/c/openstack/puppet-openstacklib/+/885996
Change-Id: I144468b4f5536a48702e457f2a5db879f3ca217a
2023-06-23 09:26:59 +09:00
Takashi Kajinami 1de8cdd7a4 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: I1e0061aea6782bd61e745bb39683589794231a5f
2020-05-19 20:00:03 +09:00
Tobias Urdin 5f6411c3dd Convert all class usage to relative names
Change-Id: I9982b8476ca9dab8a338b66db75d6da6519f9266
2019-12-08 23:07:36 +01:00
Tobias Urdin e46b67d242 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/

Change-Id: I422be4bfb6fd6f73f0b24ae9464c5c85689594e1
2019-02-23 14:52:57 +01:00
Tobias Urdin be384424e4 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: I7244add57cf29c851ecd3cf49b3be721a13549d9
2019-02-08 12:11:30 +01:00
zhubingbing a077c07360 Fix annotations
Change-Id: I2c9bd5e928d300f6793074501072feaa35d7e84b
2018-06-15 15:07:37 +08:00
iberezovskiy 3b49812852 Drop all current deprecated parameters for heat
Change-Id: I71ef16d9467230c9430458971266c67ae2def238
2016-04-22 14:45:22 +03:00
Clayton O'Neill dca9fe942b Move deps & external hooks into a standalone class
Previously the anchors and dependencies that allow external hooks were
all in the main ::heat class.  However, if you wanted to include just
::heat::db::mysql, then it would fail, since it assumed the main heat
class was included.  This moves all of those resources and relationships
into a new class, ::heat::deps.  All of the classes will now include
this class so that the anchors and deps are always evaluated even if
only a portion of the classes are used, and even if ::heat isn't pulled
in.

Change-Id: I4297df160a7afae2b66c1ac76e37de313fa4fb09
Closes-Bug: #1507934
2015-10-20 09:57:36 -04:00
Clayton O'Neill b2f791400d Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: I032ee01505e0cbc125b0e219c436b77c93f57720
2015-08-29 03:19:02 +00:00
Emilien Macchi b531066283 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: I8037d3c1971e4b9bc965a9fd0884e1839585d071
Closes-bug: #1446375
2015-04-21 18:53:53 -04:00
Gael Chamoulaud 45a35dc2ec Add puppet-lint-param-docs plugins to puppet-lint
- This puppet-lint plugin checks if all parameters are documented
- Fix some unaligned arrows
- https://github.com/domcleal/puppet-lint-param-docs

Change-Id: I5e73747b726191bc4fc55e6e227892507e185871
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2014-11-13 12:42:40 +01:00
Colleen Murphy a95a9435dc Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: I71e1bf084139524e41276e5cbd7f5be02d07e825
2014-09-08 16:34:10 -07:00
Jenkins 0d857a063b Merge "Use 2.2 as the default mysql_module" 2014-07-29 23:03:50 +00:00
Sebastien Badia 5837aaeaad 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: I4ba7932d679764576a46ea599499991a5c57fc56
Closes-Bug: 1349316
2014-07-28 14:00:07 +02:00
Soren Hansen 4b2e57b4f0 Use 2.2 as the default mysql_module
Change-Id: Ib82957123932f4795b9826dab7b88c572ffe57d9
2014-07-16 18:46:00 +05:30
Colleen Murphy 2ab35c8017 Fix title of database sync Exec in mysql class
The mysql class incorrectly defined an Exec collector to match on 'heat-manage
db_sync', which is not a real Exec in the catalog. The collector silently
failed to find this resource and the notify relationship between the database and the
sync command was never created. This changes the collector to match on
heat-dbsync, which is a real exec defined in init.pp.

Change-Id: Icc8ceb25b525ba83e66c719abca31799a4d2d223
2014-07-09 11:47:38 -07:00
Chris Hoge d1f32f72a0 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-heat 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: I2f60b610eab4d03552352108d0dfd4f2b796fc70
2014-04-23 14:35:44 -07:00
Ivan Chavero 455fd63406 Change heat mysql default charset to utf8
Changed the default charset to uf8 and the
collation to utf8_unicode_ci.

Change-Id: I52e4af03d58149c705a5a6e1effe9cac130f9ae3
2014-03-31 22:41:09 -07:00
Michael Chapman 074675b1ac Add support for puppetlabs-mysql 2.2
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
heat 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: I4d268d793740c31493acd5999dd3f8501cc1d281
2014-03-18 16:08:56 +11:00
danehans 65766e8dee Removes Unneeded mysql::server Dependency
Previously, the heat::db::mysql class contained a dependency on
mysql::server. This dependency is unneeded since mysql::db requires
mysql::config, which depends on mysql::server. Additionally, the
mysql::server dependency causes MYSQL HA installations such as
Galera to fail. Lastly, this aligns the class more closely with
the other [OPENSTACK_SERVICE]::db::mysql classes.

Change-Id: Ie6c4d3c8aaa531502bc5b9cd66a547f1f506385f
2013-12-03 20:51:56 +00:00
Xingchao Yu e9e261be3b Update allowed_hosts conditional statement
In the origin heat::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 heat::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
heat::db::mysql::host_access

Add heat_db_mysql_spec for related test.

Fix bug 1206444

Change-Id: Iac6a32fb614c9ad19f9eaa3aaa883cb3bf9aa2ef
2013-08-05 14:25:45 +08:00
Francesco Vollero ac80ddbf6f Changes to make it work with Fedora 2013-07-22 18:13:55 +02:00
Émilien Macchi a7e8f56feb Drop db-sync stuff 2013-06-09 23:06:40 +02:00
Émilien Macchi b63a40b030 Basic structure + DB + Client support 2013-05-30 15:20:11 +02:00