Change Aodh to use own backend
authorPradeep Kilambi <pkilambi@redhat.com>
Mon, 13 Jun 2016 17:52:31 +0000 (13:52 -0400)
committerEmilien Macchi <emilien@redhat.com>
Mon, 20 Jun 2016 18:06:12 +0000 (18:06 +0000)
Currently aodh uses ceilometer backend, instead
change it to use its own mysql db.

Change-Id: Idaa879af4e6946e804111d581402e620beb89885

puppet/controller.yaml
puppet/hieradata/database.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index 70989cc..0afad0a 100644 (file)
@@ -694,6 +694,15 @@ resources:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/gnocchi'
+        aodh_dsn:
+          list_join:
+            - ''
+            - - {get_param: [EndpointMap, MysqlInternal, protocol]}
+              - '://aodh:'
+              - {get_param: AodhPassword}
+              - '@'
+              - {get_param: [EndpointMap, MysqlInternal, host]}
+              - '/aodh'
         gnocchi_internal_url: {get_param: [EndpointMap, GnocchiInternal, uri]}
         gnocchi_public_url: { get_param: [ EndpointMap, GnocchiPublic, uri ] }
         gnocchi_admin_url: { get_param: [ EndpointMap, GnocchiAdmin, uri ] }
@@ -962,6 +971,7 @@ resources:
                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
 
                 # Aodh
+                aodh_mysql_conn_string: {get_input: aodh_dsn}
                 aodh::rabbit_userid: {get_input: rabbit_username}
                 aodh::rabbit_password: {get_input: rabbit_password}
                 aodh::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
index 4eb199c..f2c95de 100644 (file)
@@ -69,6 +69,15 @@ gnocchi::db::mysql::allowed_hosts:
   - '%'
   - "%{hiera('mysql_bind_host')}"
 
+# Aodh
+aodh::db::mysql::user: aodh
+aodh::db::mysql::host: "%{hiera('mysql_virtual_ip')}"
+aodh::db::mysql::dbname: aodh
+aodh::db::mysql::allowed_hosts:
+  - '%'
+  - "%{hiera('mysql_bind_host')}"
+
+
 sahara::db::mysql::user: sahara
 sahara::db::mysql::host: "%{hiera('mysql_virtual_ip')}"
 sahara::db::mysql::dbname: sahara
index 6084c95..431b739 100644 (file)
@@ -84,8 +84,8 @@ if hiera('step') >= 2 {
   }
   if downcase(hiera('ceilometer_backend')) == 'mysql' {
     include ::ceilometer::db::mysql
-    include ::aodh::db::mysql
   }
+  include ::aodh::db::mysql
 
   $enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
 
@@ -280,11 +280,9 @@ if hiera('step') >= 4 {
 
   # Aodh
   class { '::aodh' :
-    database_connection => $ceilometer_database_connection,
+    database_connection => hiera('aodh_mysql_conn_string'),
   }
   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
index 1327111..f330820 100644 (file)
@@ -269,6 +269,10 @@ if hiera('step') >= 2 {
         require => Exec['galera-ready'],
       }
     }
+
+    class { '::aodh::db::mysql':
+        require => Exec['galera-ready'],
+      }
   }
 
   # Ceph
@@ -520,7 +524,7 @@ MYSQL_HOST=localhost\n",
 
   # Aodh
   class { '::aodh' :
-    database_connection => $ceilometer_database_connection,
+    database_connection => hiera('aodh_mysql_conn_string'),
   }
   include ::aodh::config
   include ::aodh::auth