Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

How to Perform a Zero Impact Contrail Networking Upgrade using the Ansible Deployer

Before you begin:

  • The target release for this upgrade must be Contrail Release 2005 or later.

  • You can use this procedure to incrementally upgrade to the next Contrail Networking release only. For instance, if you are running Contrail Networking Release 2003 and want to upgrade to the next Contrail Release—which is Contrail Networking Release 2005—you can use this procedure to perform the upgrade.

    This procedure is not validated for upgrades between releases that are two or more releases apart. For instance, it could not be used to upgrade from Contrail Networking Release 2002 to Contrail Networking Release 2005.

    For a list of Contrail Networking releases in a table that illustrates Contrail Networking release order, see Contrail Networking Supported Platforms.

  • The Contrail Ansible Deployer container can only be used in CentOS environments.

  • Take snapshots of your current configurations before you proceed with the upgrade process. For details, refer to How to Backup and Restore Contrail Databases in JSON Format.

Starting in Contrail Networking Release 2005, you can perform a Zero Impact Upgrade (ZIU) of Contrail Networking using the Contrail Ansible Deployer container. The Contrail Ansible Deployer container image can be loaded from the Juniper Networks Contrail Container Registry hosted at hub.juniper.net/contrail.

Use the procedure in this document to perform a Zero Impact Upgrade (ZIU) of Contrail Networking using the Contrail Ansible Deployer container. This ZIU allows Contrail Networking to upgrade while sustaining minimal network downtime.

This procedure illustrates how to perform a ZIU using the Ansible deployer container. It includes a representative example of the steps being performed to upgrade from Contrail Networking Release 2005 to Release 2008.

To perform the ZIU using the Ansible deployer:

  1. Pull the contrail-ansible-deployer file for the target upgrade release. This procedure is typically performed from a Contrail controller running in your environment, but it can also be performed from a separate server which has network connectivity to the deployment that is being upgraded.

    This procedure shows you how to load a 2008 image from the Juniper Networks Contrail Container Registry. You can, however, also change the values to load the file from a private registry.

    The Juniper Networks Contrail Container Registry is hosted at hub.juniper.net/contrail. If you need the credentials to access the registry, email mailto:contrail-registry@juniper.net.

    Enter the following commands to pull the contrail-ansible-deployer file from the registry:

    where:

  2. Start the Contrail Ansible Deployer:
  3. Navigate to the instances.yaml file and open it for editing.

    The instances.yaml file was used to initially deploy the setup. The instances.yaml can be loaded into the Contrail Ansible Deployer and edited to supported the target upgrade version.

    Contrail Release 2008 Target Upgrade Example using VI as the editor:

  4. Update the CONTRAIL_CONTAINER_TAG to the desired version tag in the instances.yaml file from the existing deployment. The CONTRAIL_CONTAINER_TAG variable is in the contrail_configuration: hierarchy within the instances.yaml file.

    The CONTRAIL_CONTAINER_TAG for any Contrail Release 21 software can be obtained from README Access to Contrail Registry 21XX.

    Here is an example instances.yml file configuration:

  5. Navigate to a path from where you want to trigger the upgrade playbook.
  6. Upgrade the control plane by running the ziu.yml playbook file from inside the contrail ansible deployer container.
    • For Contrail Networking Release 2005 to Contrail Networking Release 2008:

      Upgrade the control plane by running the ziu.yml playbook file.

      sudo -E ansible-playbook -v -e orchestrator=openstack -e config_file=instances.yaml playbooks/ziu.yml

    • For Contrail Networking Release 2011 and later:

      Upgrade the control plane by running the controller stage of ziu.yml playbook file.

      sudo -E ansible-playbook -v -e stage=controller -e orchestrator=openstack -e config_file=config/instances.yaml playbooks/ziu.yml

  7. Upgrade the Openstack plugin by running the install_openstack.yml playbook file.
    • For Contrail Networking Release 2005 to Contrail Networking Release 2008:

      sudo -E ansible-playbook -v -e orchestrator=openstack -e config_file=instances.yaml playbooks/install_openstack.yml

    • For Contrail Networking Release 2011 and later:

      sudo -E ansible-playbook -v -e stage=openstack -e orchestrator=openstack -e config_file=config/instances.yaml playbooks/ziu.yml

  8. Enter the contrail-status command to monitor upgrade status. Ensure all pods reach the running state and all services reach the active state.

    This contrail-status command provides this output after a successful upgrade:

    Note:

    Some output fields and data have been removed for readability.

  9. Migrate workloads VM from one group of compute nodes. Leave them uncommented in the instances.yaml file. Comment other computes not ready to upgrаde in instances.yaml.
  10. Upgrade compute nodes.
    • For Contrail Networking Release 2005 to Contrail Networking Release 2008:

      Run the install_contrail.yml playbook file to upgrade the compute nodes that were uncommented in the instances.yaml file. Only the compute nodes that were left uncommented in 9 are upgraded to the target release in this step.

      sudo -E ansible-playbook -v -e orchestrator=openstack -e config_file=instances.yaml playbooks/install_contrail.yml

    • For Contrail Networking Release 2011 and later:

      Run the compute stage of ziu.yml playbook file to upgrade the compute nodes that were uncommented in the instances.yaml file. Only the compute nodes that were left uncommented in 9 are upgraded to the target release in this step.

      sudo -E ansible-playbook -v -e stage=compute -e orchestrator=openstack -e config_file=config/instances.yaml playbooks/ziu.yml

  11. Repeat Steps 9 and 10 until all compute nodes are upgraded.

You can access the Ansible playbook logs of the upgrade at /var/log/ansible.log.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
2005
Starting in Contrail Networking Release 2005, you can perform a Zero Impact Upgrade (ZIU) of Contrail Networking using the Contrail Ansible Deployer container.