tripleo-image-elements/elements/mysql-migration
Ghe Rivero 7d37fb5eb2 Rename os-config-applier to os-apply-config
There are some elements that are still using the old os-config-applier
to store the configuration templates.

Change-Id: I17def1e5e0ca09d5f400d7ba1f7bd82ea804ab42
2014-07-09 06:00:27 +00:00
..
os-apply-config Rename os-config-applier to os-apply-config 2014-07-09 06:00:27 +00:00
os-refresh-config/migration.d Add quotes around $DISTRO 2013-12-18 16:51:50 +01:00
README.md Use os-apply-config everywhere 2013-11-20 09:12:15 +00:00
element-deps Rename os-config-applier to os-apply-config. 2013-06-14 20:39:18 +12:00

README.md

Migrate data from another MySQL server into the local one using os-apply-config and os-refresh-config.

Please note the migration process is destructive to any data currently in the MySQL database running on the target host. Safeguards are in place to ensure the process only happens once on any machine.

Configuration

Pass in Heat Metadata with the following structure in the OpenStack::Config sub-key.

mysql:
  users:
    root:
      username: rootuser
      password: XXXXXXX
    dump:
      username: dumpuser
      password: XXXXXXX
mysql-migration:
  bootstrap_host: x.y.z
  slave_user: slave-bot1
  slave_password: XXXXXXXX

The migration process assumes dump and root exist on the bootstrap_host and have access from this host.

The dump user will be used to dump data from bootstrap_host. The root user will be used for localhost access after the database is migrated. If slave_user and slave_password are set to non-empty strings, replication will be setup against the bootstrap_host using this user/password combination.

Special /root/.my.cnf

As a convenience, we copy the given dump and root user names and passwords to /root/.my.cnf after migration. If this file is overwritten, they will also be available as /root/metadata.my.cnf