Starting in v16.2, Contrail Cloud now uses Red Hat Enterprise Virtualization (RHEV, or RHV)
for the control host hypervisors. The jump host and overcloud computes will continue to use
Kernel-based Virtual Machine (KVM).
Follow these steps to migrate the control host KVM to RHV:
Note:
Configuration changes to your overcloud-nics.yml file must be made
at this point.
You must change the VM interface naming in your overcloud-nics.yml
file before starting the steps below. The VM interface naming must be changed from
emX
to the enp(x+1)s0
naming structure. These interfaces
include:
- Controller_network_config
- AppformixController_network_config
Your change will look similar to the example below:
- type: interface
name: enp1s0
use_dhcp: false
You can reference the samples provided in Configuration File Changes for more details.
-
Deploy Red Hat Virtualization Manager (RHVM) from the jump host.
/var/lib/contrail_cloud/scripts/install_rhvm.sh -d
-
Log in to the RHV Manager Web UI to verify that RHVM deployed successfully. Your
ability to access the web UI is verification of a successful RHV Manager deployment. To
access the GUI, enter https://<jumphost fqdn>/ovirt-engine/ in
your browser. The default user is
admin
, and the default password is
c0ntrail123
.
-
Test NFS and back up the contrail configuration database onto the NFS storage.
/var/lib/contrail_cloud/scripts/pre-contrail-cloud-upgrade-kvm2rhv.sh -d
-
Migrate your control host. This will migrate a single node per script run.
/var/lib/contrail_cloud/scripts/contrail-cloud-upgrade-kvm2rhv.sh -d
This script will:
- Perform the maintenance and backup of the openstack controller VM.
- Re-image and reconfigure the control host.
- Connects the VM to the RHVM and sets up VM storage.
- Creates the OpenStack VM, k8s_host VM, and Contrail Insights VM and adds them to
Ironic as resources.
- Deploys the OpenStack VM from the backup.
-
Run the upgrade script for each remaining control host, until all control hosts have
been converted.
/var/lib/contrail_cloud/scripts/contrail-cloud-upgrade-kvm2rhv.sh -d
-
Run the post-migration script to perform cleanup, refresh Ironic configuration and
facts, and disable maintenance mode.
/var/lib/contrail_cloud/scripts/post-contrail-cloud-upgrade-kvm2rhv.sh -d
-
Deploy the Kubernetes (k8s) clusters.
/var/lib/contrail_cloud/scripts/k8s-cluster-deploy.sh -d
This will:
- Deploy RHEL8 onto the k8s_host VMs in each control host.
- Deploy a Kubernetes cluster onto the set of k8s_host VMs.
-
Find your overcloud stack ID.
You will need your overcloud stack ID for setting up your NFS backup directory in
the steps below. Run the following from the jump host:
ssh undercloud "source stackrc; openstack stack show overcloud -f value -c id"
-
Mount the NFS backup directory on jump host.
mkdir -p /var/lib/contrail_cloud/nfs_mount
sudo mount <ip/fqdn_of_nfs_server>:/<nfs_dir> /var/lib/contrail_cloud/nfs_mount
ls -al /var/lib/contrail_cloud/nfs_mount/<your_overcloud_stack_id>/db-dump.json
-
Deploy the Contrail cluster.
/var/lib/contrail_cloud/scripts/k8s-tf-operator-deploy.sh -d -i /var/lib/contrail_cloud/nfs_mount/<your_overcloud_stack_id>/db-dump.json
-
Unmount and remove your NFS directory.
sudo umount /var/lib/contrail_cloud/nfs_mount && rmdir /var/lib/contrail_cloud/nfs_mount
-
Run the overcloud deployment to update OpenStack with the new Contrail virtual IP
address values.
/var/lib/contrail_cloud/scripts/openstack-deploy.sh -d
-
Run Contrail Insight deploy (if required for your environment).
/var/lib/contrail_cloud/scripts/contrail-insights-deploy.sh -d
-
It is possible that the upgrade could interrupt some of the PCS (Pacemaker) resources.
From one of the OpenStack controllers, run the following command to verify all PCS
resources were properly started:
-
Make sure any failed resources are started and stable. Cleanup any failed actions
by running the following command:
sudo pcs resource cleanup
-
Verify all Contrail networks, ports, policies, and configurations are correct. You can
now manually remove the files from the NFS directory after you have verified a successful
upgrade.
<ip/fqdn_of_nfs_server>:/<nfs_dir>/<your_overcloud_stack_id>