Parallel Cloud Migration for Red Hat Enterprise Linux OpenStack Platform 6 (Juno)

Updated -


1. Parallel Cloud Migration

As an alternative to upgrading, you can also deploy a completely separate Red Hat Enterprise Linux OpenStack Platform 6 environment, and slowly migrate resources over from the old environment to the new one. This might be excessive for a lot of users, but it is something that may be considered as the least-intrusive alternative to the other options.
For more information, see:
  • Deploying OpenStack: Learning Environments (Manual Set Up) (manual installation for instructional purposes)
  • Deploying OpenStack: Proof-of-Concept Environments (Packstack) (Packstack procedures for an all-in-one installation)
  • Deploying OpenStack: Enterprise Environments (Red Hat Enterprise Linux OpenStack Platform Installer) guides


2. Pre-Upgrade Tasks on RHEL 6 Environment

This section lists the prerequisites and requirements for migrating your Icehouse deployment on RHEL 6 to Juno deployment on RHEL 7.
  • Application data   All OpenStack application data (MySQL database storage, Block Storage volumes, images) must be stored either on dedicated local devices or on filesystems or volumes provided by a remote server.
    Ensure that this data is not erased or overwritten as part of the RHEL 7 installation.
    If the data cannot be preserved across the upgrade, ensure that you back it up first. A simple solution is to mount an NFS share from another system and copy the appropriate directories:
    # mkdir -p BACKUP/var/lib/{glance,nova,mysql}/
    # rsync -a /var/lib/mysql/ BACKUP/var/lib/mysql/
    # rsync -a /var/lib/glance/ BACKUP/var/lib/glance/
    # rsync -a /var/lib/nova/ BACKUP/var/lib/nova/

    Note

    Here and in the rest of the article, BACKUP refers to the location where your backup directory is mounted.
  • Configuration files   Ensure that you have complete backups of your OpenStack configuration files. This includes everything in /etc, as well as any stored credentials (for Identity, MySQL, etc) located in /root or other local user home directories.
    For more information on the new, updated and deprecated configuration options for each service , see Configuration Reference available from: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/.
  • Hostnames and addresses   In order to simplify the upgrade process, these instructions require that you configure your new RHEL 7 hosts at the same IP address and hostname as the RHEL 6 hosts you are replacing. Your options are:
    • You can give you RHEL 6 hosts a new IP address so that the original address is available for your replacement RHEL 7 hosts. This ensures that you will continue to have any access to the configuration files and other data hosted on your existing controllers, but it does require that you have the additional hardware available to set up new hosts while preserving your old ones.
    • You can perform the RHEL 7 installation on your RHEL 6 hosts. While this does not require additional hardware, you will need to ensure that you have backups of all your configuration files and other data.
  • If you are using the Cinder LVM backend   Detach any Block Storage volumes prior to starting the upgrade process. RHEL7 introduces the LIO iSCSI backend, which replaces the TGT backend used in RHEL6, and this change means that the iSCSI target configuration will not be preserved across the upgrade.

    Note

    If you are installing with an automated answer file using the Red Hat Enterprise Linux OpenStack Installer, taking a volume offline is not enough. You have to ensure that the mapping protects the local Block Storage LVMs.


3. Configure Content Delivery Network (CDN) Channels

This section discusses channel and repository settings required for deploying Red Hat Enterprise Linux OpenStack Platform 6.

Note

Although older Red Hat OpenStack repositories are available, you must ensure that your system can no longer access them before installing Red Hat Enterprise Linux OpenStack Platform 6. For example, for CDN, unsubscribe from or disable the following:
  • Red Hat OpenStack 1.0 (Essex) -- rhel-server-ost-6-preview-rpms
  • Red Hat OpenStack 2.1 (Folsom) -- rhel-server-ost-6-folsom-rpms
  • Red Hat Enterprise Linux OpenStack Platform 3 (Grizzly) -- rhel-server-ost-6-3-rpms
  • Red Hat Enterprise Linux OpenStack Platform 4 Beta (Havana) -- rhel-6-server-openstack-beta-rpms
  • Red Hat Enterprise Linux OpenStack Platform 4 (Havana) -- rhel-6-server-openstack-4.0-rpms
  • Red Hat Enterprise Linux OpenStack Platform 5 (Icehouse) -- rhel-7-server-openstack-5.0-rpms

Note

The Red Hat Common for RHEL Server channel is recommended for use if creating custom Red Hat Enterprise Linux guest images that require cloud-init.
For Red Hat Enterprise Linux 7, run:
# subscription-manager repos \
--enable=rhel-7-server-rh-common-rpms


3.1. Content Delivery Network (CDN) Channels

You can install Red Hat Enterprise Linux OpenStack Platform 6 through the Content Delivery Network (CDN). To do so, configure subscription-manager to use the correct channels.
Run the following command to enable a CDN channel:
# subscription-manager repos --enable=[reponame]
Run the following command to disable a CDN channel:
# subscription-manager repos --disable=[reponame]
Red Hat Enterprise Linux 7

The following tables outline the channels for Red Hat Enterprise Linux 7.



Table 1.  Required Channels

Channel Repository Name
Red Hat Enterprise Linux 7 Server (RPMS) rhel-7-server-rpms
Red Hat OpenStack 6.0 for Server 7 (RPMS) rhel-7-server-openstack-6.0-rpms
Red Hat Enterprise Linux 7 Server - RH Common (RPMs) rhel-7-server-rh-common-rpms


Table 2.  Optional Channels

Channel Repository Name
Red Hat Enterprise Linux 7 Server - Optional rhel-7-server-optional-rpms
Red Hat Enterprise Linux OpenStack Platform Installer

The following tables outline the channels for the Red Hat Enterprise Linux OpenStack Platform installer.



Table 3.  Required Channels

Channel Repository Name
Foreman-RHEL-7 rhel-7-server-openstack-6.0-installer-rpms
Red Hat Enterprise Linux 7 Server (RPMS) rhel-7-server-rpms
Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server rhel-server-rhscl-7-rpms
Images on CDN (Optional) rhel-7-server-openstack-6.0-files
Disable Channels

The following table outlines the channels you must disable to ensure Red Hat Enterprise Linux OpenStack Platform 6 functions correctly.



Table 4.  Disable Channels

Channel Repository Name
Red Hat CloudForms Management Engine "cf-me-*"
Red Hat CloudForms Tools for RHEL 6 "rhel-6-server-cf-*"
Red Hat Enterprise Virtualization "rhel-6-server-rhev*"
Red Hat Enterprise Linux 6 Server - Extended Update Support "*-eus-rpms"


4. Upgrade the Controller Node


The first step in the upgrade process is to upgrade your controller node from Icehouse to Juno.


Procedure 1. Upgrading the Controller Node

  1. Deploy RHEL 7 controller nodes

    1. Deploy RHEL 7 onto a new set of servers, and restore your basic system configuration (interface definitions, storage attachments, etc) by installing some prerequisite packages:
      # yum install -y \
      openstack-selinux \
      openvswitch
    2. Activate the openvswitch service:
      # systemctl enable openvswitch
      # systemctl start openvswitch
      
    3. If you are using the LVM backend for Block Storage service, you will also need to install and activate the targetcli package for managing the LIO suybsystem:
      # yum -y install targetcli
      # systemctl enable target
      # systemctl start target
      
    4. Activate the LVM volume groups that contain your Block Storage volumes:
      # vgchange -ay
  2. Restore the Network Configuration

    1. Ensure that you restore the /etc/sysconfig/network-scripts files required by your OpenStack Networking configuration, such as ifcfg-br-ex:
      # cp BACKUP/etc/sysconfig/network-scripts/ifcfg-br-ex \
      /etc/sysconfig/network-scripts/ifcfg-br-ex
    2. Activate the interfaces:
      # ifup br-ex
  3. Restore iptables Rules

    1. Ensure that any local firewall configuration that was defined on your RHEL6 controller node is imported into the RHEL7 controller node by copying your RHEL 6 /etc/sysconfig/iptables into /etc/sysconfig/iptables on your RHEL 7 host.
    2. Install the iptables-services package:
      # yum install -y iptables-services
    3. Stop the iptables service:
      # systemctl stop iptables
    4. Restore your iptables configuration from backup:
      # cp BACKUP/etc/sysconfig/iptables /etc/sysconfig/iptables
    5. Activate the iptables service:
      # systemctl enable iptables
      # systemctl start iptables
      
  4. Install rabbitmq-server

    1. Install the rabbitmq-server package:
      # yum install -y rabbitmq-server
    2. Migrate any rabbitmq configuration files from your RHEL6 controllers into /etc/rabbitmq on your RHEL7 controller:
      # rsync -a BACKUP/etc/rabbitmq/ /etc/rabbitmq
    3. Activate the rabbitmq-server service:
      # systemctl enable rabbitmq-server
      # systemctl start rabbitmq-server
  5. Install mariadb-server

    1. Install the mariadb-server package:
      # yum install -y mariadb-server
    2. Either re-mount your /var/lib/mysql directory (and modify /etc/fstab appropriately), or restore the contents of /var/lib/mysql from your backups:
      # rsync -a BACKUP/var/lib/mysql/ /var/lib/mysql/
    3. Restore the /root/.my.conf file from your backups, if it exists:
      # cp BACKUP/root/.my.cnf /root/.my.cnf
    4. Ensure correct ownership of files in /var/lib/mysql:
      # chown -R mysql:mysql /var/lib/mysql
      # fixfiles restore /var/lib/mysql/
      
    5. Activate the mariadb service:
      # systemctl enable mariadb
      # systemctl start mariadb
      
    6. Perform any necessary database updates:
      # mysql_upgrade
      Verify that you are able to connect to the database server with the mysql command line client. A successful connection looks like this:
      # mysql
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 419
      Server version: 5.5.40-MariaDB MariaDB Server
      
      Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> 
      
  6. Install Identity service

    1. Install the openstack-keystone package:
      # yum install -y openstack-keystone
    2. Copy the Identity service configuration files from your RHEL6 controller into /etc/keystone on your RHEL7 controller:
      # rsync -a BACKUP/etc/keystone/ /etc/keystone/
    3. Upgrade the Identity service database schema:
      # sudo -u keystone keystone-manage db_sync
    4. Activate the Identity service:
      # systemctl enable openstack-keystone
      # systemctl start openstack-keystone
    5. Load your Identity service administrative credentials and verify that Identity is operating correctly:
      # . /root/keystonerc_admin
      # keystone endpoint-list

    Note

    The steps to follow assume that your Identity service credentials have been loaded into your environment.
  7. Install Block Storage service

    1. Install the openstack-cinder package:
      # yum install -y openstack-cinder
    2. Copy the Block Storage configuration files from your RHEL6 controller into /etc/cinder on your RHEL7 controller:
      # rsync -a BACKUP/etc/cinder/ /etc/cinder/

      Note

      If you are using the LVM backend, you will need to update cinder.conf to use the new LIO driver. Edit the /etc/cinder/cinder.conf as follows:
      [DEFAULT]
      iscsi_helper=lioadm
    3. Upgrade the Block Storage database schema:
      # sudo -u cinder cinder-manage db sync
    4. Activate the Block Storage services:
      # systemctl enable openstack-cinder-{api,volume,scheduler}
      # systemctl start openstack-cinder-{api,volume,scheduler}
      
    5. Verify that the Block Storage API is responding correctly and that your volumes are available:
      # cinder list
  8. Install Image service

    1. Install the openstack-glance package:
      # yum install -y openstack-glance
    2. Copy the Image service configuration files from your RHEL6 controller into /etc/glance on your RHEL7 controller:
      # rsync -a BACKUP/etc/glance/ /etc/glance/
    3. Upgrade the Image service database schema:
      # sudo -u glance glance-manage db sync
    4. Ensure the correct ownership on the Image service log and data directories:
      # chown -R glance:glance /var/lib/glance
      # fixfiles restore /var/lib/glance
    5. Activate the Image services:
      # systemctl enable openstack-glance-{api,registry}
      # systemctl start openstack-glance-{api,registry}
      
    6. Verify that the Image service is responding correctly:
      # glance image-list
  9. Install OpenStack Networking

    1. Install the openstack-neutron package as well as packages for any OpenStack Networking plugins you are using (such as openstack-neutron-ml2 and openstack-neutron-openvswitch):
      # yum install -y openstack-neutron{,-ml2,-openvswitch}
    2. Copy the OpenStack Networking configuration files from your RHEL6 controller into /etc/neutron on the RHEL7 controller:
      # rsync -a BACKUP/etc/neutron/ /etc/neutron/

      Note

      Correct the permissions on these files, because the OpenStack Networking UID and GID on your system may be different.
      # find /etc/neutron \! -group root -exec chgrp neutron {} \;
    3. Upgrade the OpenStack Networking database schema:
      # neutron-db-manage --config-file /etc/neutron/neutron.conf \
      --config-file /etc/neutron/plugin.ini \
      upgrade head
    4. Activate the OpenStack Networking service:
      # systemctl enable neutron-{dhcp-agent,l3-agent,metadata-agent,openvswitch-agent,server}
      # systemctl start neutron-{dhcp-agent,l3-agent,metadata-agent,openvswitch-agent,server}
      You may need to activate additional Neutron agents to support things like LBaaS and VPNaaS.
    5. Verify that OpenStack Networking agents have started and are reporting properly:
      # neutron agent-list
      The output of this command should show the list of openvswitch agents on your compute hosts:
      +--------------------------------------+--------------------+------------------+-------+----------------+---------------------------+
      | id                                   | agent_type         | host             | alive | admin_state_up | binary                    |
      +--------------------------------------+--------------------+------------------+-------+----------------+---------------------------+
      .
      .
      .
      | 15736a0a-acc2-4227-b0e3-3bb720351870 | Open vSwitch agent | compute-1.local  | :-)   | True           | neutron-openvswitch-agent |
      | f87cc391-5263-4808-bf80-8b7d3caf8716 | Open vSwitch agent | compute-0.local  | :-)   | True           | neutron-openvswitch-agent |
      +--------------------------------------+--------------------+------------------+-------+----------------+---------------------------+
      
      These listings should show :-) in the alive column.
  10. Install Compute

    1. Install the openstack-nova package:
      # yum install -y openstack-nova
    2. Copy the Compute configuration files from your RHEL6 controller into /etc/nova on your RHEL7 controller:
      # rsync -a BACKUP/etc/nova/ /etc/nova/
    3. Modify nova.conf to cap the Compute API at an Icehouse-compatible version by adding the following to the upgrade-levels section of the config file:
      [upgrade-levels]
      compute = 3.23.1
      conductor = 3.23.1

      Note

      This is necessary in order for your Juno controller to inter-operate with your Icehouse compute nodes.
    4. Upgrade the Compute database schema:
      # sudo -u nova nova-manage db sync
    5. Activate Compute services on your controller:
      # systemctl enable openstack-nova-{api,cert,conductor,consoleauth,novncproxy,scheduler}
      # systemctl start openstack-nova-{api,cert,conductor,consoleauth,novncproxy,scheduler}
      
    6. Verify that your Compute services have started correctly:
      # nova service-list
      You should see both the services on your controller as well as the nova-compute services running on your compute nodes:
      +----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
      | Id | Binary           | Host             | Zone     | Status  | State | Updated_at                 | Disabled Reason |
      +----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
      .
      .
      .
      | 5  | nova-compute     | compute-0.local  | nova     | enabled | up    | 2015-01-16T14:23:48.000000 | -               |
      | 6  | nova-compute     | compute-1.local  | nova     | enabled | up    | 2015-01-16T14:23:43.000000 | -               |
      +----+------------------+------------------+----------+---------+-------+----------------------------+-----------------+
      
      The nova-compute services should show up in the State column.
  11. Install Dashboard

    1. Install the openstack-dashboard package:
      # yum install -y openstack-dashboard
    2. Copy the Dashboard configuration files from your RHEL6 controller to /etc/openstack-dashboard on your RHEL7 controller:
      # rsync -a BACKUP/etc/openstack-dashboard/ \
      /etc/openstack-dashboard/

      Note

      Enable the httpd_can_network_connect SELinux boolean:
      setsebool httpd_can_network_connect=true
    3. Activate the Apache service:
      # systemctl enable httpd
      # systemctl start httpd
      
At this point, you should have a fully operational OpenStack environment running Juno on your controller and Icehouse on your compute nodes.


5. Upgrade the Compute Nodes


Now you can configure your Compute nodes.


Procedure 2. Upgrading the Compute Nodes

  1. Migrate Compute Instances

    1. Migrate any running instances onto other compute nodes prior to reinstalling a compute node with RHEL7.
      If your environment supports live migration, you can use the nova live-migration command (as a user with administrative credentials):
      # nova live-migration SERVER_UUID
      This will move the instance to another available compute node.
      If your environment does not support live migration, you can use the nova migrate command:
      # nova migrate SERVER_UUID
      This will pause the virtual server and resume it on another available compute host.
    2. Servers will be in the CONFIRM_RESIZE state. For each server, run the resize-confirm command:
      # nova resize-confirm SERVER_UUID

      Note

      For the nova migrate command to work, the nova user on the source host must be able to connect using ssh to the nova user on the remote host.
      For more information on migrating instances, see https://access.redhat.com/articles/1265613.
  2. Deploy a RHEL7 Compute Node

    1. Install some prerequisite packages:
      # yum install -y openstack-selinux \
      openvswitch \
    2. Activate the openvswitch and libvirtd services:
      # systemctl enable openvswitch
      # systemctl start openvswitch
  3. Install Virtualization Support

    1. Install the libvirt and qemu-kvm packages:
      # yum install -y libvirt qemu-kvm
    2. Restore your libvirtd configuration from backups:
      # cp BACKUP/etc/libvirt/libvirtd.conf \
      /etc/libvirtd.conf
    3. Activate the libvirtd service:
      # systemctl enable libvirtd
      # systemctl start libvirtd
  4. Restore iptables Rules

    1. Ensure that any local firewall configuration that was defined on your RHEL6 compute node is imported into the RHEL7 compute node.
    2. Install the iptables-services package:
      # yum install -y iptables -services
    3. Stop the iptables service:
      # systemctl stop iptables
    4. Restore your iptables configuration from backups:
      # cp BACKUP/etc/sysconfig/iptables /etc/sysconfig/iptables
    5. Activate the iptables service:
      # systemctl enable iptables
      # systemctl start iptables
      
  5. Install OpenStack Networking

    1. Install the OpenStack Networking OpenVswitch agent:
      # yum install -y openstack-neutron-openvswitch
    2. Restore your OpenStack Networking configuration from your backups:
      # rsync -a BACKUP/etc/neutron/ /etc/neutron/
    3. Activate the OpenStack Networking services on the host:
      # systemctl enable neutron-openvswitch-agent neutron-ovs-cleanup
      # systemctl start neutron-openvswitch-agent
      
    4. On your controller, use the neutron agent-list command to verify that the agent on your compute node is reporting correctly.
  6. Install Compute

    1. Install the openstack-nova-compute package:
      # yum install -y openstack-nova-compute
    2. Restore your Compute configuration from your backups:
      # rsync -a BACKUP/etc/nova
    3. Edit the nova.conf to cap the compute API at an Icehouse compatible version:
      [upgrade levels]
      compute = 3.23.1

      Note

      This is necessary in order for your Juno controller to inter-operate with your Icehouse compute nodes.
    4. Activate the Compute services on the compute host:
      # systemctl enable openstack-nova-compute
      # systemctl start openstack-nova-compute
    5. On your controller, use the nova service-list command to verify that the nova-compute service on your compute host is reporting correctly:
      # nova service-list


6. Remove API Version Restrictions


When you have finished upgrading all your compute hosts, remove any upgrade-levels restrictions applied to your controllers and compute hosts during the upgrade process and restart all Nova services:
# openstack-service restart nova

Comments