diff options
author | Pradeep Kilambi <pkilambi@redhat.com> | 2016-03-07 11:27:17 -0500 |
---|---|---|
committer | Pradeep Kilambi <pkilambi@redhat.com> | 2016-03-20 10:27:21 -0400 |
commit | 2018c38ed41fe4ffcdc128081218ee6e688bd4fc (patch) | |
tree | 8919ccf1e4bc599f02a585d6318993d0555dbfcb /puppet | |
parent | c0cb85170dbd6f0c812d59d858bfeac9a2bf9de9 (diff) |
Deploy Aodh services, replacing Ceilometer Alarm
Ceilometer Alarm is deprecated in Liberty by Aodh.
This patch:
* manage Aodh Keystone resources
* deploy Aodh API under WSGI, Notifier, Listener and Evaluator
* manage new parameters to customize Aodh deployment
* uses ceilometer DB for the upgrade path
* pacemaker config
* Add migration logic to remove pcs resources
Depends-On: I5333faa72e52d2aa2a622ac2d4b60825aadc52b5
Depends-On: Ib6c9c4c35da3fb55e0ca8e2d5a58ebaf4204d792
Co-Authored-By: Emilien Macchi <emilien@redhat.com>
Change-Id: Ib47a22884afb032ebc1655e1a4a06bfe70249134
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/all-nodes-config.yaml | 11 | ||||
-rw-r--r-- | puppet/controller.yaml | 28 | ||||
-rw-r--r-- | puppet/hieradata/common.yaml | 3 | ||||
-rw-r--r-- | puppet/hieradata/controller.yaml | 6 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller.pp | 16 | ||||
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 89 | ||||
-rw-r--r-- | puppet/vip-config.yaml | 1 |
7 files changed, 153 insertions, 1 deletions
diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 2f2a1e9d..fed9dd31 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -34,6 +34,8 @@ parameters: type: comma_delimited_list ceilometer_api_node_ips: type: comma_delimited_list + aodh_api_node_ips: + type: comma_delimited_list nova_api_node_ips: type: comma_delimited_list nova_metadata_node_ips: @@ -187,6 +189,14 @@ resources: list_join: - "','" - {get_param: ceilometer_api_node_ips} + aodh_api_node_ips: + str_replace: + template: "['SERVERS_LIST']" + params: + SERVERS_LIST: + list_join: + - "','" + - {get_param: aodh_api_node_ips} nova_api_node_ips: str_replace: template: "['SERVERS_LIST']" @@ -272,6 +282,7 @@ resources: # NOTE(gfidente): interpolation with %{} in the # hieradata file can't be used as it returns string ceilometer::rabbit_hosts: *rabbit_nodes_array + aodh::rabbit_hosts: *rabbit_nodes_array cinder::rabbit_hosts: *rabbit_nodes_array glance::notify::rabbitmq::rabbit_hosts: *rabbit_nodes_array heat::rabbit_hosts: *rabbit_nodes_array diff --git a/puppet/controller.yaml b/puppet/controller.yaml index c97012d7..879bde55 100644 --- a/puppet/controller.yaml +++ b/puppet/controller.yaml @@ -17,6 +17,14 @@ parameters: description: The keystone auth secret and db password. type: string hidden: true + AodhApiVirtualIP: + type: string + default: '' + AodhPassword: + default: unset + description: The password for the aodh services. + type: string + hidden: true CeilometerApiVirtualIP: type: string default: '' @@ -1140,6 +1148,7 @@ resources: ceilometer_metering_secret: {get_param: CeilometerMeteringSecret} ceilometer_password: {get_param: CeilometerPassword} ceilometer_store_events: {get_param: CeilometerStoreEvents} + aodh_password: {get_param: AodhPassword} ceilometer_coordination_url: list_join: - '' @@ -1232,6 +1241,7 @@ resources: neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]} neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]} ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]} + aodh_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]} nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]} nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]} horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]} @@ -1536,6 +1546,24 @@ resources: snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name} snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password} + # Aodh + aodh::rabbit_userid: {get_input: rabbit_username} + aodh::rabbit_password: {get_input: rabbit_password} + aodh::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} + aodh::rabbit_port: {get_input: rabbit_client_port} + aodh::debug: {get_input: debug} + aodh::wsgi::apache::ssl: false + aodh::wsgi::apache::bind_host: {get_input: aodh_api_network} + aodh::api::service_name: 'httpd' + aodh::api::host: {get_input: aodh_api_network} + aodh::api::keystone_password: {get_input: aodh_password} + aodh::api::keystone_auth_uri: {get_input: keystone_auth_uri} + aodh::api::keystone_identity_uri: {get_input: keystone_identity_uri} + aodh::auth::auth_password: {get_input: aodh_password} + aodh::db::mysql::password: {get_input: aodh_password} + # for a migration path from ceilometer-alarm to aodh, we use the same database & coordination + aodh::evaluator::coordination_url: {get_input: ceilometer_coordination_url} + # Nova nova::rabbit_userid: {get_input: rabbit_username} nova::rabbit_password: {get_input: rabbit_password} diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 98cec364..46471c3b 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -5,6 +5,9 @@ ssh::server::storeconfigs_enabled: false ceilometer::agent::auth::auth_region: 'regionOne' ceilometer::agent::auth::auth_tenant_name: 'service' +aodh::auth::auth_region: 'regionOne' +aodh::auth::auth_tenant_name: 'service' + nova::api::admin_tenant_name: 'service' nova::network::neutron::neutron_project_name: 'service' nova::network::neutron::neutron_username: 'neutron' diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index e80bee07..3c60e905 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -31,6 +31,7 @@ redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh' # service tenant glance::api::keystone_tenant: 'service' +aodh::api::keystone_tenant: 'service' glance::registry::keystone_tenant: 'service' neutron::server::auth_tenant: 'service' neutron::agents::metadata::auth_tenant: 'service' @@ -143,6 +144,7 @@ tripleo::loadbalancer::redis: true tripleo::loadbalancer::sahara: true tripleo::loadbalancer::swift_proxy_server: true tripleo::loadbalancer::ceilometer: true +tripleo::loadbalancer::aodh: true tripleo::loadbalancer::heat_api: true tripleo::loadbalancer::heat_cloudwatch: true tripleo::loadbalancer::heat_cfn: true @@ -255,3 +257,7 @@ tripleo::firewall::firewall_rules: '127 snmp': port: 161 proto: 'udp' + '128 aodh': + port: + - 8042 + - 13042 diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 0d6a2389..b78648fb 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -113,6 +113,7 @@ if hiera('step') >= 2 { include ::sahara::db::mysql if downcase(hiera('ceilometer_backend')) == 'mysql' { include ::ceilometer::db::mysql + include ::aodh::db::mysql } $rabbit_nodes = hiera('rabbit_node_ips') @@ -568,6 +569,21 @@ if hiera('step') >= 3 { Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$(od -A n -t d -N 3 /dev/urandom) % 86400)) && ${::ceilometer::params::expirer_command}" } + # Aodh + class { '::aodh' : + database_connection => $ceilometer_database_connection, + } + include ::aodh::db::sync + # To manage the upgrade: + Exec['ceilometer-dbsync'] -> Exec['aodh-db-sync'] + include ::aodh::auth + include ::aodh::api + include ::aodh::wsgi::apache + include ::aodh::evaluator + include ::aodh::notifier + include ::aodh::listener + include ::aodh::client + # Heat class { '::heat' : notification_driver => 'messaging', diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 2bb081aa..c91e179e 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -1090,6 +1090,32 @@ if hiera('step') >= 3 { neutron_options => $neutron_options, } + # Aodh + class { '::aodh' : + database_connection => $ceilometer_database_connection, + } + include ::aodh::config + include ::aodh::auth + include ::aodh::client + include ::aodh::wsgi::apache + class { '::aodh::api': + manage_service => false, + enabled => false, + service_name => 'httpd', + } + class { '::aodh::evaluator': + manage_service => false, + enabled => false, + } + class { '::aodh::notifier': + manage_service => false, + enabled => false, + } + class { '::aodh::listener': + manage_service => false, + enabled => false, + } + $snmpd_user = hiera('snmpd_readonly_user_name') snmp::snmpv3_user { $snmpd_user: authtype => 'MD5', @@ -1580,7 +1606,7 @@ if hiera('step') >= 4 { Pacemaker::Resource::Service[$::nova::params::conductor_service_name]], } - # Ceilometer + # Ceilometer and Aodh case downcase(hiera('ceilometer_backend')) { /mysql/: { pacemaker::resource::service { $::ceilometer::params::agent_central_service_name: @@ -1613,8 +1639,10 @@ if hiera('step') >= 4 { # Fedora doesn't know `require-all` parameter for constraints yet if $::operatingsystem == 'Fedora' { $redis_ceilometer_constraint_params = undef + $redis_aodh_constraint_params = undef } else { $redis_ceilometer_constraint_params = 'require-all=false' + $redis_aodh_constraint_params = 'require-all=false' } pacemaker::constraint::base { 'redis-then-ceilometer-central-constraint': constraint_type => 'order', @@ -1626,6 +1654,16 @@ if hiera('step') >= 4 { require => [Pacemaker::Resource::Ocf['redis'], Pacemaker::Resource::Service[$::ceilometer::params::agent_central_service_name]], } + pacemaker::constraint::base { 'redis-then-aodh-evaluator-constraint': + constraint_type => 'order', + first_resource => 'redis-master', + second_resource => "${::aodh::params::evaluator_service_name}-clone", + first_action => 'promote', + second_action => 'start', + constraint_params => $redis_aodh_constraint_params, + require => [Pacemaker::Resource::Ocf['redis'], + Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name]], + } pacemaker::constraint::base { 'keystone-then-ceilometer-central-constraint': constraint_type => 'order', first_resource => 'openstack-core-clone', @@ -1676,6 +1714,55 @@ if hiera('step') >= 4 { require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name], Pacemaker::Resource::Ocf['delay']], } + # Aodh + pacemaker::resource::service { $::aodh::params::evaluator_service_name : + clone_params => 'interleave=true', + } + pacemaker::resource::service { $::aodh::params::notifier_service_name : + clone_params => 'interleave=true', + } + pacemaker::resource::service { $::aodh::params::listener_service_name : + clone_params => 'interleave=true', + } + pacemaker::constraint::base { 'aodh-delay-then-aodh-evaluator-constraint': + constraint_type => 'order', + first_resource => 'delay-clone', + second_resource => "${::aodh::params::evaluator_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Ocf['delay']], + } + pacemaker::constraint::colocation { 'aodh-evaluator-with-aodh-delay-colocation': + source => "${::aodh::params::evaluator_service_name}-clone", + target => 'delay-clone', + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Ocf['delay']], + } + pacemaker::constraint::base { 'aodh-evaluator-then-aodh-notifier-constraint': + constraint_type => 'order', + first_resource => "${::aodh::params::evaluator_service_name}-clone", + second_resource => "${::aodh::params::notifier_service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]], + } + pacemaker::constraint::colocation { 'aodh-notifier-with-aodh-evaluator-colocation': + source => "${::aodh::params::notifier_service_name}-clone", + target => "${::aodh::params::evaluator_service_name}-clone", + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Service[$::aodh::params::notifier_service_name]], + } + pacemaker::constraint::colocation { 'aodh-listener-with-aodh-evaluator-colocation': + source => "${::aodh::params::listener_service_name}-clone", + target => "${::aodh::params::evaluator_service_name}-clone", + score => 'INFINITY', + require => [Pacemaker::Resource::Service[$::aodh::params::evaluator_service_name], + Pacemaker::Resource::Service[$::aodh::params::listener_service_name]], + } if downcase(hiera('ceilometer_backend')) == 'mongodb' { pacemaker::constraint::base { 'mongodb-then-ceilometer-central-constraint': constraint_type => 'order', diff --git a/puppet/vip-config.yaml b/puppet/vip-config.yaml index 5e2f698f..ebecd0cb 100644 --- a/puppet/vip-config.yaml +++ b/puppet/vip-config.yaml @@ -26,6 +26,7 @@ resources: nova_api_vip: {get_input: nova_api_vip} nova_metadata_vip: {get_input: nova_metadata_vip} ceilometer_api_vip: {get_input: ceilometer_api_vip} + aodh_api_vip: {get_input: aodh_api_vip} heat_api_vip: {get_input: heat_api_vip} horizon_vip: {get_input: horizon_vip} redis_vip: {get_input: redis_vip} |