Openstack TripleO post deployment

Once Overcloud is deployed, few things cloud operator can do e.g. backup, restore, scaling etc. Lets us check one by one:

1. TripleO backup and restore

a) Backing up the Undercloud: we can run a full MySQL backup with additional paths as:

$ openstack undercloud backup --add-path /etc/ \
                            --add-path /var/log/ \
                            --add-path /root/ \
                            --add-path /var/lib/glance/ \
                            --add-path /var/lib/docker/ \
                            --add-path /var/lib/certmonger/ \
                            --add-path /var/lib/registry/ \
                            --add-path /srv/node/ \
                            --exclude-path /home/stack/

b) Backing up the Overcloud control plane services: There is a need to backup the control plane services in the Overcloud, to do so, we need to apply the same approach from the Undercloud, which is, running a backup of the databases and create a filesystem backup. e.g. MySQL backup

$ sudo -i
$ mkdir -p /var/tmp/mysql_backup/
$ MYSQLDBPASS=$(cat /var/lib/config-data/mysql/etc/puppet/hieradata/service_configs.json | grep mysql | grep root_password | awk -F": " '{print $2}' | awk -F"\"" '{print $2}')
$ mysql -uroot -p$MYSQLDBPASS -e "select distinct table_schema from information_schema.tables where engine='innodb' and table_schema != 'mysql';" \
-s -N | xargs mysqldump -uroot -p$MYSQLDBPASS --single-transaction --databases > /var/tmp/mysql_backup/openstack_databases-`date +%F`-`date +%T`.sql # This will dump a database backup called /var/tmp/mysql_backup/openstack_databases-<date>.sql
$ mysql -uroot -p$MYSQLDBPASS -e "SELECT CONCAT('\"SHOW GRANTS FOR ''',user,'''@''',host,''';\"') FROM mysql.user where (length(user) > 0 and user NOT LIKE 'root')" \ -s -N | xargs -n1 mysql -uroot -p$MYSQLDBPASS -s -N -e | sed 's/$/;/' > /var/tmp/mysql_backup/openstack_databases_grants-`date +%F`-`date +%T`.sql

c) Deleting Overcloud nodes:  To delete a specific node from the Overcloud. We use the following command:

$ openstack overcloud node delete --stack $STACK_NAME <hostname-of-compute-node>
 
Scroll to Top