[ English | русский | español | Deutsch | Indonesia | English (United Kingdom) ]

Wichtige Upgrades

This guide provides information about the upgrade process from 2023.2 or 2023.1 to 2024.1 for OpenStack-Ansible.

Bemerkung

You can upgrade between sequential releases or between releases marked as SLURP.

Einführung

For upgrades between major versions, the OpenStack-Ansible repository provides playbooks and scripts to upgrade an environment. The run-upgrade.sh script runs each upgrade playbook in the correct order, or playbooks can be run individually if necessary. Alternatively, a deployer can upgrade manually.

Weitere Informationen zum Hauptaktualisierungsprozess finden Sie unter Aktualisierung mit einem Script und Manuelle Aktualisierung.

Warnung

Upgrading to master is not recommended. Master is under heavy development, and is not stable. Testen Sie dies zunächst in einer Entwicklungsumgebung.

Aktualisierung mit einem Script

The 2024.1 release series of OpenStack-Ansible contains the code for migrating from 2023.2 or 2023.1 to 2024.1.

Ausführen des Upgrade-Skripts

To upgrade from 2023.2 or 2023.1 to 2024.1 by using the upgrade script, perform the following steps in the openstack-ansible directory:

  1. Wechseln Sie in das Stammverzeichnis des Repository-Klons:

    # cd /opt/openstack-ansible
    
  2. Führen Sie die folgenden Befehle aus:

    # git checkout master
    # ./scripts/run-upgrade.sh

Für mehr Informationen über die Schritte, die das Script ausführt, schauen Sie Manuelle Aktualisierung.

Manuelle Aktualisierung

Manuelle Aktualisierungen sind nützlich, wenn die Änderungen des Aktualisierungsprozesses im Fokus stehen (z.B. in sehr grossen Bereitstellungen mit strikten SLA Anforderungen) oder andere durchgeführte Aktualisierungsautomatisierungen hinter OpenStack-Ansible.

Die hier aufgeführten Schritte stimmen mit denen überein, die das Skript `` run-upgrade.sh`` ausführt. Sie können diese Schritte mehrmals sicher ausführen.

Preflight Prüfung

Before starting with the upgrade, perform preflight health checks to ensure your environment is stable. If any of those checks fail, ensure that the issue is resolved before continuing.

Überprüfen Sie die 2024.1 Freisetzung

Stellen Sie sicher, dass sich Ihr OpenStack-Ansible-Code auf latest 2024.1 befindet markierte Version.

# git checkout master

Bereiten Sie die Shell-Variablen vor

Definieren Sie diese Variablen, um beim Ausführen der verbleibenden Upgrade-Aufgaben die Eingabe zu reduzieren. Da es sich bei diesen Umgebungsvariablen um Verknüpfungen handelt, ist dieser Schritt optional. Wenn Sie möchten, können Sie während des Upgrades direkt auf die Dateien verweisen.

# cd /opt/openstack-ansible
# export MAIN_PATH="$(pwd)"
# export SCRIPTS_PATH="${MAIN_PATH}/scripts"

Backup der existierenden OpenStack-Ansible Konfiguration

Machen Sie ein Backup der Konfiguration der Umgebung:

# source_series_backup_file="/openstack/backup-openstack-ansible-2023.2.tar.gz"
# tar zcf ${source_series_backup_file} /etc/openstack_deploy /etc/ansible/ /usr/local/bin/openstack-ansible.rc

Bootstrappen der neuen Ansible und OSA Rollen

To ensure that there is no currently set ANSIBLE_INVENTORY to override the default inventory location, we unset the environment variable.

# unset ANSIBLE_INVENTORY

Ansible erneut boostrappen, um sicherzustellen, dass alle OpenStack-Ansible-Rollenabhängigkeiten vorhanden sind, bevor Sie Playbooks von 2024.1 ausführen.

# ${SCRIPTS_PATH}/bootstrap-ansible.sh

Wechseln Sie in das Verzeichnis der Playbooks

Change to the playbooks directory to simplify the CLI commands from here on in the procedure, given that most playbooks executed are in this directory.

# cd playbooks

Implement changes to OSA configuration

If there have been any OSA variable name changes or environment/inventory changes, there is a playbook to handle those changes to ensure service continuity in the environment when the new playbooks run. The playbook is tagged to ensure that any part of it can be executed on its own or skipped. Please review the contents of the playbook for more information.

# openstack-ansible "${SCRIPTS_PATH}/upgrade-utilities/deploy-config-changes.yml"

Bemerkung

With upgrade to 2024.1 (Caracal) release usage of RabbitMQ Quorum Queues is enabled by default. Migration to usage of Quorum Queues results in prolonged downtime for services during upgrade.

To reduce downtime you might want to set oslomsg_rabbit_quorum_queues: false at this point and migrate to Quorum Queues usage after OpenStack upgrade is done.

Please, check RabbitMQ maintenance for more information about switching between Quourum and HA Queues.

Aktualisieren Sie Hosts

Aktualisieren Sie die Host-Computer, bevor Sie die Infrastruktur und OpenStack installieren.

Warnung

Usage of non-trusted certificates for RabbitMQ is not possible due to requirements of newer amqp versions.

After that you can proceed with standard OpenStack upgrade steps:

# openstack-ansible setup-hosts.yml --limit '!galera_all:!rabbitmq_all' -e package_state=latest

This command is the same setting up hosts on a new installation. The galera_all and rabbitmq_all host groups are excluded to prevent reconfiguration and restarting of any of those containers as they need to be updated, but not restarted.

Once that is complete, upgrade the final host groups with the flag to prevent container restarts.

# openstack-ansible setup-hosts.yml -e 'lxc_container_allow_restarts=false' --limit 'galera_all:rabbitmq_all'

Aktualisieren der Infrastruktur

We can now go ahead with the upgrade of all the infrastructure components. To ensure that rabbitmq and mariadb are upgraded, we pass the appropriate flags.

# openstack-ansible setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true' -e package_state=latest

Mit diesem Abschluss können wir nun alle mariadb-Container einzeln nacheinander neu starten und sicherstellen, dass jeder Container gestartet wird, antwortet und mit den anderen Knoten im Cluster synchronisiert wird, bevor mit den nächsten Schritten fortgefahren wird. Durch diesen Schritt kann die zuvor angewendete LXC-Containerkonfiguration wirksam werden, um sicherzustellen, dass die Container kontrolliert neu gestartet werden.

# openstack-ansible "${SCRIPTS_PATH}/upgrade-utilities/galera-cluster-rolling-restart.yml"

Aktualisieren Sie OpenStack

Wir können jetzt weitermachen mit der Aktualisierung aller OpenStack Komponenten.

# openstack-ansible setup-openstack.yml -e package_state=latest

Upgrade Ceph

With each OpenStack-Ansible version we define default Ceph client version that will be installed on Glance/Cinder/Nova hosts and used by these services. If you want to preserve the previous version of the ceph client during an OpenStack-Ansible upgrade, you will need to override a variable ceph_stable_release in your user_variables.yml

If Ceph has been deployed as part of an OpenStack-Ansible deployment using the roles maintained by the Ceph-Ansible project you will also need to upgrade the Ceph version. Each OpenStack-Ansible release is tested only with specific Ceph-Ansible release and Ceph upgrades are not checked in any Openstack-Ansible integration tests. So we do not test or guarantee an upgrade path for such deployments. In this case tests should be done in a lab environment before upgrading.

Warnung

Ceph related playbooks are included as part of setup-infrastructure.yml and setup-openstack.yml playbooks, so you should be cautious when running them during OpenStack upgrades. If you have upgrade_ceph_packages: true in your user variables or provided -e upgrade_ceph_packages=true as argument and run setup-infrastructure.yml this will result in Ceph package being upgraded as well.

In order to upgrade Ceph in the deployment you will need to run:

# openstack-ansible /etc/ansible/roles/ceph-ansible/infrastructure-playbooks/rolling_update.yml