Upgrade Galera automatically

Upgrade Galera automatically


This feature is available starting from the MCP 2019.2.5 maintenance update. Before enabling the feature, follow the steps described in Apply maintenance updates.

This section instructs you on how to upgrade the Galera cluster automatically through Jenkins using the Deploy - upgrade Galera cluster pipeline job.

To upgrade Galera:

  1. Log in to the Salt Master node.

  2. Open the cluster level of your deployment model.

  3. Include the Galera upgrade pipeline job to DriveTrain:

    1. In the classes/cluster/<cluster_name>/cicd/control/leader.yml file, add the following class:

      - system.jenkins.client.job.deploy.update.upgrade_galera
    2. Apply the jenkins.client state on the Jenkins nodes:

      salt -C 'I@jenkins:client' state.sls jenkins.client
    3. In the classes/cluster/<cluster_name>/infra/init.yml file, set the openstack_upgrade_enabled parameter to true:

          openstack_upgrade_enabled: true
    4. Refresh pillars on the dbs* nodes:

      salt 'dbs*' saltutil.refresh_pillar
  4. Add repositories with new Galera packages:

    1. Apply the linux.system.repo state on the dbs* nodes:

      salt 'dbs*' state.sls linux.system.repo
    2. Update the /etc/salt/minion.d/_orchestration.conf file:

      salt 'cfg*' state.sls salt.master


      Verify that you have installed the latest Galera Salt formula and it is present in /etc/salt/minion.d/_orchestration.conf. The file should include the galera line.

  5. Log in to the Jenkins web UI.

  6. Open the Deploy - upgrade Galera cluster pipeline.

  7. Specify the following parameters as required:

    Deploy - upgrade Galera cluster pipeline parameters
    Parameter Description
    INTERACTIVE Specifies the mode to get the detailed description of the pipeline job flow through the stages.
    SHUTDOWN_CLUSTER Shuts down all MySQL instances on the target nodes during upgrade.
    OS_DIST_UPGRADE Upgrades system packages including kernel using apt-get dist-upgrade. Optional.
    OS_UPGRADE Upgrades all installed applications using apt-get upgrade. Optional.
    SALT_MASTER_CREDENTIALS Defines the Salt Master node credentials to use for connection, defaults to salt.
    SALT_MASTER_URL Defines the Salt Master node host URL with the salt-api port, defaults to the jenkins_salt_api_url parameter. For example,
    TARGET_SERVERS Adds the target database server nodes. Defaults to dbs*.
  8. Click Deploy.

    To monitor the deployment process, follow the instructions in MCP Deployment Guide: View the deployment details.

    The Deploy - upgrade Galera cluster pipeline workflow
    Stage Description
    Pre-upgrade Only non-destructive actions are applied during this phase. Basic service verification is performed. The job is launched on all target servers before moving to the next stage.
    Stop the Galera cluster

    All Galera clusters are stopped on the TARGET_SERVERS nodes in the reverse order. For example, dbs03, dbs02, and then dbs01.

    OpenStack APIs are not accessible starting from this point. This does not affect the data plane services such as OVS or KVM nodes.

    Upgrade Galera The Galera code is upgraded. No workload downtime is expected.
    Upgrade OS Optional. Launches only if OS_UPGRADE or OS_DIST_UPGRADE is selected. A reboot can be performed if required. When the node is back online, the basic service checks are performed.
    Start the Galera cluster The Galera cluster is being started on the TARGET_SERVERS nodes starting with the last instance stooped. For example, the nodes are started in the following order: dbs01, dbs02, and dbs03.
  9. Revert the changes in the classes/cluster/<cluster_name>/infra/init.yml file made during step 3.3.