diff options
-rw-r--r-- | puppet/controller-puppet.yaml | 13 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 2 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 27 |
3 files changed, 25 insertions, 17 deletions
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 9184a92a..c3efc82e 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -560,12 +560,6 @@ resources: - ':35357/v2.0' ceilometer_metering_secret: {get_param: CeilometerMeteringSecret} ceilometer_password: {get_param: CeilometerPassword} - ceilometer_dsn: - list_join: - - '' - - - 'mysql://ceilometer:unset@' - - {get_param: VirtualIP} - - '/ceilometer' snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName} snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword} nova_password: {get_param: NovaPassword} @@ -727,7 +721,8 @@ resources: keystone::public_bind_host: {get_input: controller_host} keystone::admin_bind_host: {get_input: controller_host} keystone::debug: {get_input: debug} - + # MongoDB + mongodb::server::bind_ip: {get_input: controller_host} # MySQL admin_password: {get_input: admin_password} enable_galera: {get_input: enable_galera} @@ -781,7 +776,6 @@ resources: ceilometer::api::keystone_password: {get_input: ceilometer_password} ceilometer::api::keystone_auth_uri: {get_input: keystone_auth_uri} ceilometer::api::keystone_identity_uri: {get_input: keystone_identity_uri} - ceilometer::db::database_connection: {get_input: ceilometer_dsn} ceilometer::agent::auth::auth_password: {get_input: ceilometer_password} snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} @@ -803,10 +797,13 @@ resources: nova::network::neutron::neutron_admin_password: {get_input: neutron_password} nova::network::neutron::neutron_url: {get_input: neutron_url} nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url} + # Rabbit + rabbitmq::node_ip_address: {get_input: controller_host} rabbitmq::erlang_cookie: {get_input: rabbit_cookie} # Misc + memcached::listen_ip: {get_input: controller_host} neutron_public_interface_ip: {get_input: neutron_public_interface_ip} ntp::servers: {get_input: ntp_servers} control_virtual_interface: {get_input: control_virtual_interface} diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index 1e1f50a7..11ec5e27 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -11,6 +11,8 @@ rabbitmq::port: '5672' rabbitmq::package_source: undef rabbitmq::repos_ensure: false +mongodb::server::replset: tripleo + # service tenant nova::api::admin_tenant_name: 'service' glance::api::keystone_tenant: 'service' diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 0727eda3..aa053bd8 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -56,6 +56,21 @@ if hiera('step') >= 2 { include ::ntp } + # MongoDB + include ::mongodb::globals + include ::mongodb::server + $mongo_node_ips = split(downcase(hiera('mongo_node_ips')), ',') + $mongo_node_ips_with_port = suffix($mongo_node_ips, ':27017') + $mongo_node_string = join($mongo_node_ips_with_port, ',') + + $mongodb_replset = hiera('mongodb::server::replset') + $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}" + if downcase(hiera('bootstrap_nodeid')) == $::hostname { + mongodb_replset { $mongodb_replset : + members => $mongo_node_ips_with_port, + } + } + if str2bool(hiera('enable_galera', 'true')) { $mysql_config_file = '/etc/my.cnf.d/galera.cnf' } else { @@ -124,14 +139,6 @@ if hiera('step') >= 2 { dbname => $heat_dsn[6], allowed_hosts => $allowed_hosts, } - $ceilometer_dsn = split(hiera('ceilometer::db::database_connection'), '[@:/?]') - class { 'ceilometer::db::mysql': - user => $ceilometer_dsn[3], - password => $ceilometer_dsn[4], - host => $ceilometer_dsn[5], - dbname => $ceilometer_dsn[6], - allowed_hosts => $allowed_hosts, - } $rabbit_nodes = split(downcase(hiera('rabbit_node_names', $::hostname)), ',') if count($rabbit_nodes) > 1 { @@ -344,13 +351,15 @@ if hiera('step') >= 3 { # Ceilometer include ::ceilometer include ::ceilometer::api - include ::ceilometer::db include ::ceilometer::agent::notification include ::ceilometer::agent::central include ::ceilometer::alarm::notifier include ::ceilometer::alarm::evaluator include ::ceilometer::expirer include ::ceilometer::collector + class { '::ceilometer::db' : + database_connection => $ceilometer_mongodb_conn_string, + } class { 'ceilometer::agent::auth': auth_url => join(['http://', hiera('controller_virtual_ip'), ':5000/v2.0']), } |