Merge "Add gateway_ip in OS::Neutron::Subnet"
[apex-tripleo-heat-templates.git] / extraconfig / tasks / aodh_data_migration.sh
1 #!/bin/bash
2 #
3 # This delivers the aodh data migration script to be invoked as part of the tripleo
4 # major upgrade workflow to migrate all the alarm data from mongodb to mysql.
5 # This needs to run post controller node upgrades so new aodh mysql db configured and
6 # running.
7 #
8 set -eu
9
10 #Get existing mongodb connection
11 MONGO_DB_CONNECTION="$(crudini --get /etc/ceilometer/ceilometer.conf database connection)"
12
13 # Get the aodh database string from hiera data
14 MYSQL_DB_CONNECTION="$(crudini --get /etc/aodh/aodh.conf database connection)"
15
16 #Run migration
17 /usr/bin/aodh-data-migration --nosql-conn $MONGO_DB_CONNECTION --sql-conn $MYSQL_DB_CONNECTION
18
19