Mikhail S Medvedev 88258812de Add initial implementation to deploy ciwatch
Most of boilerplate was copied from other infra puppet modules,
puppet-zuul in particular.

No beaker tests yet.

Using MySQL back end.

Spec: https://specs.openstack.org/openstack-infra/infra-specs/specs/deploy-ci-dashboard.html

Change-Id: I652271854163ba6c78ce602e9b93398e4d6e983e
2016-04-14 10:44:24 -05:00

42 lines
955 B
Puppet

class ciwatch::mysql(
$mysql_root_password,
$mysql_password,
){
$mysql_data = load_module_metadata('mysql', true)
if $mysql_data == {} {
class { '::mysql::server':
config_hash => {
'root_password' => $mysql_root_password,
'default_engine' => 'InnoDB',
'bind_address' => '127.0.0.1',
}
}
} else {
# If it has metadata.json, assume it's new enough to use this interface
class { '::mysql::server':
root_password => $mysql_root_password,
override_options => {
'mysqld' => {
'default-storage-engine' => 'InnoDB',
}
},
}
}
include ::mysql::server::account_security
mysql::db { 'ciwatch':
user => 'ciwatch',
password => $mysql_password,
host => 'localhost',
grant => ['all'],
charset => 'utf8',
require => [
Class['mysql::server'],
Class['mysql::server::account_security'],
],
}
}