Juniper/contrail-tripleo-heat-templates

Name: contrail-tripleo-heat-templates

Owner: Juniper Networks

Description: Contrail tripleO heat templates

Created: 2017-02-01 00:32:04.0

Updated: 2018-03-26 18:52:28.0

Pushed: 2018-03-14 13:25:45.0

Homepage: null

Size: 25397

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Introduction

Currently the following combinations of RHEL/OSP/Contrail are supported:
RHEL7.4/OSP11/Contrail 4.0.2
RHEL7.4/OSP10/Contrail 4.0.2
RHEL7.4/OSP10/Contrail 3.2.6
The infrastructure section should only be used as an EXAMPLE. It is not
considered as part of OSP/Contrail deployment.

Infrastructure considerations

There are many different ways on how to create the infrastructure providing
the control plane elements. In this example all control plane functions
are provided as Virtual Machines hosted on KVM hosts. For HA 12 VMs are needed:

The shown architecture is JUST an example to illustrate a possible option
for the control plane setup.

Layer1:

-----------------------------------+
KVM host 3                         |
---------------------------------+ |
M host 2                         | |
-------------------------------+ | |
 host 1                        | | |
 +---------------------------+ | | |
 |    Contrail Analytics DB 1| | | |
++-------------------------+ | | | |
|   Contrail Analytics 1   | | | | |
+------------------------+ | | | | |
  Contrail Controller 1  | +-+ | | |
-----------------------+ | |   | | |      +----------------+
OpenStack Controller 1 | +-+   | | |      |Compute Node N  |
                       | |     | | |    +----------------+ |
+-----+        +-----+ +-+     | | |    |Compute Node 2  | |
|VNIC1|        |VNIC3| |       | | |  +----------------+ | |
---+--------------+----+       | | |  |Compute Node 1  | | |
   |              |            | | |  |                | | |
   |              |            | | |  |                | | |
 +-+-+          +-+-+          | | |  |                | | |
 |br0|          |br1|          | | |  |                | | |
 +-+-+          +-+-+          | +-+  |                | | |
   |              |            | |    |                | | |
+--+-+          +-+--+         +-+    | +----+  +----+ | +-+
|NIC1|          |NIC3|         |      | |NIC1|  |NIC2| +-+
---+--------------+------------+      +---+-------+----+
   |              |                       |       |
---+--------------+-----------------------+-------+--------+
                                                           |
                       Switch                              |
-----------------------------------------------------------+

Layer2 (VLAN):

--------------------------------------------------------------------+
                          KVM                                       |
--------------+ +-----------+ +-----------+ +---------------------+ |
 OpenStack    | | Contrail  | | Contrail  | | Contrail Controller | |
 Controller   | | Analytics | | Analytics | |                     | |
              | |           | | DB        | |                     | |
 +----------+ | | +-------+ | | +-------+ | | +-------+  +------+ | |
 |  VNIC1   | | | | VNIC1 | | | | VNIC1 | | | | VNIC1 |  | VNIC2| | |
--------------+ +-----------+ +-----------+ +---------------------+ |
  | | | | | |      | | | |       | | | |       | | | |        |     |
---------------------------------------------------------+ +------+ |
  | | | | | |      | | | |       | | | |       | | | |   | |  |   | |
 +-----------------------------------------------------+ | |  |   | |
 |  | | | | |        | | |         | | |         | | |   | |  |   | |
 | +---------------------------------------------------+ | |  |   | |
 | |  | | | |          | |           | |           | |   | |  |   | |
 | | +-------------------------------------------------+ | |  |   | |
 | | |  | | |            |             |             |   | |  |   | |
 | | | +-----------------------------------------------+ | |  |   | |
 | | | |  | |                                            | |  |   | |
 | | | | +---------------------------------------------+ | |  |   | |
 | | | | |  |                                            | |  |   | |
 | | | | | +-------------------------------------------+ | |  |   | |
 | | | | | |                                             | |  |   | | +--------------------+
 | | | | | |            br0                              | |  |br1| | | Compute Node       |
---------------------------------------------------------+ +------+ | |                    |
 | | | | | |                                                  |     | |                    |
------------+                                              +------+ | | +-------+ +------+ |
  NIC1      |                                              | NIC2 | | | | NIC1  | | NIC2 | |
--------------------------------------------------------------------+ +--------------------+
 | | | | | |                                                  |          | | | |     |
-----------------------------------------------------------------------------------------+
    ge0      |                                             | ge1  |     |  ge2  |  | ge3||
-------------+                                             +------+     +-------+  +-----+
 | | | | | |                                                  |          | | | |     |   |
 | | | | | |            Switch                                |          | | | |     |   |
 | | | | | |                              tenant (no vlan) -> +----------------------+   |
 | | | | | |                                                             | | | |         |
 | | | | | +------------------storage_mgmt (vlan750)                     | | | |         |
 | | | | |                                                               | | | |         |
 | | | | +--------------------storage (vlan740)                          | | | |         |
 | | | |                                                                 | | | |         |
 | | | +----------------------management (vlan730)-----------------------------+         |
 | | |                                                                   | | |           |
 | | +------------------------external_api (vlan720)-------------------------+           |
 | |                                                                     | |             |
 | +--------------------------internal_api (vlan710)-----------------------+             |
 |                                                                       |               |
 +----------------------------provisioning (vlan700)---------------------+               |
                                                                                         |
-----------------------------------------------------------------------------------------+

vSwitch configuration:

pSwitch configuration:

Control plane KVM host preparation (KVM 1-3)

The control plane KVM hosts will host the control plane VMs. Each KVM host
will need virtual switches and the virtual machine definitions. The tasks
described must be done on each of the three hosts.
NIC 1 - 3 have to be substituded with real NIC names.

Install basic packages
install -y libguestfs libguestfs-tools openvswitch virt-install kvm libvirt libvirt-python python-virtinst
Start libvirtd & ovs
emctl start libvirtd
emctl start openvswitch
Create virtual switches for the undercloud VM
vsctl add-br br0
vsctl add-br br1
vsctl add-port br0 NIC1
vsctl add-port br1 NIC2
<< EOF > br0.xml
work>
ame>br0</name>
orward mode='bridge'/>
ridge name='br0'/>
irtualport type='openvswitch'/>
ortgroup name='overcloud'>
<vlan trunk='yes'>
  <tag id='700' nativeMode='untagged'/>
  <tag id='710'/>
  <tag id='720'/>
  <tag id='730'/>
  <tag id='740'/>
  <tag id='750'/>
</vlan>
portgroup>
twork>

<< EOF > br1.xml
work>
ame>br1</name>
orward mode='bridge'/>
ridge name='br1'/>
irtualport type='openvswitch'/>
twork>

h net-define br0.xml
h net-start br0
h net-autostart br0
h net-define br1.xml
h net-start br1
h net-autostart br1
Define virtual machine templates

As described above, each KVM host needs at least 4 virtual machine templates.
For lab testing the computes can be virtualized as well, with the usual
restrictions coming with nested HV.

0
i in compute control contrail-controller contrail-analytics contrail-analytics-database

m=$(expr $num + 1)
mu-img create -f qcow2 /var/lib/libvirt/images/${i}_${num}.qcow2 40G
rsh define /dev/stdin <<EOF
rt-install --name ${i}_$num --disk /var/lib/libvirt/images/${i}_${num}.qcow2 --vcpus=4 --ram=16348 --network network=br0,model=virtio,portgroup=overcloud --network network=br1,model=virtio --virt-type kvm --import --os-variant rhel7 --serial pty --console pty,target_type=virtio --print-xml)


Get provisioning interface mac addresses for ironic PXE

The virtual machines must be imported into ironic. There are different ways
to do that. One way is to create a list of all VMs in the following format:
MAC NODE_NAME IPMI/KVM_IP ROLE_NAME

4:00:16:54:d8 control-1-at-5b3s30 10.87.64.31 control    

In order to get the initial list per KVM host the following command can be run:

i in compute control contrail-controller contrail-analytics contrail-analytics-database    

ov_mac=`virsh domiflist ${i}|grep br_prov|awk '{print $5}'`
ho ${prov_mac} ${i} >> ironic_list

The ironic_list file will contain MAC ROLE_NAME and must be manually extended
to MAC NODE_NAME IPMI/KVM_IP ROLE_NAME.
This is an example of a full list across three KVM hosts:

4:00:16:54:d8 control-1-at-5b3s30 10.87.64.31 control
4:00:2a:7d:99 compute-1-at-5b3s30 10.87.64.31 compute
4:00:e0:54:b3 tsn-1-at-5b3s30 10.87.64.31 contrail-tsn
4:00:d6:2b:03 contrail-controller-1-at-5b3s30 10.87.64.31 contrail-controller
4:00:01:c1:af contrail-analytics-1-at-5b3s30 10.87.64.31 contrail-analytics
4:00:4a:9e:52 contrail-analytics-database-1-at-5b3s30 10.87.64.31 contrail-analytics-database
4:00:40:9e:13 control-1-at-centos 10.87.64.32 control
4:00:1d:58:4d compute-dpdk-1-at-centos 10.87.64.32 compute-dpdk
4:00:6d:89:2d compute-2-at-centos 10.87.64.32 compute
4:00:a8:46:5a contrail-controller-1-at-centos 10.87.64.32 contrail-controller
4:00:b3:2f:7d contrail-analytics-1-at-centos 10.87.64.32 contrail-analytics
4:00:59:e3:10 contrail-analytics-database-1-at-centos 10.87.64.32 contrail-analytics-database
4:00:1d:8c:39 control-1-at-5b3s32 10.87.64.33 control
4:00:9c:4b:bf compute-1-at-5b3s32 10.87.64.33 compute
4:00:1d:a9:d9 compute-2-at-5b3s32 10.87.64.33 compute
4:00:cd:59:92 contrail-controller-1-at-5b3s32 10.87.64.33 contrail-controller
4:00:2f:81:1a contrail-analytics-1-at-5b3s32 10.87.64.33 contrail-analytics
4:00:a1:4a:23 contrail-analytics-database-1-at-5b3s32 10.87.64.33 contrail-analytics-database

This list will be needed on the undercloud VM later on.
With that the control plane VM KVM host preparation is done.

Undercloud preparation on the KVM host hosting the undercloud VM

The undercloud VM can be installed on one of the three KVM hosts or on a
different one.

Set password & subscription information
rt USER=<YOUR_RHEL_SUBS_USER>
rt PASSWORD=<YOUR_RHEL_SUBS_PWD>
rt POOLID=<YOUR_RHEL_POOL_ID>
rt ROOTPASSWORD=<UNDERCLOUD_ROOT_PWD> # choose a root user password
rt STACKPASSWORD=<STACK_USER_PWD> # choose a stack user password
Install basic packages
install -y libguestfs libguestfs-tools openvswitch virt-install kvm libvirt libvirt-python python-virtinst
Start libvirtd & ovs
emctl start libvirtd
emctl start openvswitch
Create and become stack user
add -G libvirt stack
 $STACKPASSWORD |passwd stack --stdin
 "stack ALL=(root) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/stack
d 0440 /etc/sudoers.d/stack
Create ssh key
keygen -t dsa
Adjust permissions
p -R libvirt /var/lib/libvirt/images
d g+rw /var/lib/libvirt/images
Get rhel 7.4 kvm image

goto: https://access.redhat.com/downloads/content/69/ver=/rhel—7/7.4/x86_64/product-software (at the time of this writing: rhel-server-7.4-x86_64-kvm.qcow2) download: KVM Guest Image

Create virtual switches for the undercloud VM (in case it runs on a

different KVM host than the overcloud VMs

vsctl add-br br0
vsctl add-port br0 NIC1
<< EOF > br0.xml
work>
ame>br0</name>
orward mode='bridge'/>
ridge name='br0'/>
irtualport type='openvswitch'/>
ortgroup name='overcloud'>
<vlan trunk='yes'>
  <tag id='700' nativeMode='untagged'/>
  <tag id='710'/>
  <tag id='720'/>
  <tag id='730'/>
  <tag id='740'/>
  <tag id='750'/>
</vlan>
portgroup>
twork>

h net-define br0.xml
h net-start br0
h net-autostart br0
Prepare undercloud VM
OSP10
rt LIBGUESTFS_BACKEND=direct
-img create -f qcow2 undercloud.qcow2 100G
-resize --expand /dev/sda1 rhel-server-7.4-x86_64-kvm.qcow2 undercloud.qcow2
-customize  -a undercloud.qcow2 \
run-command 'xfs_growfs /' \
root-password password:$ROOTPASSWORD \
hostname undercloud.local \
sm-credentials $USER:password:$PASSWORD --sm-register --sm-attach auto --sm-attach pool:$POOLID \
run-command 'useradd stack' \
password stack:password:$STACKPASSWORD \
run-command 'echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack' \
chmod 0440:/etc/sudoers.d/stack \
run-command 'subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms --enable=rhel-ha-for-rhel-7-server-rpms --enable=rhel-7-server-openstack-10-rpms' \
install python-tripleoclient \
run-command 'sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config' \
run-command 'systemctl enable sshd' \
run-command 'yum remove -y cloud-init' \
selinux-relabel
ndercloud.qcow2 /var/lib/libvirt/images/undercloud.qcow2
OSP11
rt LIBGUESTFS_BACKEND=direct
-img create -f qcow2 undercloud.qcow2 100G
-resize --expand /dev/sda1 rhel-server-7.4-x86_64-kvm.qcow2 undercloud.qcow2
-customize  -a undercloud.qcow2 \
run-command 'xfs_growfs /' \
root-password password:$ROOTPASSWORD \
hostname undercloud.local \
sm-credentials $USER:password:$PASSWORD --sm-register --sm-attach auto --sm-attach pool:$POOLID \
run-command 'useradd stack' \
password stack:password:$STACKPASSWORD \
run-command 'echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack' \
chmod 0440:/etc/sudoers.d/stack \
run-command 'subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms --enable=rhel-ha-for-rhel-7-server-rpms --enable=rhel-7-server-openstack-11-rpms' \
install python-tripleoclient \
run-command 'sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config' \
run-command 'systemctl enable sshd' \
run-command 'yum remove -y cloud-init' \
selinux-relabel
ndercloud.qcow2 /var/lib/libvirt/images/undercloud.qcow2
Install undercloud VM
-install --name undercloud \
disk /var/lib/libvirt/images/undercloud.qcow2 \
vcpus=4 \
ram=16348 \
network network=default,model=virtio \
network network=br0,model=virtio,portgroup=overcloud \
virt-type kvm \
import \
os-variant rhel7 \
graphics vnc \
serial pty \
noautoconsole \
console pty,target_type=virtio
Get undercloud ip
h domifaddr undercloud
Ssh into undercloud
stack@<UNDERCLOUD_IP>

Undercloud configuration

Configure undercloud (optionally)
usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf
/undercloud.conf
Install undercloud openstack
stack undercloud install
Source undercloud credentials
ce ~/stackrc
Get overcloud images
 yum install rhosp-director-images rhosp-director-images-ipa
r ~/images
/images
Upload overcloud images
OSP10
i in /usr/share/rhosp-director-images/overcloud-full-latest-10.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-10.0.tar; do tar -xvf $i; done
stack overcloud image upload --image-path /home/stack/images/

OSP11
i in /usr/share/rhosp-director-images/overcloud-full-latest-11.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-11.0.tar; do tar -xvf $i; done
stack overcloud image upload --image-path /home/stack/images/

Create contrail repo
 mkdir /var/www/html/contrail
Get contrail

go to:
https://www.juniper.net/support/downloads/?p=contrail#sw

Contrail 3.2.6

and download the 3.2.6 release (Redhat 7.3 + newton)
transfer it to the undercloud

 tar zxvf ~/contrail-install-packages-3.2.6.0-60-redhat73newton.tgz -C /var/www/html/contrail/
Contrail 4.0.2

and download the 4.0.2 release (Redhat 7 + Contrail Networking - RHOSP10) transfer it to the undercloud

 tar zxvf ~/contrail-install-packages_4.0.2.0-35-newton_redhat7.tgz -C /var/www/html/contrail/
Import ironic nodes

In this step the fully populated ironic_list from
infrastructure considerations/control plane KVM host preparation (KVM 1-3)/define virtual machine templates
is needed.

Virtual Machines

This imports all virtual machines into ironic.

user=SSH_USER
password=SSH_PASSWORD
e IFS= read -r line
 
c=`echo $line|awk '{print $1}'`
me=`echo $line|awk '{print $2}'`
m_ip=`echo $line|awk '{print $3}'`
ofile=`echo $line|awk '{print $4}'`
id=`ironic node-create -d pxe_ssh -p cpus=4 -p memory_mb=16348 -p local_gb=100 -p cpu_arch=x86_64 -i ssh_username=${ssh_user} -i ssh_virt_type=virsh -i ssh_address=${kvm_ip} -i ssh_password=${ssh_password} -n $name -p capabilities=profile:${profile} | tail -2|awk '{print $4}'`
onic port-create -a ${mac} -n ${uuid}
 < <(cat ironic_list)
Physical Machines

For importing physical compute nodes the pxe_ssh driver must be replaced with
the ipmi driver. Easiest way is to create a ironic_list_bms with only
physical machines in it.

_user=IPMI_USER
_password=IPMI_PASSWORD
e IFS= read -r line

c=`echo $line|awk '{print $1}'`
me=`echo $line|awk '{print $2}'`
mi_address=`echo $line|awk '{print $3}'`
ofile=`echo $line|awk '{print $4}'`
id=`ironic node-create -d pxe_ipmitool -p cpus=4 -p memory_mb=16348 -p local_gb=100 -p cpu_arch=x86_64 -i ipmi_username=${ipmi_user} -i ipmi_address=${ipmi_ip} -i ipmi_password=${ipmi_password} -n $name -p capabilities=profile:${profile} | tail -2|awk '{print $4}'`
onic port-create -a ${mac} -n ${uuid}
 < <(cat ironic_list_bms)
Configure boot mode
stack baremetal configure boot
Node introspection
node in $(openstack baremetal node list -c UUID -f value) ; do openstack baremetal node manage $node ; done
stack overcloud node introspect --all-manageable --provide
Node profiling
i in contrail-controller contrail-analytics contrail-database contrail-analytics-database; do
enstack flavor create $i --ram 4096 --vcpus 1 --disk 40
enstack flavor set --property "capabilities:boot_option"="local" --property "capabilities:profile"="${i}" ${i}

Configure overcloud

Install tripleo-heat-templates on the undercloud
Contrail 3.2.6
localinstall /var/www/html/contrail/contrail-tripleo-heat-templates-3.2.6.0-60.el7.noarch.rpm
Contrail 4.0.2
localinstall /var/www/html/contrail/contrail-tripleo-heat-templates-4.0.2.0-35.el7.noarch.rpm
r /usr/share/openstack-tripleo-heat-templates/ ~/tripleo-heat-templates
r contrail-tripleo-heat-templates/environments/* ~/tripleo-heat-templates/environments
r contrail-tripleo-heat-templates/puppet/services/network/* ~/tripleo-heat-templates/puppet/services/network
Contrail services (repo url etc.)
Set Contrail version
Contrail 3.2.6

set ContrailVersion: 3 in ~/tripleo-heat-templates/environments/contrail/contrail-services.yaml

/tripleo-heat-templates/environments/contrail/contrail-services.yaml
Contrail 4.0.2

4.0.2 is default

Overcloud networking
NIC configurations
OSP10
/tripleo-heat-templates/environments/contrail/contrail-net.yaml
/tripleo-heat-templates/environments/contrail/contrail-nic-config-compute.yaml
/tripleo-heat-templates/environments/contrail/contrail-nic-config.yaml
OSP11
/tripleo-heat-templates/environments/contrail/contrail-net.yaml
/tripleo-heat-templates/environments/configs/contrail/contrail-nic-config-compute.yaml
/tripleo-heat-templates/environments/configs/contrail/contrail-nic-config.yaml
Static ip assignment
OSP10
/tripleo-heat-templates/environments/contrail/ips-from-pool-all.yaml
provide subscription mgr credentials (rhel_reg_password, rhel_reg_pool_id, rhel_reg_repos, rhel_reg_user and method)
OSP10

Make also sure you add the repro “rhel-7-server-openstack-10-devtools-rpms” to rhel_reg_repos as it's needed for vRouter installation

/tripleo-heat-templates/environments/ips-from-pool-all.yaml
Provide subscription mgr credentials (rhel_reg_password, rhel_reg_pool_id, rhel_reg_repos, rhel_reg_user and method)
/tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml

Start overcloud installation

Contrail 3.2.6
stack overcloud deploy --templates tripleo-heat-templates/ \
roles-file tripleo-heat-templates/environments/contrail/roles_data.yaml \
 tripleo-heat-templates/environments/puppet-pacemaker.yaml \
 tripleo-heat-templates/environments/contrail/contrail-services.yaml \
 tripleo-heat-templates/environments/contrail/network-isolation.yaml \
 tripleo-heat-templates/environments/contrail/contrail-net.yaml \
 tripleo-heat-templates/environments/contrail/ips-from-pool-all.yaml \
 tripleo-heat-templates/environments/network-management.yaml \
 tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml \
 tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml \
libvirt-type qemu
Contrail 4.0.2
stack overcloud deploy --templates tripleo-heat-templates/ \
roles-file tripleo-heat-templates/environments/contrail/roles_data.yaml \
 tripleo-heat-templates/environments/puppet-pacemaker.yaml \
 tripleo-heat-templates/environments/contrail/contrail-services.yaml \
 tripleo-heat-templates/environments/network-isolation.yaml \
 tripleo-heat-templates/environments/contrail/contrail-net.yaml \
 tripleo-heat-templates/environments/ips-from-pool-all.yaml \
 tripleo-heat-templates/environments/network-management.yaml \
 tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml \
 tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml \
libvirt-type qemu

DPDK special

get dpdk tripleo-heat-templates
clone http://github.com/Juniper/contrail-tripleo-heat-templates -b dpdk4
ontrail-tripleo-heat-templates/* ~/tripleo-heat-templates
get contrail dpdk packages

Ask Michael

extract contrail dpdk packages to webserver
ontrail-3.2.2.0-33-dpdk.tgz /var/www/html/contrail
var/www/html/contrail && tar zxvf contrail-3.2.2.0-33-dpdk.tgz

virt-customize compute overcloud image

For DPDK the compute image must be modified. User/password for RH subscription must be provided:

/images
vercloud-full.qcow2 overcloud-full-dpdk.qcow2
-customize  -a overcloud-full-dpdk.qcow2 \
sm-credentials $RH_USER:password:$RH_PASSWORD --sm-register --sm-attach auto \
run-command 'subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms --enable=rhel-ha-for-rhel-7-server-rpms --enable=rhel-7-server-openstack-10-rpms' --enable=rhel-7-server-openstack-10-devtools-rpms \
copy-in /tmp/dpdk/contrail.repo:/etc/yum.repos.d \
run-command 'yum install -y contrail-vrouter-utils contrail-vrouter-dpdk contrail-vrouter-dpdk-init contrail-vrouter-dpdk-kernel-modules supervisor contrail-vrouter-agent contrail-nodemgr contrail-setup contrail-tripleo-puppet puppet-contrail python-contrail' \
run-command 'mkdir -p /lib/modules/`uname -r`/weak-updates' \
run-command 'cp `find /lib/modules -name rte_kni.ko |tail -1` /lib/modules/`uname -r`/weak-updates' \
run-command 'cp `find /lib/modules -name igb_uio.ko |tail -1` /lib/modules/`uname -r`/weak-updates' \
run-command 'echo "#!/bin/sh" >> /etc/sysconfig/modules/rte_kni.modules && echo "insmod /lib/modules/`uname -r`/weak-updates/rte_kni.ko" >> /etc/sysconfig/modules/rte_kni.modules && chmod +x /etc/sysconfig/modules/rte_kni.modules' \
run-command 'echo "#!/bin/sh" >> /etc/sysconfig/modules/igb_uio.modules && echo "insmod /lib/modules/`uname -r`/weak-updates/igb_uio.ko" >> /etc/sysconfig/modules/igb_uio.modules && chmod +x /etc/sysconfig/modules/igb_uio.modules' \
run-command 'depmod -a' \
run-command 'git clone https://github.com/Juniper/contrail-nova-vif-driver' \
run-command 'cd contrail-nova-vif-driver && python setup.py install' \
run-command 'rm -rf /etc/yum.repos.d/contrail.repo' \
run-command 'subscription-manager unregister' \
selinux-relabel
upload image to glance
ce image-create --name overcloud-full-dpdk --container-format bare --disk-format qcow2 --file overcloud-full-dpdk.qcow2
stack image set overcloud-full-dpdk --property kernel_id=`glance image-list |grep bm-deploy-kernel |awk '{print $2}'` --property ramdisk_id=glance image-list |grep bm-deploy-ramdisk |awk '{print $2}'
profile node for dpdk

DPDK_NODE_UUID = uuid of dpdk node

ic node-update $DPDK_NODE_UUID replace properties/capabilities=profile:contrail-dpdk,cpu_hugepages:true,cpu_txt:true,boot_option:local,cpu_aes:true,cpu_vt:true,cpu_hugepages_1g:true
stack flavor create contrail-dpdk --ram 4096 --vcpus 1 --disk 40
stack flavor set --property "capabilities:boot_option"="local" --property "capabilities:profile"="contrail-dpdk" contrail-dpdk
deploy
stack overcloud deploy --stack dpdk --templates tripleo-heat-templates/ \
roles-file tripleo-heat-templates/environments/contrail/roles_data.yaml \
 tripleo-heat-templates/environments/puppet-pacemaker.yaml \
 tripleo-heat-templates/environments/contrail/contrail-services.yaml \
 tripleo-heat-templates/environments/contrail/network-isolation.yaml \
 tripleo-heat-templates/environments/contrail/contrail-net-dpdk-bond-vlan.yaml \
 tripleo-heat-templates/environments/contrail/ips-from-pool-all.yaml \
 tripleo-heat-templates/environments/network-management.yaml \
 tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/environment-rhel-registration.yaml \
 tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml

TSN special

In case of EVPN VXLAN Provisioning when more than 2 TSN nodes are present, user should provide per TSN node specific hiera data with “contrail::vrouter::tsn_servers” containing a pair of TSNs.

ripleo-heat-templates/environments/contrail/contrail-tsn-servers.yaml
deploy
stack overcloud deploy --templates tripleo-heat-templates/ \
roles-file tripleo-heat-templates/environments/contrail/roles_data_contrail.yaml \
 .tripleo/environments/deployment-artifacts.yaml \
 tripleo-heat-templates/environments/contrail/contrail-services.yaml \
 tripleo-heat-templates/environments/contrail/contrail-net-single.yaml \
 contrail_controller_vip_env.yaml \
 misc_opts.yaml \
 tripleo-heat-templates/environments/contrail/contrail-tsn-servers.yaml

SR-IOV special

If you are enabling SR-IOV on a system you should complete the following:

ripleo-heat-templates/environments/contrail/contrail-sriov.yaml
deploy
stack overcloud deploy --templates tripleo-heat-templates/ \
roles-file tripleo-heat-templates/environments/contrail/roles_data_contrail.yaml \
 .tripleo/environments/deployment-artifacts.yaml \
 tripleo-heat-templates/environments/contrail/contrail-services.yaml \
 tripleo-heat-templates/environments/contrail/contrail-net-single.yaml \
 contrail_controller_vip_env.yaml \
 misc_opts.yaml \
 tripleo-heat-templates/environments/contrail/contrail-sriov.yaml

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.