Deploying Contrail Release 4.1 with Netronome SmartNICs by Using Juju
Prerequisites
Make sure that the following requirements are met:
MaaS Server (if the cloud type is maas)—Install MaaS and Juju on this server
Juju Controller—Bootstrap the Juju controller. This can be on a VM or a bare metal server.
A repository—To get Netronome and patched OpenStack packages. The repository can be a virtual machine.
Contrail controller—Use Ubuntu 16.04 xenial
OpenStack—OpenStack can be on the same node as contrail-controller. Use the patched packages to support virtio-forwarder
Compute node with Agilio SmartNIC—Use Ubuntu16.04 xenial
Deploying Contrail Release 4.1 with Netronome SmartNIC
Follow these steps to deploy Contrail Release 4.1 with Netronome SmartNIC:
Download the Netronome build package (Agilio vRouter r4.1.2—release notes build 82—(2018/10/25) ) from https://support.netronome.com .
Download the Contrail package (contrail-networking-docker_4.1.2.0-<build>_xenial.tgz) at https://support.juniper.net/support/downloads/?p=contrail#sw .
Note:You must use Ubuntu 16.04 Xenial for the deployment.
Run the following script to rename the NFP interfaces.
Extract Netronome build tar file - > Netronome_R4.1.2_build_<build_nr>_Juju/Maas-Commissioningscript/ 00-maas-01-dagilio
Ubuntu-16.04-ga (kernel-4.4) package does not contain NFP driver. So the NFP driver needs to be installed separately. If deployed using MaaS, run the following command in the /etc/maas/preseeds/curtin_userdata directory to install the NFP driver.
netronome_01_driver_add_target: curtin in-target -- bash -c '[[ "$(lspci -Dnnd 19ee:4000)" ]] && aptget install --quiet --assume-yes agilio-nfp-driver-dkms agilio-nic-firmware || true'
The sample bundle.yaml file for the deployment is available in the Netronome .tar file in the following path:
Netronome_R4.1.2_build_26_Juju/agilio-vrouter/ example-docker-ocata-agilio-bundle.yaml
Change the Kernel options setting for enabling Huge Pages as shown below:
kernel_opts='intel_iommu=on iommu=pt default_hugepagesz=2M hugepagesz=2M hugepages=<nr_hugepages>'
Enable hardware acceleration by installing the following Agilio packages.
agilio-nfp-driver-dkms, agilio-nic-firmware
Bootstrap Juju controller.
Run the following command to clone Contrail Charm from Github.
git clone https://github.com/Juniper/contrail-charms
Agilio-vrouter uses
virtio-forwarder
asvnic-type
to enable hardware acceleration. You need to patch OpenStack packages to usevirtio-forwarder
asvnic-type
. For this, you need to specify the location of the patched OpenStack packages in the bundle.yaml file.The following are the patched OpenStack Charm packages to be picked from the local directory.
charm: ./charm-nova-cloud-controller, charm: ./charm-neutron-api charm: ./charm-nova-compute, charm: ./agilio-vrouter
You can find the patches in https://drive.google.com/drive/folders/1XtFA3rEkYeXl13xAqTrwHD6jO8JcIBWI .
Use the following script provided in the Netronome build tar file:
Extract Netronome_R4.1_build_<build_nr>.tar-> debs/package_builder -> ./create-openstackpackages.sh
Deploy the cluster using the following command.
juju deploy ./bundle.yaml
Run the following commands to attach the Contrail packages to Juju.
juju attach contrail-controller contrail-controller=contrail-controller.tar.gz juju attach contrail-analytics contrail-analytics=contrail-analytics.tar.gz juju attach contrail-analyticsdb contrail-analyticsdb.tar.gz
Use the following commands to view the status or to log into any of the contrail/openstack units after deployment:
openstack units after the deployment: juju status
Identify the name of the unit or IP address from the
juju status
output:ssh into contrail-controller: Juju ssh accel-nova-compute/0 ß0 is unit number
You can find the logs in the /var/log/juju directory of the unit.
If logs do not indicate failure of any of the above steps, and all the units are deployed and are ready for use, make sure that
contrail-api
is reachable fromneutron-server
. If control data subnet is not same as the subnet used for the provisioning, you may need to configure a static route.
Launching a VM after Deploying Contrail Release 4.1 with Netronome SmartNIC
Follow these steps to launch a VM after deployment.
Create a flavour with the following metadata for spawning hardware accelerated VMs.
--property hw:mem_page_size = 2048 or --property hw:mem_page_size = 1048576
In this release, spawning a VM without creating a port is not supported. You need to create a port with
virtio-forwarder
asvnic-type
. Then you need to use this port to launch a hardware accelerated VM.vnic_type virtio-forwarder
Use OpenStack dashboard or nova boot to spawn the VM.
Caveats
This section lists the known issues with Netronome SmartNIC deployment.
nfp_p1
interface is not recommended to be used because of the following issue:https://bugs.launchpad.net/juniperopenstack/trunk/+bug/1797358
Launching a VM directly using net-ids is not supported. You need to use port-ids. See https://bugs.launchpad.net/juniperopenstack/r4.1/+bug/1796812 for more information.