Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 3. Upgrading the Undercloud
This process upgrades the undercloud and its overcloud images to Red Hat OpenStack Platform 14.
3.1. Converting to next generation power management drivers Copier lienLien copié sur presse-papiers!
Red Hat OpenStack Platform now uses next generation drivers, also known as hardware types, that replace older drivers.
The following table shows an analogous comparison between older drivers with their next generation hardware type equivalent:
Old Driver | New Hardware Type |
---|---|
|
|
|
|
|
|
|
|
|
|
VBMC ( |
|
|
|
In OpenStack Platform 14, these older drivers have been removed and are no longer accessible. You must change to hardware types before upgrading to OpenStack Platform 14.
Procedure
Check the current list of hardware types enabled:
source ~/stackrc openstack baremetal driver list --type dynamic
$ source ~/stackrc $ openstack baremetal driver list --type dynamic
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you use a hardware type driver that is not enabled, enable the driver using the
enabled_hardware_types
parameter in theundercloud.conf
file:enabled_hardware_types = ipmi,redfish,idrac
enabled_hardware_types = ipmi,redfish,idrac
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Save the file and refresh the undercloud:
openstack undercloud install
$ openstack undercloud install
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following commands, substituting the
OLDDRIVER
andNEWDRIVER
variables for your power management type:source ~/stackrc OLDDRIVER="pxe_ipmitool" NEWDRIVER="ipmi" for NODE in $(openstack baremetal node list --driver $OLDDRIVER -c UUID -f value) ; do openstack baremetal node set $NODE --driver $NEWDRIVER; done
$ source ~/stackrc $ OLDDRIVER="pxe_ipmitool" $ NEWDRIVER="ipmi" $ for NODE in $(openstack baremetal node list --driver $OLDDRIVER -c UUID -f value) ; do openstack baremetal node set $NODE --driver $NEWDRIVER; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Upgrading the director packages to OpenStack Platform 14 Copier lienLien copié sur presse-papiers!
This procedure upgrades the director toolset and the core Heat template collection to the OpenStack Platform 14 release.
Procedure
-
Log in to the director as the
stack
user. Disable the current OpenStack Platform repository:
sudo subscription-manager repos --disable=rhel-7-server-openstack-13-rpms
$ sudo subscription-manager repos --disable=rhel-7-server-openstack-13-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the new OpenStack Platform repository:
sudo subscription-manager repos --enable=rhel-7-server-openstack-14-rpms
$ sudo subscription-manager repos --enable=rhel-7-server-openstack-14-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run
yum
to upgrade the director’s main packages:sudo yum update -y python-tripleoclient* openstack-tripleo-common openstack-tripleo-heat-templates
$ sudo yum update -y python-tripleoclient* openstack-tripleo-common openstack-tripleo-heat-templates
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3. Preparing container images Copier lienLien copié sur presse-papiers!
The overcloud configuration requires initial registry configuration to determine where to obtain images and how to store them. Complete the following steps to generate and customize an environment file for preparing your container images.
Procedure
- Log in to your undercloud host as the stack user.
Generate the default container image preparation file:
openstack tripleo container image prepare default \ --local-push-destination \ --output-env-file containers-prepare-parameter.yaml
$ openstack tripleo container image prepare default \ --local-push-destination \ --output-env-file containers-prepare-parameter.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command includes the following additional options:
-
--local-push-destination
sets the registry on the undercloud as the location for container images. This means the director pulls the necessary images from the Red Hat Container Catalog and pushes them to the registry on the undercloud. The director uses this registry as the container image source. To pull directly from the Red Hat Container Catalog, omit this option. --output-env-file
is an environment file name. The contents of this file include the parameters for preparing your container images. In this case, the name of the file iscontainers-prepare-parameter.yaml
.NoteYou can also use the same
containers-prepare-parameter.yaml
file to define a container image source for both the undercloud and the overcloud.
-
-
Edit the
containers-prepare-parameter.yaml
and make the modifications to suit your requirements.
3.4. Container image preparation parameters Copier lienLien copié sur presse-papiers!
The default file for preparing your containers (containers-prepare-parameter.yaml
) contains the ContainerImagePrepare
Heat parameter. This parameter defines a list of strategies for preparing a set of images:
Each strategy accepts a set of sub-parameters that define which images to use and what to do with them. The following table contains information about the sub-parameters you can use with each ContainerImagePrepare
strategy:
Parameter | Description |
---|---|
| List of image name substrings to exclude from a strategy. |
|
List of image name substrings to include in a strategy. At least one image name must match an existing image. All |
|
String to append to the tag for the destination image. For example, if you pull an image with the tag |
| A dictionary of image labels that filter the images to modify. If an image matches the labels defined, the director includes the image in the modification process. |
| String of ansible role names to run during upload but before pushing the image to the destination registry. |
|
Dictionary of variables to pass to |
|
The namespace of the registry to push images during the upload process. When you specify a namespace for this parameter, all image parameters use this namespace too. If set to |
| The source registry from where to pull the original container images. |
|
A dictionary of |
|
Defines the label pattern to tag the resulting images. Usually sets to |
The set
parameter accepts a set of key: value
definitions. The following table contains information about the keys:
Key | Description |
---|---|
| The name of the Ceph Storage container image. |
| The namespace of the Ceph Storage container image. |
| The tag of the Ceph Storage container image. |
| A prefix for each OpenStack service image. |
| A suffix for each OpenStack service image. |
| The namespace for each OpenStack service image. |
|
The driver to use to determine which OpenStack Networking (neutron) container to use. Use a null value to set to the standard |
|
The tag that the director uses to identify the images to pull from the source registry. You usually keep this key set to |
The set
section might contains several parameters that begin with openshift_
. These parameters are for various scenarios involving OpenShift-on-OpenStack.
3.5. Checking the director configuration Copier lienLien copié sur presse-papiers!
Check the /usr/share/python-tripleoclient/undercloud.conf.sample
for new or deprecated parameters that might be applicable to your environment. Modify these parameters in your current /home/stack/undercloud.conf
file. In particular, note the following parameters:
-
container_images_file
, which you should set to the absolute location of yourcontainers-prepare-parameter.yaml
file. -
enabled_drivers
, which you should remove. The older drivers have now been replaced byhardware_types
. -
generate_service_certificate
, which now defaults totrue
. Switch tofalse
if your undercloud did not originally use SSL and you have no intention to enable SSL . Note that enabling SSL on the undercloud requires providing extra environment files during upgrade to establish trust between the undercloud and overcloud nodes
3.6. Director configuration parameters Copier lienLien copié sur presse-papiers!
The following list contains information about parameters for configuring the undercloud.conf
file. Keep all parameters within their relevant sections to avoid errors.
Defaults
The following parameters are defined in the [DEFAULT]
section of the undercloud.conf
file:
- additional_architectures
A list of additional (kernel) architectures that an overcloud supports. Currently the overcloud supports
ppc64le
architecture.NoteWhen enabling support for ppc64le, you must also set
ipxe_enabled
toFalse
- certificate_generation_ca
-
The
certmonger
nickname of the CA that signs the requested certificate. Use this option only if you have set thegenerate_service_certificate
parameter. If you select thelocal
CA, certmonger extracts the local CA certificate to/etc/pki/ca-trust/source/anchors/cm-local-ca.pem
and adds the certificate to the trust chain. - clean_nodes
- Defines whether to wipe the hard drive between deployments and after introspection.
- cleanup
-
Cleanup temporary files. Set this to
False
to leave the temporary files used during deployment in place after the command is run. This is useful for debugging the generated files or if errors occur. - container_images_file
Heat environment file with container image information. This can either be:
- Parameters for all required container images
-
Or the
ContainerImagePrepare
parameter to drive the required image preparation. Usually the file containing this parameter is namedcontainers-prepare-parameter.yaml
.
- custom_env_files
- Additional environment file to add to the undercloud installation.
- deployment_user
-
The user installing the undercloud. Leave this parameter unset to use the current default user (
stack
). - discovery_default_driver
-
Sets the default driver for automatically enrolled nodes. Requires
enable_node_discovery
enabled and you must include the driver in theenabled_hardware_types
list. - docker_insecure_registries
-
A list of insecure registries for
docker
to use. Use this parameter if you want to pull images from another source, such as a private container registry. In most cases, docker has the certificates to pull container images from either the Red Hat Container Catalog or from your Satellite server if the undercloud is registered to Satellite. - docker_registry_mirror
-
An optional
registry-mirror
configured in/etc/docker/daemon.json
- enable_ironic; enable_ironic_inspector; enable_mistral; enable_tempest; enable_validations; enable_zaqar
-
Defines the core services to enable for director. Leave these parameters set to
true
. - enable_ui
-
Defines whether to install the director web UI. Use this parameter to perform overcloud planning and deployments through a graphical web interface. Note that the UI is only available with SSL/TLS enabled using either the
undercloud_service_certificate
orgenerate_service_certificate
. - enable_node_discovery
-
Automatically enroll any unknown node that PXE-boots the introspection ramdisk. New nodes use the
fake_pxe
driver as a default but you can setdiscovery_default_driver
to override. You can also use introspection rules to specify driver information for newly enrolled nodes. - enable_novajoin
-
Defines whether to install the
novajoin
metadata service in the Undercloud. - enable_routed_networks
- Defines whether to enable support for routed control plane networks.
- enable_swift_encryption
- Defines whether to enable Swift encryption at-rest.
- enable_telemetry
-
Defines whether to install OpenStack Telemetry services (gnocchi, aodh, panko) in the undercloud. Set
enable_telemetry
parameter totrue
if you want to install and configure telemetry services automatically. The default value isfalse
, which disables telemetry on the undercloud. This parameter is required if using other products that consume metrics data, such as Red Hat CloudForms. - enabled_hardware_types
- A list of hardware types to enable for the undercloud.
- generate_service_certificate
-
Defines whether to generate an SSL/TLS certificate during the undercloud installation, which is used for the
undercloud_service_certificate
parameter. The undercloud installation saves the resulting certificate/etc/pki/tls/certs/undercloud-[undercloud_public_vip].pem
. The CA defined in thecertificate_generation_ca
parameter signs this certificate. - heat_container_image
- URL for the heat container image to use. Leave unset.
- heat_native
-
Use native heat templates. Leave as
true
. - hieradata_override
-
Path to
hieradata
override file that configures Puppet hieradata on the director, providing custom configuration to services beyond theundercloud.conf
parameters. If set, the undercloud installation copies this file to the/etc/puppet/hieradata
directory and sets it as the first file in the hierarchy. See Configuring hieradata on the undercloud for details on using this feature. - inspection_extras
-
Defines whether to enable extra hardware collection during the inspection process. This parameter requires
python-hardware
orpython-hardware-detect
package on the introspection image. - inspection_interface
-
The bridge the director uses for node introspection. This is a custom bridge that the director configuration creates. The
LOCAL_INTERFACE
attaches to this bridge. Leave this as the defaultbr-ctlplane
. - inspection_runbench
-
Runs a set of benchmarks during node introspection. Set this parameter to
true
to enable the benchmarks. This option is necessary if you intend to perform benchmark analysis when inspecting the hardware of registered nodes. - ipa_otp
-
Defines the one time password to register the Undercloud node to an IPA server. This is required when
enable_novajoin
is enabled. - ipxe_enabled
-
Defines whether to use iPXE or standard PXE. The default is
true
, which enables iPXE. Set tofalse
to set to standard PXE. - local_interface
The chosen interface for the director’s Provisioning NIC. This is also the device the director uses for DHCP and PXE boot services. Change this value to your chosen device. To see which device is connected, use the
ip addr
command. For example, this is the result of anip addr
command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow In this example, the External NIC uses
eth0
and the Provisioning NIC useseth1
, which is currently not configured. In this case, set thelocal_interface
toeth1
. The configuration script attaches this interface to a custom bridge defined with theinspection_interface
parameter.- local_ip
-
The IP address defined for the director’s Provisioning NIC. This is also the IP address that the director uses for DHCP and PXE boot services. Leave this value as the default
192.168.24.1/24
unless you use a different subnet for the Provisioning network, for example, if it conflicts with an existing IP address or subnet in your environment. - local_mtu
-
MTU to use for the
local_interface
. Do not exceed 1500 for the undercloud. - local_subnet
-
The local subnet to use for PXE boot and DHCP interfaces. The
local_ip
address should reside in this subnet. The default isctlplane-subnet
. - net_config_override
-
Path to network configuration override template. If you set this parameter, the undercloud uses a JSON format template to configure the networking with
os-net-config
. The undercloud ignores the network parameters set inundercloud.conf
. See/usr/share/python-tripleoclient/undercloud.conf.sample
for an example. - output_dir
- Directory to output state, processed heat templates, and Ansible deployment files.
- overcloud_domain_name
The DNS domain name to use when deploying the overcloud.
NoteWhen configuring the overcloud, the
CloudDomain
parameter must be set to a matching value. Set this parameter in an environment file when you configure your overcloud.- roles_file
- The roles file to override for undercloud installation. It is highly recommended to leave unset so that the director installation uses the default roles file.
- scheduler_max_attempts
- Maximum number of times the scheduler attempts to deploy an instance. This value must be greater or equal to the number of bare metal nodes that you expect to deploy at once to work around potential race condition when scheduling.
- service_principal
- The Kerberos principal for the service using the certificate. Use this parameter only if your CA requires a Kerberos principal, such as in FreeIPA.
- subnets
-
List of routed network subnets for provisioning and introspection. See Subnets for more information. The default value includes only the
ctlplane-subnet
subnet. - templates
- Heat templates file to override.
- undercloud_admin_host
-
The IP address defined for the director Admin API when using SSL/TLS. This is an IP address for administration endpoint access over SSL/TLS. The director configuration attaches the director’s IP address to its software bridge as a routed IP address, which uses the
/32
netmask. - undercloud_debug
-
Sets the log level of undercloud services to
DEBUG
. Set this value totrue
to enable. - undercloud_enable_selinux
-
Enable or disable SELinux during the deployment. It is highly recommended to leave this value set to
true
unless you are debugging an issue. - undercloud_hostname
- Defines the fully qualified host name for the undercloud. If set, the undercloud installation configures all system host name settings. If left unset, the undercloud uses the current host name, but the user must configure all system host name settings appropriately.
- undercloud_log_file
-
The path to a log file to store the undercloud install/upgrade logs. By default, the log file is
install-undercloud.log
within the home directory. For example,/home/stack/install-undercloud.log
. - undercloud_nameservers
- A list of DNS nameservers to use for the undercloud hostname resolution.
- undercloud_ntp_servers
- A list of network time protocol servers to help synchronize the undercloud date and time.
- undercloud_public_host
-
The IP address defined for the director Public API when using SSL/TLS. This is an IP address for accessing the director endpoints externally over SSL/TLS. The director configuration attaches this IP address to the director software bridge as a routed IP address, which uses the
/32
netmask. - undercloud_service_certificate
- The location and filename of the certificate for OpenStack SSL/TLS communication. Ideally, you obtain this certificate from a trusted certificate authority. Otherwise, generate your own self-signed certificate.
- undercloud_update_packages
- Defines whether to update packages during the undercloud installation.
Subnets
Each provisioning subnet is a named section in the undercloud.conf
file. For example, to create a subnet called ctlplane-subnet
, use the following sample in your undercloud.conf
file:
You can specify as many provisioning networks as necessary to suit your environment.
- gateway
-
The gateway for the overcloud instances. This is the undercloud host, which forwards traffic to the External network. Leave this as the default
192.168.24.1
unless you use a different IP address for the director or want to use an external gateway directly.
The director configuration also enables IP forwarding automatically using the relevant sysctl
kernel parameter.
- cidr
-
The network that the director uses to manage overcloud instances. This is the Provisioning network, which the undercloud
neutron
service manages. Leave this as the default192.168.24.0/24
unless you use a different subnet for the Provisioning network. - masquerade
-
Defines whether to masquerade the network defined in the
cidr
for external access. This provides the Provisioning network with a degree of network address translation (NAT) so that the Provisioning network has external access through the director. - dhcp_start; dhcp_end
- The start and end of the DHCP allocation range for overcloud nodes. Ensure this range contains enough IP addresses to allocate your nodes.
3.7. Upgrading the director Copier lienLien copié sur presse-papiers!
Complete the following steps to upgrade the director.
Procedure
Run the following command to upgrade the director on the undercloud:
openstack undercloud upgrade
$ openstack undercloud upgrade
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command launches the director configuration script. The director upgrades its packages and configures its services to suit the settings in the
undercloud.conf
. This script takes several minutes to complete.NoteThe director configuration script prompts for confirmation before proceeding. Bypass this confirmation using the
-y
option:openstack undercloud upgrade -y
$ openstack undercloud upgrade -y
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The script also starts all OpenStack Platform service containers on the undercloud automatically. Check the enabled containers using the following command:
sudo docker ps
[stack@director ~]$ sudo docker ps
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The script adds the
stack
user to thedocker
group to ensure that thestack
user has access to container management commands. Refresh thestack
user permissions with the following command:exec su -l stack
[stack@director ~]$ exec su -l stack
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The command prompts you to log in again. Enter the stack user password.
To initialize the
stack
user to use the command line tools, run the following command:source ~/stackrc
[stack@director ~]$ source ~/stackrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The prompt now indicates OpenStack commands authenticate and execute against the undercloud;
(undercloud) [stack@director ~]$
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The director upgrade is complete.
3.8. Upgrading the overcloud images Copier lienLien copié sur presse-papiers!
You must replace your current overcloud images with new versions. The new images ensure that the director can introspect and provision your nodes using the latest version of OpenStack Platform software.
Prerequisites
- You have upgraded the undercloud to the latest version.
Procedure
Remove any existing images from the
images
directory on thestack
user’s home (/home/stack/images
):rm -rf ~/images/*
$ rm -rf ~/images/*
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the archives:
cd ~/images for i in /usr/share/rhosp-director-images/overcloud-full-latest-14.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-14.0.tar; do tar -xvf $i; done cd ~
$ cd ~/images $ for i in /usr/share/rhosp-director-images/overcloud-full-latest-14.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-14.0.tar; do tar -xvf $i; done $ cd ~
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Import the latest images into the director:
openstack overcloud image upload --update-existing --image-path /home/stack/images/
$ openstack overcloud image upload --update-existing --image-path /home/stack/images/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure your nodes to use the new images:
openstack overcloud node configure $(openstack baremetal node list -c UUID -f value)
$ openstack overcloud node configure $(openstack baremetal node list -c UUID -f value)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the existence of the new images:
openstack image list ls -l /var/lib/ironic/httpboot/
$ openstack image list $ ls -l /var/lib/ironic/httpboot/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
When deploying overcloud nodes, ensure that the Overcloud image version corresponds to the respective Heat template version. For example, use only the OpenStack Platform 14 images with the OpenStack Platform 14 Heat templates.
3.9. Undercloud Post-Upgrade Notes Copier lienLien copié sur presse-papiers!
-
If you use a local set of core templates in your
stack
user home directory, ensure that you update the templates using the recommended workflow in "Using Customized Core Heat Templates". You must update the local copy before upgrading the overcloud.
3.10. Next Steps Copier lienLien copié sur presse-papiers!
The undercloud upgrade is complete. You can now prepare the overcloud for the upgrade.