10. Contrail with VMware vCenter

10.1. Overview

Starting from Contrail Release 3.0.0, it is possible to integrate Contrail with the VMware vCenter acting as an Openstack compute node.

This topic describes how configure Fuel Contrail Plugin to work with existing or already provisioned vSphere deployments that use OpenStack as the main orchestrator.

Integration with vCenter include two main roles: compute-vmware and contrail-vmware. As the basis for compute-vmware role will use default Fuel compute-vmware role. Compute-vmware will be located on the openstack side of hybrid environment and will include nova-compute with Contrail Nova vCenter driver. One compute-vmware will serve one vCenter. In the current release work with multiple vCenter instances is not supported. Compute-vmware role will be not compatible with any other role. Contrail-vmware will be located on vmware side of hybrid environment and will include Contrail vRouter. One contrail-vmware must to be installed on each ESXi node. Contrail-vmware role will not be compatible with any other role. Integration assumes that vmware part of the environment already exists - datacenter and clusters are created. Deployment of the environment will include 2 stages. During the 1st stage user will run script that prepares vmware part for deployment (creates few Distributed Switches and spawns virtual machine on each ESXi node). The rest of management will provided by the Fuel master

_images/contrail_vmware_openstack.png

10.2. Prerequisites

  • Installed Fuel 9.1
  • Installed Fuel Contrail Plugin Installation Guide
  • Environment must be created with “vCenter” support for compute virtualization and Contrail for networking
  • vSphere environments must be already preconfigured
  • pyvmomi python package need to be installed for vmware provision script

10.3. Restrictions

  • There must be a single vmware-compute node for each vCenter
  • Compute-vmware role can not be combined with any other roles
  • Contrail-vmware role can not be combined with any other roles
  • The environment must contain at least one KVM/QEMU compute node
  • According contrail package (version: 3.1.0.0-25) bug we can use only one cluster per Datacenter.
  • All ESXi hosts in vCenter cluster must have instance with contrail-vmware role

10.4. Configuration

To install environment with Contrail and VMWware support you should proceed with following steps:

  1. Install pyvmomi module

    [root@nailgun ~]# easy_install pyvmomi
    
  2. Fill vmware credentials in Fuel vmware tab

    _images/fill_vmware_credentials.png
  3. Run script that will spawn ContrailVM’s, DVS’s

    [root@nailgun ~]# cd /var/www/nailgun/plugins/contrail-5.1/deployment_scripts/
    [root@nailgun deployment_scripts]# ./spawner.py --env_id 1 --spawn
    
  4. Wait a few minutes when ContrailVM’s node will be arrived

    _images/contrailvms_arrived.png
  5. To verified if the nodes from vmware you may check “Node Information”

    _images/contrailvms_verified.png
  6. Assign all planned roles (including single compute-vmware role and contrail-vmware for each ESXi host) in Nodes tab from Fuel UI

    _images/fuel_assign_roles.png
  7. ContrailVM’s will be spawned with 3 network interfaces (the first two for fuel networks and third for vmware connection) therefore we assume that public, storage and management network will use vlan tagging

    _images/contrailvm_vlan_tagging.png
  8. Fill settings in VMware tab from Fuel UI

    _images/vmware_tab_settings.png
  9. Fill additional settings in Fuel Contrail plugin settings from Fuel UI

    _images/additional_vmware_settings.png
  10. Deploy environment

10.5. Verification

After deploy finishes, you can verify your installation.

  1. Check that Contrail services are running on compute node:

    root@node-35:~# contrail-status
    == Contrail vRouter ==
    supervisor-vrouter:           active
    contrail-vrouter-agent        active
    contrail-vrouter-nodemgr      active
    
  2. Check that Contrail services are running on ContrailVM:

    root@ContrailVM-249:~# contrail-status
    == Contrail vRouter ==
    supervisor-vrouter:           active
    contrail-vrouter-agent        active
    contrail-vrouter-nodemgr      active
    

10.7. Add and delete ESXi hosts

Add ESXi host:

  1. Add ESXi host to vCenter cluster manually

  2. Run script that will spawn additional ContrailVM

    [root@nailgun ~]# cd /var/www/nailgun/plugins/contrail-5.1/deployment_scripts/
    [root@nailgun deployment_scripts]# ./spawner.py --env_id 1 --spawn
    
  3. Wait a few minutes when ContrailVM’s node will be arrived

  4. Assign contrail-vmware role on new ContrailVM

  5. Run “Deploy Changes”

Remove ESXi host:

  1. In Fuel UI remove contrail-vmware instance that located on ESXi host which you want to remove.
  2. Run “Deploy Changes”
  3. Remove ESXi host from vCenter cluster manually