|
| 1 | +.. Licensed to the Apache Software Foundation (ASF) under one |
| 2 | + or more contributor license agreements. See the NOTICE file |
| 3 | + distributed with this work for additional information# |
| 4 | + regarding copyright ownership. The ASF licenses this file |
| 5 | + to you under the Apache License, Version 2.0 (the |
| 6 | + "License"); you may not use this file except in compliance |
| 7 | + with the License. You may obtain a copy of the License at |
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + Unless required by applicable law or agreed to in writing, |
| 10 | + software distributed under the License is distributed on an |
| 11 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 12 | + KIND, either express or implied. See the License for the |
| 13 | + specific language governing permissions and limitations |
| 14 | + under the License. |
| 15 | +
|
| 16 | +.. |version_to_upgrade| replace:: 4.15.x |
| 17 | + |
| 18 | +Upgrade Instruction from |version_to_upgrade| |
| 19 | +============================================= |
| 20 | + |
| 21 | + |
| 22 | +This section will show you how to upgrade from CloudStack |version_to_upgrade| to latest |
| 23 | +CloudStack |release|. |
| 24 | + |
| 25 | +Any steps that are hypervisor-specific will be called out with a note. |
| 26 | + |
| 27 | +We recommend reading through this section once or twice before beginning |
| 28 | +your upgrade procedure, and working through it on a test system before |
| 29 | +working on a production system. |
| 30 | + |
| 31 | +.. note:: |
| 32 | + The following upgrade instructions should be performed regardless of |
| 33 | + hypervisor type. |
| 34 | + |
| 35 | +Overview of Upgrade Steps: |
| 36 | +---------------------------- |
| 37 | + |
| 38 | +#. Check any customisations and integrations |
| 39 | +#. Upload the |sysvm64-version| System VM template if not already using it. |
| 40 | +#. Confirm Java 11 is the default Java version |
| 41 | +#. Stop all running management servers |
| 42 | +#. Backup CloudStack database (MySQL) |
| 43 | +#. Add "serverTimezone=UTC" to your "db.properties" |
| 44 | +#. Upgrade 1st CloudStack management server |
| 45 | +#. Update hypervisors specific dependencies |
| 46 | +#. Restart 1st management server |
| 47 | +#. Check that your upgraded environment works as expected |
| 48 | +#. Upgrade and restart the remaining management servers |
| 49 | + |
| 50 | + |
| 51 | +.. include:: _customisation_warnings.rst |
| 52 | + |
| 53 | +.. warning:: |
| 54 | + If you are not already using the |sysvm64-version| System VM template you will need to |
| 55 | + upgrade your System VM template prior to performing the upgrade of the |
| 56 | + CloudStack packages. |
| 57 | + |
| 58 | +.. include:: _sysvm_templates.rst |
| 59 | + |
| 60 | +.. include:: _java_version.rst |
| 61 | + |
| 62 | +Packages repository |
| 63 | +------------------- |
| 64 | + |
| 65 | +Most users of CloudStack manage the installation and upgrades of |
| 66 | +CloudStack with one of Linux's predominant package systems, RPM or |
| 67 | +APT. This guide assumes you'll be using RPM and Yum (for Red Hat |
| 68 | +Enterprise Linux or CentOS), or APT and Debian packages (for Ubuntu). |
| 69 | + |
| 70 | +Create RPM or Debian packages (as appropriate) and a repository from |
| 71 | +the |release| source, or check the Apache CloudStack downloads page at |
| 72 | +http://cloudstack.apache.org/downloads.html |
| 73 | +for package repositories supplied by community members. You will need |
| 74 | +them for :ref:`ubuntu414` or :ref:`kvm414` hosts upgrade. |
| 75 | + |
| 76 | +Instructions for creating packages from the CloudStack source are in the |
| 77 | +`CloudStack Installation Guide`_. |
| 78 | + |
| 79 | +Database Preparation |
| 80 | +-------------------- |
| 81 | + |
| 82 | +Backup current database |
| 83 | + |
| 84 | +#. Stop your management server or servers. Run this on all management |
| 85 | + server hosts: |
| 86 | + |
| 87 | + .. parsed-literal:: |
| 88 | +
|
| 89 | + $ sudo service cloudstack-management stop |
| 90 | +
|
| 91 | +#. If you are running a usage server or usage servers, stop those as well: |
| 92 | + |
| 93 | + .. parsed-literal:: |
| 94 | +
|
| 95 | + $ sudo service cloudstack-usage stop |
| 96 | +
|
| 97 | +#. Make a backup of your MySQL database. If you run into any issues or |
| 98 | + need to roll back the upgrade, this will assist in debugging or |
| 99 | + restoring your existing environment. You'll be prompted for your |
| 100 | + password. |
| 101 | + |
| 102 | + .. parsed-literal:: |
| 103 | +
|
| 104 | + $ mysqldump -u root -p -R cloud > cloud-backup_`date '+%Y-%m-%d'`.sql |
| 105 | + $ mysqldump -u root -p cloud_usage > cloud_usage-backup_`date '+%Y-%m-%d'`.sql |
| 106 | +
|
| 107 | +
|
| 108 | +.. _ubuntu414: |
| 109 | +.. _apt-repo414: |
| 110 | +
|
| 111 | +Management Server |
| 112 | +----------------- |
| 113 | +
|
| 114 | +.. include:: _timezone.rst |
| 115 | +
|
| 116 | +Ubuntu |
| 117 | +###### |
| 118 | +
|
| 119 | +If you are using Ubuntu, follow this procedure to upgrade your packages. If |
| 120 | +not, skip to step :ref:`rhel414`. |
| 121 | +
|
| 122 | +.. note:: |
| 123 | + **Community Packages:** This section assumes you're using the community |
| 124 | + supplied packages for CloudStack. If you've created your own packages and |
| 125 | + APT repository, substitute your own URL for the ones used in these examples. |
| 126 | + |
| 127 | +The first order of business will be to change the sources list for |
| 128 | +each system with CloudStack packages. This means all management |
| 129 | +servers, and any hosts that have the KVM agent (no changes should |
| 130 | +be necessary for hosts that are running VMware or Xen.) |
| 131 | + |
| 132 | +Edit your ``/etc/apt/sources.list.d/cloudstack.list`` file on |
| 133 | +any systems that have CloudStack packages installed to points to version |version| |
| 134 | + |
| 135 | +This file should have one line, which contains: |
| 136 | + |
| 137 | +.. parsed-literal:: |
| 138 | +
|
| 139 | + deb http://download.cloudstack.org/ubuntu bionic |version| |
| 140 | +
|
| 141 | +Setup the public key for the above repository: |
| 142 | + |
| 143 | +.. parsed-literal:: |
| 144 | +
|
| 145 | + wget -qO - http://download.cloudstack.org/release.asc | sudo apt-key add - |
| 146 | +
|
| 147 | +#. Now update your apt package list: |
| 148 | + |
| 149 | + .. parsed-literal:: |
| 150 | +
|
| 151 | + $ sudo apt-get update |
| 152 | +
|
| 153 | +#. Now that you have the repository configured, it's time to upgrade |
| 154 | + the ``cloudstack-management`` package. |
| 155 | + |
| 156 | + .. parsed-literal:: |
| 157 | +
|
| 158 | + $ sudo apt-get upgrade cloudstack-management |
| 159 | +
|
| 160 | +#. If you use CloudStack usage server |
| 161 | + |
| 162 | + .. parsed-literal:: |
| 163 | +
|
| 164 | + $ sudo apt-get upgrade cloudstack-usage |
| 165 | +
|
| 166 | +
|
| 167 | +.. _rhel414: |
| 168 | +.. _rpm-repo414: |
| 169 | + |
| 170 | +CentOS/RHEL |
| 171 | +############## |
| 172 | + |
| 173 | +If you are using CentOS or RHEL, follow this procedure to upgrade your |
| 174 | +packages. If not, skip to hypervisors section :ref:`upg_hyp_414`. |
| 175 | + |
| 176 | +.. note:: |
| 177 | + **Community Packages:** This section assumes you're using the community |
| 178 | + supplied packages for CloudStack. If you've created your own packages and |
| 179 | + yum repository, substitute your own URL for the ones used in these examples. |
| 180 | + |
| 181 | +The first order of business will be to change the yum repository |
| 182 | +for each system with CloudStack packages. This means all |
| 183 | +management servers, and any hosts that have the KVM agent (no changes |
| 184 | +should be necessary for hosts that are running VMware or Xen.) |
| 185 | + |
| 186 | +Change your ``/etc/yum.repos.d/cloudstack.repo`` file on |
| 187 | +any systems that have CloudStack packages installed to points to version |version|. |
| 188 | + |
| 189 | +This file should have content similar to the following: |
| 190 | + |
| 191 | +.. parsed-literal:: |
| 192 | +
|
| 193 | + [apache-cloudstack] |
| 194 | + name=Apache CloudStack |
| 195 | + baseurl=http://download.cloudstack.org/centos/$releasever/|version|/ |
| 196 | + enabled=1 |
| 197 | + gpgcheck=0 |
| 198 | +
|
| 199 | +Setup the GPG public key if you wish to enable ``gpgcheck=1``: |
| 200 | + |
| 201 | +.. parsed-literal:: |
| 202 | +
|
| 203 | + rpm --import http://download.cloudstack.org/RPM-GPG-KEY |
| 204 | +
|
| 205 | +#. Now that you have the repository configured, it's time to upgrade the |
| 206 | + ``cloudstack-management``. |
| 207 | + |
| 208 | + .. parsed-literal:: |
| 209 | +
|
| 210 | + $ sudo yum upgrade cloudstack-management |
| 211 | +
|
| 212 | +#. If you use CloudStack usage server |
| 213 | + |
| 214 | + .. parsed-literal:: |
| 215 | +
|
| 216 | + $ sudo yum upgrade cloudstack-usage |
| 217 | +
|
| 218 | +.. _upg_hyp_414: |
| 219 | + |
| 220 | +Upgrade Hypervisors |
| 221 | +------------------- |
| 222 | + |
| 223 | +Hypervisor: XenServer |
| 224 | +##################### |
| 225 | + |
| 226 | + |
| 227 | +No additional steps are required for XenServer Hypervisor for this upgrade. |
| 228 | + |
| 229 | + |
| 230 | +Hypervisor: VMware |
| 231 | +################### |
| 232 | + |
| 233 | +.. warning:: |
| 234 | + For VMware hypervisor, CloudStack management server packages must be |
| 235 | + built using "noredist". Refer to :ref:`building-noredist`. |
| 236 | + |
| 237 | + |
| 238 | +No additional steps are requried for the VMware Hypervisor for this upgrade. |
| 239 | + |
| 240 | + |
| 241 | +.. _kvm414: |
| 242 | + |
| 243 | +Hypervisor: KVM |
| 244 | +################# |
| 245 | + |
| 246 | +KVM on Ubuntu |
| 247 | +"""""""""""""" |
| 248 | + |
| 249 | +(KVM only) Additional steps are required for each KVM host. These |
| 250 | +steps will not affect running guests in the cloud. These steps are |
| 251 | +required only for clouds using KVM as hosts and only on the KVM |
| 252 | +hosts. |
| 253 | + |
| 254 | +#. Configure the :ref:`APT repo <apt-repo414>` as detailed above. |
| 255 | + |
| 256 | +#. Stop the running agent. |
| 257 | + |
| 258 | + .. parsed-literal:: |
| 259 | +
|
| 260 | + $ sudo service cloudstack-agent stop |
| 261 | +
|
| 262 | +#. Update the agent software. |
| 263 | + |
| 264 | + .. parsed-literal:: |
| 265 | +
|
| 266 | + $ sudo apt-get upgrade cloudstack-agent |
| 267 | +
|
| 268 | +#. Start the agent. |
| 269 | + |
| 270 | + .. parsed-literal:: |
| 271 | +
|
| 272 | + $ sudo service cloudstack-agent start |
| 273 | +
|
| 274 | +
|
| 275 | +KVM on CentOS/RHEL |
| 276 | +""""""""""""""""""" |
| 277 | + |
| 278 | +For KVM hosts, upgrade the ``cloudstack-agent`` package |
| 279 | + |
| 280 | +#. Configure the :ref:`rpm-repo414` as detailed above. |
| 281 | + |
| 282 | + .. parsed-literal:: |
| 283 | +
|
| 284 | + $ sudo yum install -y epel-release |
| 285 | + $ sudo yum install -y python36-libvirt |
| 286 | + $ sudo yum upgrade cloudstack-agent |
| 287 | +
|
| 288 | +#. Restart the agent: |
| 289 | + |
| 290 | + .. parsed-literal:: |
| 291 | +
|
| 292 | + $ sudo service cloudstack-agent stop |
| 293 | + $ sudo service cloudstack-agent start |
| 294 | +
|
| 295 | +
|
| 296 | +Restart management services |
| 297 | +--------------------------- |
| 298 | + |
| 299 | +#. Now it's time to start the management server |
| 300 | + |
| 301 | + .. parsed-literal:: |
| 302 | +
|
| 303 | + $ sudo service cloudstack-management start |
| 304 | +
|
| 305 | +#. If you use it, start the usage server |
| 306 | + |
| 307 | + .. parsed-literal:: |
| 308 | +
|
| 309 | + $ sudo service cloudstack-usage start |
| 310 | +
|
| 311 | +System-VMs and Virtual-Routers |
| 312 | +------------------------------ |
| 313 | + |
| 314 | +.. include:: _sysvm_restart.rst |
0 commit comments