Deploying an advanced configuration that includes Contrail Neutron plug-in support

Contrail is an extensible platform for Software Defined Networking (SDN) that can provide users rich L2 and L3 network functions and network virtualization functions.

Before you begin

The Neutron Contrail plug-in allows OpenStack to take advantage of its rich network functions. Use these instructions to build an IBM® Cloud Manager with OpenStack cloud with the Neutron Contrail plug-in integrated.

The following prerequisites exist for using these instructions to deploy the Contrail Neutron plug-in for IBM Cloud Manager with OpenStack:
  • IBM Cloud Manager with OpenStack: version 4.3, fix pack 5 or newer
  • Contrail Version: 3.0
  • Hypervisor: KVM
  • Operating System for Contrail controller node: Red Hat Enterprise Linux® version 7.2

About this task

Complete the following tasks to deploy an IBM Cloud Manager with OpenStack KVM or QEMU cloud with the Contrail Neutron plug-in.

Procedure

  1. Obtain Contrail 3.0 builds and store them in a local directory on the deployment server, for example /home/contrail3.0/. Get the following Contrail 3.0 RPMs from Juniper with a Juniper license.
    • contrail-heat-3.0.0.0-2723.el7.noarch.rpm
    • contrail-install-packages-3.0.0.0-2723~kilo.el7.noarch.rpm
  2. Set up the deployment server as a Contrail yum repository server for installing Contrail. The Contrail yum repositories that you configure can be shared across the OpenStack controllers, Contrail controllers, and the compute nodes.
    1. Install the createrepo package to use as a tool to create the local Contrail yum repository:
      $> yum install createrepo -y
    2. Create folders for the Contrail yum repositories in the IBM Cloud Manager with OpenStack installation folder.
      $> mkdir /opt/ibm/cmwo/yum-repo/contrail
      $> mkdir /opt/ibm/cmwo/yum-repo/contrail-ct-controller
    3. Install the Contrail RPM that you obtained previously, contrail-install-packages-3.0.0.0-2723~kilo.el7.noarch.rpm:
      $> rpm –ivh \
      /home/contrail3.0/contrail-install-packages-3.0.0.0-2723~kilo.el7.noarch.rpm
      This command installs the Contrail build into a tar file: /opt/contrail/contrail_packages/contrail_rpms.tgz.
    4. Extract the tar file, and copy the RPMs into the Contrail yum repository folders:
      $> cd /opt/contrail/contrail_packages/
      $> tar xzvf contrail_rpms.tgz
      $> cp *.rpm /opt/ibm/cmwo/yum-repo/contrail
      $> cd /opt/ibm/cmwo/yum-repo/contrail
      $> mv python-kazoo-1.3.1-1.1contrail2.el7.noarch.rpm \
         python-neutronclient-2.4.0-2contrail.el7.noarch.rpm \
        	 python-requests-2.6.0-1.1contrail1.el7.noarch.rpm \
         /opt/ibm/cmwo/yum-repo/contrail-ct-controller
      $> rm –rf /opt/contrail
    5. Copy the Contrail RPM that you obtained previously, contrail-heat-3.0.0.0-2723.el7.noarch.rpm to the Contrail yum repository.
      $> cp /home/contrail3.0/contrail-heat-3.0.0.0-2723.el7.noarch.rpm \
        /opt/ibm/cmwo/yum-repo/contrail
    6. Create the yum repositories for Contrail:
      $> cd /opt/ibm/cmwo/yum-repo/contrail
      $> createrepo .
      $> cd /opt/ibm/cmwo/yum-repo/contrail-ct-controller
      $> createrepo .
  3. Ensure that you have the following servers available:
    • OpenStack controller node: One x86 server with Red Hat Enterprise Linux version 7.1 or 7.2 installed
    • Contrail controller node: One x86 server with Red Hat Enterprise Linux version 7.2 installed
    • Compute node: One x86 server with Red Hat Enterprise Linux version 7.1 or 7.2 installed
  4. Set up the required yum repositories on each server:
    Before you set up the yum repositories, install yum-plugin-priorities, so that the yum repository priority can take effect:
    $> yum install yum-plugin-priorities –y
    Use the following steps to enable the required yum repositories for the Contrail controller node:
    1. Configure the Red Hat Enterprise Linux version 7.1 or 7.2 base repository.

      Priority: 50

      This yum repository contains all the RPMs for Red Hat Enterprise Linux version 7.1 or 7.2. Typically it is equivalent to an ISO image of Red Hat Enterprise Linux version 7.1. or 7.2 For more information about setting up the repository with an ISO image, see “Set up the deployment server (or controller node) to serve as a yum repository” in Configuring operating system yum repositories for nodes using Red Hat Enterprise Linux.

    2. Configure the Red Hat Enterprise Linux optional repository.

      Priority: 50

      This repository has optional RPMs that are needed by the operating system. For more information about configuring the optional repository, see Configuring operating system yum repositories for nodes using Red Hat Enterprise Linux.

    3. Configure the EPEL repository.

      Priority: 90

      This repository has additional RPMs that are needed by Contrail setup. This repository is needed by all 3 kinds of the servers. You can enable the EPEL repository with the following steps: download the EPEL repository file from Fedora at https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm.

      Install the EPEL repository by running the following command:
      $> yum install epel-release-latest-7.noarch.rpm -Y
  5. Prepare for the deployment.
    1. Prepare the environment, topology, and data bags for deployment. For more information, see Deploying an advanced configuration with KVM or QEMU compute nodes. By following these instructions, you will get an environment file, your-environment-name.json, and a topology file, your-topology-name.json.
    2. For the Contrail Neutron plug-in deployment, change the following OpenStack attributes in your-environment-name.json.
      • openstack.compute.network.plugins: Set this value to an empty list [] because no Neutron plug-ins need to be installed on the compute node.
      • openstack.network.core_plugin: Set this value to the Neutron Contrail plug-in. The full path of the Contrail Neutron plug-in is: neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2
      • ibm-openstack.network.l3.enable: An l3 agent is not needed with the Contrail Neutron plug-in, so disable it by setting this attribute to false.
      • ibm-openstack.network.ip_movement.enable: IP movement is not needed with the Contrail Neutron plug-in, so disable it by setting this attribute to false.
    3. For the Contrail Neutron plug-in deployment, change the following Contrail attributes in your-environment-name.json.
      • contrail.ha: Set this value to false to deploy the Contrail system without high availability support.
      • contrail.network_ip: Set this value to the IP address of the Contrail controller node.
      • contrail.network_pfxlen: Set this value to the network mask length of the IP address that is specified by the contrail.network_ip attribute. The default network mask length is 24.
    4. For the Contrail Neutron plug-in deployment, change the following Contrail attributes for the compute node in your-environment-name.json.
      • contrail.compute.dns3, contrail.compute.dns2, contrail.compute.dns1: These three values are used to set up DNS for the network of your compute node. Set these values to the real working DNS addresses on your compute node.
      • contrail.compute.interface: Set this value to the network interface that is used to connect to the OpenStack controllers and Contrail controllers. The default value is eth0.
      • contrail.compute.netmask: Set this value to the real working netmask of the network interface of your compute node, which is specified by the attribute contrail.compute.interface. The default value is 255.255.255.0.
      • contrail.compute.cidr: Set this value to the real working CIDR address of the network interface for the compute node, which is specified by the attribute contrail.compute.interface. The default value is 10.1.1.0/24.
      • contrail.compute.gateway: Set this value to the real working gateway of the network interface for your compute node, which is specified by the attribute contrail.compute.interface. The default value is 10.1.1.1.
      • contrail.compute.domain: Set this value to the real working domain name of the network interface for your compute node, which is specified by the attribute contrail.compute.interface. The default value is test.com.
  6. Use the following template to create a topology file:
    {
      "name":"CHANGEME",
      "description":"CHANGEME",
      "environment":"CHANGEME",
      "secret_file":"CHANGEME",
      "run_sequentially":false,
      "nodes": [
        {
          "fqdn":"CHANGEME",
          "description": "Cloud controller node",
    
          "password":"CHANGEME",
          "identity_file":"CHANGEME",
          "quit_on_error":true,
          "run_order_number":1,
           "runlist": [
             "role[ibm-os-single-controller-node-without-ml2-plugin]",
             "recipe[contrail::yum-os-controller-repo]",
             "recipe[contrail::neutron]",
             "recipe[contrail::postoscontroller]"
          ]
        },
        {
          "fqdn":"CHANGEME",
          "description": "Contrail controller node",
          "password":"CHANGEME",
          "identity_file":"CHANGEME",
          "quit_on_error":true,
          "run_order_number":1,
           "runlist": [
             "recipe[contrail::prectcontroller]",
             "recipe[contrail::yumrepo]",
             "role[contrail-database]",
             "role[contrail-config]",
             "role[contrail-control]",
             "role[contrail-webui]",
             "role[contrail-analytics]",
             "recipe[contrail::postctcontroller]"
          ]
        },
    
        {
          "fqdn":"CHANGEME",
          "description": "Compute node",
          "password":"CHANGEME",
          "identity_file":"CHANGEME",
          "quit_on_error":true,
          "run_order_number":2,
          "runlist": [
            "role[contrail-icm-compute]"
          ]
        }  
      ]
    }
  7. Deploy your topology.
    1. Upload the environment for your deployment.
      $ knife environment from file your-environment-name.json
    2. Deploy the topology.
      $ knife os manage deploy topology your-topology-name.json 

What to do next

After the deployment is complete, the IBM Cloud Manager with OpenStack services are ready to use. The IBM Cloud Manager - Dashboard is available at https://x.x.x.x/auth/login/ and the web interface for the IBM Cloud Manager - Self Service is available at https://x.x.x.x:8080/login.html, where x.x.x.x is the OpenStack cloud virtual IP address or virtual IP public address. The Contrail user interface is available at https://x.x.x.x:8143/, where x.x.x.x is the Contrail IP address. Log in with "admin" and the password you customized earlier.
Note: The login user name and password of the Contrail user interface are the same as OpenStack because Contrail uses the Keystone server as the identity service.