Updating the Distributed DDNS Data Node database cluster - Adaptive Applications - BlueCat Gateway - 21.1

BlueCat Distributed DDNS Administration Guide

prodname
BlueCat Gateway
version_custom
21.1

Updating the Distributed DDNS Data Node database cluster allows you to take advantage of new features, while maintaining support of your DDNS Database Node database cluster software. Performing a rolling update can be time consuming, depending on the size of the database and the number of nodes that exist in the cluster. During the database update, the cluster operates at a reduced capacity while nodes update.

Before you begin

BlueCat recommends performing a database backup of the cluster before proceeding to update the database. For more information on performing a database backup, refer to Backing up the database.

Performing a rolling update of the database cluster

  1. Log in to the console of the host machine of the first node in the cluster.
  2. Load the Distributed DDNS Data Node image using the following command:
    docker load -i <node_tar_file>
  3. Ensure that there are no connections to the first node by transferring all client connections from the first node.
  4. Stop all configuration daemons and the database service on the node by running the following commands:
    docker exec <node1_name> supervisorctl stop config_daemon:*
    docker exec <node1_name> supervisorctl stop mariadb
  5. Stop and remove the old Distributed DDNS Data Node container from the host machine by running the following commands:
    docker stop <node1_name>
    docker rm <node1_name>
    Attention: Ensure that you do not remove any Docker volumes created by the old Distributed DDNS Data Node container. Verify that the daemon-config, mariadb-config, and mariadb-data volumes are still available on the host machine by running the following command:
    docker volume ls
  6. Install the updated version of the Distributed DDNS Data Node image by running the following command:
    docker run -d \
    --restart=unless-stopped \
    --net=host \
    --name <node_name> \
    -v mariadb-config:/etc/mysql \
    -v mariadb-data:/var/lib/mysql \
    -v mariadb-backup:/opt/backup/ \
    -v daemon-config:/daemon_run \
    <new_mariadb_image_name>
    For example:
    docker run -d
    --restart=unless-stopped \
    --net=host \
    --name node1 \
    -v mariadb-config:/etc/mysql \
    -v mariadb-data:/var/lib/mysql \
    -v mariadb-backup:/opt/backup/ \
    -v daemon-config:/daemon_run \
    quay.io/bluecat/distributed_ddns_database:21.1
  7. Verify that the node has successfully joined the cluster and finished synchronizing by checking the Distributed DDNS Data Node container log using the following command:
    docker logs -f <node1_name>

    The node must successfully join the cluster and synchronize before you proceed to update the remaining nodes in the cluster.

Once the node has successfully installed the updated software, you can proceed to update the next node in the cluster.

Performing a database schema update

Before you proceed to update the database schema, you must first update the database software. You can update the schema on any node of the database cluster. Once the schema has been updated on one node, the remaining nodes in the cluster receive the updated schema through database replication.
  1. Log in to the console of the host machine of a node in the cluster.
  2. Check if a database schema update is available using the following command:
    docker exec <node_name> dbmigration --check-upgrade-path

    The command displays a list of available updates.

  3. Update the database schema using the following command:
    docker exec <node_name> dbmigration --upgrade-schema

    The command updates the database schema to the latest version that matches the database software installed on the nodes.

Once the database schema has been updated, the remaining nodes in the cluster install the updated schema through replication.