weizhouapache commented on code in PR #593: URL: https://github.com/apache/cloudstack-documentation/pull/593#discussion_r2509370474
########## source/upgrading/upgrade/upgrade-4.22.rst: ########## @@ -0,0 +1,309 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information# + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +.. |version_to_upgrade| replace:: 4.22.x + +Upgrade Instruction from |version_to_upgrade| +============================================= + + +This section will show you how to upgrade from CloudStack |version_to_upgrade| to latest +CloudStack |release|. + +Any steps that are hypervisor-specific will be called out with a note. + +We recommend reading through this section once or twice before beginning +your upgrade procedure, and working through it on a test system before +working on a production system. + +.. note:: + The following upgrade instructions should be performed regardless of + hypervisor type. + +Overview of Upgrade Steps: +---------------------------- + +#. Check any customisations and integrations +#. Upload the |sysvm64-version| System VM template if not already using it. +#. Confirm Java 17 is the default Java version +#. Stop all running management servers +#. Backup CloudStack database (MySQL) +#. Upgrade 1st CloudStack management server +#. Update hypervisors specific dependencies +#. Restart 1st management server +#. Check that your upgraded environment works as expected +#. Upgrade and restart the remaining management servers + + +.. include:: _customisation_warnings.rst + +.. include:: _sysvm_templates.rst + +.. include:: _java_version.rst + +Packages repository +------------------- + +Most users of CloudStack manage the installation and upgrades of +CloudStack with one of Linux's predominant package systems, RPM or +APT. This guide assumes you'll be using RPM and Yum (for Red Hat +Enterprise Linux or CentOS), or APT and Debian packages (for Ubuntu). + +Create RPM or Debian packages (as appropriate) and a repository from +the |release| source, or check the Apache CloudStack downloads page at +http://cloudstack.apache.org/downloads.html +for package repositories supplied by community members. You will need +them for :ref:`ubuntu414` or :ref:`kvm414` hosts upgrade. + +Instructions for creating packages from the CloudStack source are in the +`CloudStack Installation Guide`_. + +Database Preparation +-------------------- + +Backup current database + +#. Stop your management server or servers. Run this on all management + server hosts: + + .. parsed-literal:: + + $ sudo systemctl stop cloudstack-management + +#. If you are running a usage server or usage servers, stop those as well: + + .. parsed-literal:: + + $ sudo systemctl stop cloudstack-usage + +#. Make a backup of your MySQL database. If you run into any issues or + need to roll back the upgrade, this will assist in debugging or + restoring your existing environment. You'll be prompted for your + password. + + .. parsed-literal:: + + $ mysqldump -u root -p -R cloud > cloud-backup_$(date +%Y-%m-%d-%H%M%S) + $ mysqldump -u root -p cloud_usage > cloud_usage-backup_$(date +%Y-%m-%d-%H%M%S) + + +.. _ubuntu414: +.. _apt-repo414: + +Management Server +----------------- + +Ubuntu/Debian +###### + +If you are using Ubuntu, follow this procedure to upgrade your packages. If +not, skip to step :ref:`rhel414`. + +.. note:: + **Community Packages:** This section assumes you're using the community + supplied packages for CloudStack. If you've created your own packages and + APT repository, substitute your own URL for the ones used in these examples. + +The first order of business will be to change the sources list for +each system with CloudStack packages. This means all management +servers, and any hosts that have the KVM agent (no changes should +be necessary for hosts that are running VMware or Xen.) + +Edit your ``/etc/apt/sources.list.d/cloudstack.list`` file on +any systems that have CloudStack packages installed to points to version |version| + +This file should have one line, which contains: + +.. parsed-literal:: + + deb http://download.cloudstack.org/ubuntu noble |version| + +If you are using Debian, + +.. parsed-literal:: + + deb http://download.cloudstack.org/debian bookworm |version| + +Setup the public key for the above repository: + +.. parsed-literal:: + + wget -qO - http://download.cloudstack.org/release.asc | sudo apt-key add - + +#. Now update your apt package list: + + .. parsed-literal:: + + $ sudo apt-get update + +#. Now that you have the repository configured, it's time to upgrade + the ``cloudstack-management`` package. + + .. parsed-literal:: + + $ sudo apt-get install cloudstack-management Review Comment: @sureshanaparti @harikrishna-patnala for apt, it would be better to use `apt install xxx`, as `apt upgrade xxx` will upgrade some other unrelated packages. - apt install ``` # apt install cloudstack-management Reading package lists... Done Building dependency tree... Done Reading state information... Done cloudstack-management is already the newest version (4.22.0.0). 0 upgraded, 0 newly installed, 0 to remove and 297 not upgraded. ``` - apt upgrade ``` # apt upgrade cloudstack-management Reading package lists... Done Building dependency tree... Done Reading state information... Done cloudstack-management is already the newest version (4.22.0.0). Calculating upgrade... Done The following NEW packages will be installed: linux-headers-6.8.0-87 linux-headers-6.8.0-87-generic linux-image-6.8.0-87-generic linux-modules-6.8.0-87-generic linux-modules-extra-6.8.0-87-generic linux-tools-6.8.0-87 linux-tools-6.8.0-87-generic python3-boto3 python3-botocore python3-dateutil python3-jmespath python3-packaging python3-s3transfer unminimize The following packages will be upgraded: amd64-microcode apparmor apport apport-core-dump-handler apt apt-utils base-files bind9-dnsutils bind9-host bind9-libs binutils binutils-common binutils-x86-64-linux-gnu bpftrace bsdextrautils bsdutils busybox-initramfs busybox-static cloud-init cloud-initramfs-copymods cloud-initramfs-dyn-netconf coreutils cryptsetup cryptsetup-bin cryptsetup-initramfs curl dbus dbus-bin dbus-daemon dbus-session-bus-common dbus-system-bus-common dbus-user-session dhcpcd-base dirmngr distro-info-data dmeventd dmidecode dmsetup dracut-install e2fsprogs e2fsprogs-l10n eject fdisk firmware-sof-signed fwupd gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 git git-man gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv grub-common grub-pc grub-pc-bin grub2-common gzip initramfs-tools initramfs-tools-bin initramfs-tools-core intel-microcode iproute2 iputils-ping iputils-tracepath jq keyboxd kmod krb5-locales landscape-common libacl1 libaio1t64 libapparmor1 libapt-pkg6.0t64 libarchive13t64 libattr1 libaudit-common libaudit1 libbinutils libblkid1 libblockdev-crypto3 libblockdev-fs3 libblockdev-loop3 libblockdev-mdraid3 libblockdev-nvme3 libblockdev-part3 libblockdev-swap3 libblockdev-utils3 libblockdev3 libbsd0 libc-bin libc-dev-bin libc-devtools libc6 libc6-dev libcap2 libcap2-bin libclang-cpp18 libclang1-18 libcom-err2 libcryptsetup12 libctf-nobfd0 libctf0 libcurl3t64-gnutls libcurl4t64 libdbus-1-3 libdeflate0 libdevmapper-event1.02.1 libdevmapper1.02.1 libdrm-common libdrm2 libdw1t64 libelf1t64 libext2fs2t64 libfdisk1 libfwupd2 libglib2.0-0t64 libglib2.0-bin libglib2.0-data libgmp10 libgnutls30t64 libgpg-error-l10n libgpg-error0 libgprofng0 libgssapi-krb5-2 libgstreamer1.0-0 libheif-plugin-aomdec libheif-plugin-aomenc libheif-plugin-libde265 libheif1 libhogweed6t64 libicu74 libidn2-0 libjq1 libk5crypto3 libkmod2 libkrb5-3 libkrb5support0 libldap-common libldap2 libllvm18 liblvm2cmd2.03 liblz4-1 liblzma5 libmd0 libmodule-scandeps-perl libmount1 libmpfr6 libnetplan1 libnettle8t64 libnghttp2-14 libnl-3-200 libnl-genl-3-200 libnl-route-3-200 libnss-systemd libnvme1t64 libopeniscsiusr libp11-kit0 libpackagekit-glib2-18 libpam-cap libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpcre2-8-0 libperl5.38t64 libplymouth5 libpolkit-agent-1-0 libpolkit-gobject-1-0 libproc2-0 libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libselinux1 libsframe1 libsmartcols1 libsqlite3-0 libss2 libssh-4 libssl3t64 libsystemd-shared libsystemd0 libtasn1-6 libtiff6 libtraceevent1 libtraceevent1-plugin libudev1 libudisks2-0 libunistring5 libunwind8 libuuid1 libxml2 libxslt1.1 libzstd1 linux-base linux-firmware linux-generic linux-headers-generic linux-image-generic linux-libc-dev linux-tools-common locales login logsave lvm2 lxd-agent-loader lxd-installer mdadm motd-news-config mount mtr-tiny nano needrestart netplan-generator netplan.io open-iscsi open-vm-tools openssh-client openssh-server openssh-sftp-server openssl overlayroot packagekit packagekit-tools passwd pci.ids perl perl-base perl-modules-5.38 plymouth plymouth-theme-ubuntu-text polkitd pollinate powermgmt-base procps python-apt-common python3-apport python3-apt python3-distupgrade python3-jinja2 python3-netplan python3-pkg-resources python3-problem-report python3-requests python3-setuptools python3-software-properties python3-twisted python3-update-manager python3-urllib3 rsyslog snapd software-properties-common sosreport ssh-import-id sudo systemd systemd-dev systemd-hwe-hwdb systemd-resolved systemd-sysv tcpdump thermald thin-provisioning-tools tmux ubuntu-drivers-common ubuntu-kernel-accessories ubuntu-minimal ubuntu-pro-client ubuntu-pro-client-l10n ubuntu-release-upgrader-core ubuntu-server ubuntu-server-minimal ubuntu-standard udev udisks2 update-manager-core update-notifier-common util-linux uuid-runtime vim vim-common vim-runtime vim-tiny wget wireless-regdb xfsprogs xkb-data xxd xz-utils zstd 297 upgraded, 14 newly installed, 0 to remove and 0 not upgraded. 119 standard LTS security updates Need to get 962 MB of archives. After this operation, 485 MB of additional disk space will be used. Do you want to continue? [Y/n] ```` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
