Merge "Remove local grafana database"

This commit is contained in:
Jenkins 2015-07-31 21:19:47 +00:00 committed by Gerrit Code Review
commit 7e037ec611
2 changed files with 8 additions and 27 deletions

View File

@ -123,14 +123,13 @@ node 'grafana.openstack.org' {
sysadmins => hiera('sysadmins', []),
}
class { 'openstack_project::grafana':
admin_password => hiera('grafana_admin_password', 'XXX'),
admin_user => hiera('grafana_admin_user', 'username'),
mysql_host => hiera('grafana_mysql_host', 'localhost'),
mysql_name => hiera('grafana_mysql_name', 'XXX'),
mysql_password => hiera('grafana_mysql_password', 'XXX'),
mysql_root_password => hiera('grafana_mysql_root_password', 'XXX'),
mysql_user => hiera('grafana_mysql_user', 'username'),
secret_key => hiera('grafana_secret_key', 'XXX'),
admin_password => hiera('grafana_admin_password', 'XXX'),
admin_user => hiera('grafana_admin_user', 'username'),
mysql_host => hiera('grafana_mysql_host', 'localhost'),
mysql_name => hiera('grafana_mysql_name', 'XXX'),
mysql_password => hiera('grafana_mysql_password', 'XXX'),
mysql_user => hiera('grafana_mysql_user', 'username'),
secret_key => hiera('grafana_secret_key', 'XXX'),
}
}

View File

@ -7,7 +7,6 @@
#
class openstack_project::grafana (
$mysql_password,
$mysql_root_password,
$admin_password = '',
$admin_user = 'admin',
$grafana_cfg = {},
@ -51,25 +50,8 @@ class openstack_project::grafana (
$grafana_cfg_merged = merge($grafana_cfg_defaults, $grafana_cfg)
class { 'mysql::server':
config_hash => {
'bind_address' => $mysql_host,
'default_engine' => 'InnoDB',
'root_password' => $mysql_root_password,
}
}
mysql::db { $mysql_name:
grant => ['all'],
host => $mysql_host,
password => $mysql_password,
user => $mysql_user,
require => Class['mysql::server'],
}
class { '::grafana':
cfg => $grafana_cfg_merged,
require => Mysql::Db[$mysql_name],
cfg => $grafana_cfg_merged,
}
apache::vhost { $vhost_name: