Add DPDK Initialization
Change-Id: Ieef5f888bf2ccfde64df97d8131d05dd25eefca9 Signed-off-by: Ling Yu <ling.y.yu@intel.com> Signed-off-by: Ruijing Guo <ruijing.guo@intel.com>
This commit is contained in:
parent
7ca2f9cf52
commit
ea851c2249
|
@ -1,47 +1,42 @@
|
||||||
$fuel_settings = parseyaml(file('/etc/compute.yaml'))
|
$fuel_settings = parseyaml(file('/etc/compute.yaml'))
|
||||||
if $operatingsystem == 'Ubuntu' {
|
if $operatingsystem == 'Ubuntu' {
|
||||||
if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
|
if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
|
||||||
exec { "wget dpdk":
|
$NICS = $fuel_settings['fuel-plugin-ovs']['dpdk-bind-nic']
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-install.sh",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install dpdk":
|
exec { "install dpdk":
|
||||||
command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.sh",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-install.sh; bash ./dpdk-install.sh",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk-init':
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.init -O /etc/init.d/dpdk;chmod +x /etc/init.d/dpdk",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk-conf':
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.conf -O /etc/default/dpdk.conf",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'adapt_conf_file':
|
||||||
|
command => "sed 's/DPDK_NIC_MAPPINGS=.*/DPDK_NIC_MAPPINGS=${NICS}/' -i /etc/default/dpdk.conf",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk start':
|
||||||
|
command => "bash /etc/init.d/dpdk start",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec { "install ovs with dpdk":
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/ovs-dpdk-install.sh; bash ./ovs-dpdk-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
|
||||||
package { 'openvswitch-datapath-dkms':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
}
|
|
||||||
package { 'openvswitch-common':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
}
|
|
||||||
package { 'openvswitch-switch':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
require => Package['openvswitch-common','openvswitch-datapath-dkms'],
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
exec { "install openvswitch-datapath-dkms package":
|
exec { "install ovs":
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-datapath-dkms_2.4.90-1_all.deb;sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/ovs-install.sh; bash ./ovs-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install openvswitch-common package":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-common_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install openvswitch-switch package":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-switch_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
|
if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
|
||||||
exec { "wget dppd":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-install.sh",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install dppd":
|
exec { "install dppd":
|
||||||
command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install.sh",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-install.sh; bash ./dppd-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elsif $operatingsystem == 'CentOS' {
|
} elsif $operatingsystem == 'CentOS' {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,40 @@
|
||||||
$fuel_settings = parseyaml(file('/etc/controller.yaml'))
|
$fuel_settings = parseyaml(file('/etc/controller.yaml'))
|
||||||
if $operatingsystem == 'Ubuntu' {
|
if $operatingsystem == 'Ubuntu' {
|
||||||
if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
|
if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
|
||||||
exec { "wget dpdk":
|
$NICS = $fuel_settings['fuel-plugin-ovs']['dpdk-bind-nic']
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-install.sh",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install dpdk":
|
exec { "install dpdk":
|
||||||
command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.sh",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-install.sh; bash ./dpdk-install.sh",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk-init':
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.init -O /etc/init.d/dpdk;chmod +x /etc/init.d/dpdk",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk-conf':
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.conf -O /etc/default/dpdk.conf",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'adapt_conf_file':
|
||||||
|
command => "sed 's/DPDK_NIC_MAPPINGS=.*/DPDK_NIC_MAPPINGS=${NICS}/' -i /etc/default/dpdk.conf",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk start':
|
||||||
|
command => "bash /etc/init.d/dpdk start",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec { "install ovs with dpdk":
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/ovs-dpdk-install.sh; bash ./ovs-dpdk-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
|
||||||
package { 'openvswitch-datapath-dkms':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
}
|
|
||||||
package { 'openvswitch-common':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
}
|
|
||||||
package { 'openvswitch-switch':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
require => Package['openvswitch-common','openvswitch-datapath-dkms'],
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
exec { "install openvswitch-datapath-dkms package":
|
exec { "install ovs":
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-datapath-dkms_2.4.90-1_all.deb;sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/ovs-install.sh; bash ./ovs-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install openvswitch-common package":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-common_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install openvswitch-switch package":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-switch_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
|
if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
|
||||||
exec { "wget dppd":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-install.sh",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install dppd":
|
exec { "install dppd":
|
||||||
command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install.sh",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-install.sh; bash ./dppd-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,40 @@
|
||||||
$fuel_settings = parseyaml(file('/etc/primary-controller.yaml'))
|
$fuel_settings = parseyaml(file('/etc/primary-controller.yaml'))
|
||||||
if $operatingsystem == 'Ubuntu' {
|
if $operatingsystem == 'Ubuntu' {
|
||||||
if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
|
if $fuel_settings['fuel-plugin-ovs']['use_dpdk'] {
|
||||||
exec { "wget dpdk":
|
$NICS = $fuel_settings['fuel-plugin-ovs']['dpdk-bind-nic']
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-install.sh",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install dpdk":
|
exec { "install dpdk":
|
||||||
command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install.sh",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-install.sh; bash ./dpdk-install.sh",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk-init':
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.init -O /etc/init.d/dpdk;chmod +x /etc/init.d/dpdk",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk-conf':
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk.conf -O /etc/default/dpdk.conf",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'adapt_conf_file':
|
||||||
|
command => "sed 's/DPDK_NIC_MAPPINGS=.*/DPDK_NIC_MAPPINGS=${NICS}/' -i /etc/default/dpdk.conf",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec {'dpdk start':
|
||||||
|
command => "bash /etc/init.d/dpdk start",
|
||||||
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
|
} ->
|
||||||
|
exec { "install ovs with dpdk":
|
||||||
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/ovs-dpdk-install.sh; bash ./ovs-dpdk-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
|
||||||
package { 'openvswitch-datapath-dkms':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
}
|
|
||||||
package { 'openvswitch-common':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
}
|
|
||||||
package { 'openvswitch-switch':
|
|
||||||
ensure => "2.4.91-1",
|
|
||||||
require => Package['openvswitch-common','openvswitch-datapath-dkms'],
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
exec { "install openvswitch-datapath-dkms package":
|
exec { "install ovs":
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-datapath-dkms_2.4.90-1_all.deb;sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/ovs-install.sh; bash ./ovs-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install openvswitch-common package":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-common_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install openvswitch-switch package":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/openvswitch-switch_2.4.90-1_amd64.deb;sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
|
if $fuel_settings['fuel-plugin-ovs']['use_dppd'] {
|
||||||
exec { "wget dppd":
|
|
||||||
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-install.sh",
|
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
|
||||||
}
|
|
||||||
exec { "install dppd":
|
exec { "install dppd":
|
||||||
command => "bash /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install.sh",
|
command => "wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-install.sh; bash ./dppd-install.sh",
|
||||||
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
path => "/usr/bin:/usr/sbin:/bin:/sbin",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,11 @@ attributes:
|
||||||
weight: 20
|
weight: 20
|
||||||
value: false
|
value: false
|
||||||
label: "Use dpdk"
|
label: "Use dpdk"
|
||||||
|
dpdk-bind-nic:
|
||||||
|
value: 'eth2'
|
||||||
|
label: 'Network device'
|
||||||
|
weight: 40
|
||||||
|
type: "text"
|
||||||
use_dppd:
|
use_dppd:
|
||||||
type: "checkbox"
|
type: "checkbox"
|
||||||
weight: 20
|
weight: 20
|
||||||
|
|
|
@ -32,5 +32,5 @@ export RTE_SDK=/dpdk-${DPDK_VER}
|
||||||
export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
|
export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
|
||||||
./boot.sh
|
./boot.sh
|
||||||
./configure --with-dpdk=$DPDK_BUILD
|
./configure --with-dpdk=$DPDK_BUILD
|
||||||
sed -i "s/2.4.90-1/2.4.91-1/" debian/changelog;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/dkms.conf.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/rules.modules;sed -i "s?configure --?configure -- --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc?" debian/rules;make dist;tar -xzf openvswitch-2.4.90.tar.gz;
|
sed -i "s?set ovs-vswitchd unix?set ovs-vswitchd --dpdk -c 0x1 -n 4 -- unix?" utilities/ovs-ctl.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/dkms.conf.in;sed -i "s?configure --with-linux?configure --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc --with-linux?" debian/rules.modules;sed -i "s?configure --?configure -- --with-dpdk=/dpdk-2.1.0/x86_64-native-linuxapp-gcc?" debian/rules;make dist;tar -xzf openvswitch-2.4.90.tar.gz;
|
||||||
cd openvswitch-2.4.90;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
|
cd openvswitch-2.4.90;DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
|
||||||
|
|
|
@ -23,15 +23,14 @@ function build_pkg {
|
||||||
cd ${DIR}/ovs-nsh
|
cd ${DIR}/ovs-nsh
|
||||||
sudo docker build -t ovs-nsh .
|
sudo docker build -t ovs-nsh .
|
||||||
container_id=`sudo docker run -d ovs-nsh`
|
container_id=`sudo docker run -d ovs-nsh`
|
||||||
sudo docker cp $container_id:/openvswitch/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/
|
sudo docker cp $container_id:/openvswitch/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/
|
||||||
sudo docker cp $container_id:/openvswitch/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/
|
sudo docker cp $container_id:/openvswitch/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/ovs/
|
||||||
sudo docker cp $container_id:/openvswitch/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/
|
sudo docker cp $container_id:/openvswitch/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/ovs/
|
||||||
sudo docker cp $container_id:/dpdk-2.1.0.tar.gz ${DIR}/repositories/ubuntu/dpdk-install/
|
sudo docker cp $container_id:/dpdk-2.1.0.tar.gz ${DIR}/repositories/ubuntu/dpdk/
|
||||||
sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-common_2.4.91-1_amd64.deb ${DIR}/repositories/ubuntu/
|
sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-common_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk
|
||||||
sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-datapath-dkms_2.4.91-1_all.deb ${DIR}/repositories/ubuntu/
|
sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb ${DIR}/repositories/ubuntu/dpdk
|
||||||
sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-switch_2.4.91-1_amd64.deb ${DIR}/repositories/ubuntu/
|
sudo docker cp $container_id:/openvswitch-dpdk/openvswitch-switch_2.4.90-1_amd64.deb ${DIR}/repositories/ubuntu/dpdk
|
||||||
wget https://01.org/sites/default/files/downloads/intel-data-plane-performance-demonstrators/dppd-prox-v021.zip
|
wget https://01.org/sites/default/files/downloads/intel-data-plane-performance-demonstrators/dppd-prox-v021.zip -O ${DIR}/repositories/ubuntu/dppd/dppd-prox-v021.zip
|
||||||
mv dppd-prox-v021.zip ${DIR}/repositories/ubuntu/dppd-install/
|
|
||||||
;;
|
;;
|
||||||
*) echo "Not supported system"; exit 1;;
|
*) echo "Not supported system"; exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eux
|
|
||||||
rm -rf /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/
|
|
||||||
mkdir /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/
|
|
||||||
cd /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/;wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk-install/dpdk-2.1.0.tar.gz;tar -xvzf dpdk-2.1.0.tar.gz
|
|
||||||
cd /etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/dpdk-2.1.0; make install T=x86_64-native-linuxapp-gcc
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
INSTALL_HOME=/usr/share/dpdk/
|
||||||
|
sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
|
||||||
|
cd $INSTALL_HOME
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/dpdk-2.1.0.tar.gz;
|
||||||
|
tar -xvzf dpdk-2.1.0.tar.gz
|
||||||
|
cd $INSTALL_HOME/dpdk-2.1.0; make install T=x86_64-native-linuxapp-gcc
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
DPDK_NUM_HUGEPAGES=${DPDK_NUM_HUGEPAGES:-2048}
|
||||||
|
DPDK_HUGEPAGE_MOUNT=${DPDK_HUGEPAGE_MOUNT:-/dev/hugepages}
|
||||||
|
DPDK_NIC_MAPPINGS=eth1
|
||||||
|
DPDK_ALLOCATE_HUGEPAGES=True
|
||||||
|
DPDK_INTERFACE_DRIVER='igb_uio'
|
||||||
|
DPDK_HUGEPAGE_MOUNT_PAGESIZE=''
|
|
@ -0,0 +1,91 @@
|
||||||
|
#! /bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 Intel, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at:
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
set -eux
|
||||||
|
echo "sourcing config"
|
||||||
|
source /etc/default/dpdk.conf
|
||||||
|
|
||||||
|
RTE_SDK=${RTE_SDK:-/usr/share/dpdk/dpdk-2.1.0}
|
||||||
|
RTE_TARGET=${RTE_TARGET:-x86_64-native-linuxapp-gcc}
|
||||||
|
DPDK_DIR=$RTE_SDK
|
||||||
|
|
||||||
|
load_igb_uio_module(){
|
||||||
|
if [ ! -f $RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko ];then
|
||||||
|
echo "## ERROR: Target does not have the DPDK UIO Kernel Module."
|
||||||
|
echo " To fix, please try to rebuild target."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
sudo modprobe uio
|
||||||
|
echo "Loading DPDK UIO module"
|
||||||
|
sudo insmod $RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko
|
||||||
|
}
|
||||||
|
|
||||||
|
bind_nic_2_driver() {
|
||||||
|
list=("$@")
|
||||||
|
# Bind nics to DPDK_INTERFACE_DRIVER.
|
||||||
|
for pair in "${list[@]}"; do
|
||||||
|
addr=`echo $pair | cut -f 1 -d "#"`
|
||||||
|
nic=`echo $pair | cut -f 2 -d "#"`
|
||||||
|
echo sudo RTE_SDK=${DPDK_DIR} RTE_TARGET=build ${DPDK_DIR}/tools/dpdk_nic_bind.py -b $DPDK_INTERFACE_DRIVER $addr
|
||||||
|
sudo RTE_SDK=${DPDK_DIR} RTE_TARGET=build ${DPDK_DIR}/tools/dpdk_nic_bind.py -b $DPDK_INTERFACE_DRIVER $addr
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
bind_nics(){
|
||||||
|
# Extract nic name, bind it with DPDK_INTERFACE_DRIVER driver
|
||||||
|
PCI_MAPPINGS=${DPDK_NIC_MAPPINGS//,/ }
|
||||||
|
PCI_ARRAY=( $PCI_MAPPINGS )
|
||||||
|
bind_nic_2_driver "${PCI_ARRAY[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
alloc_hugepages() {
|
||||||
|
HUGEPAGE_SIZE=$(grep Hugepagesize /proc/meminfo | awk '{ print $2 }')
|
||||||
|
sudo mkdir -p $DPDK_HUGEPAGE_MOUNT
|
||||||
|
|
||||||
|
|
||||||
|
#allocate hugepages
|
||||||
|
if [ $DPDK_ALLOCATE_HUGEPAGES == 'True' ]; then
|
||||||
|
for d in /sys/devices/system/node/node? ; do
|
||||||
|
echo $DPDK_NUM_HUGEPAGES | sudo tee $d/hugepages/hugepages-${HUGEPAGE_SIZE}kB/nr_hugepages
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$DPDK_HUGEPAGE_MOUNT_PAGESIZE" ]; then
|
||||||
|
sudo mount -t hugetlbfs pagesize=$DPDK_HUGEPAGE_MOUNT_PAGESIZE nodev $DPDK_HUGEPAGE_MOUNT
|
||||||
|
else
|
||||||
|
sudo mount -t hugetlbfs nodev $DPDK_HUGEPAGE_MOUNT
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_start(){
|
||||||
|
echo "mounting hugepages"
|
||||||
|
alloc_hugepages
|
||||||
|
echo "loading DPDK_INTERFACE_DRIVER diver"
|
||||||
|
load_igb_uio_module
|
||||||
|
bind_nics
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
cmd_start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
INSTALL_HOME=/usr/share/ovs-dpdk/
|
||||||
|
sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
|
||||||
|
cd $INSTALL_HOME
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-datapath-dkms_2.4.90-1_all.deb
|
||||||
|
sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-common_2.4.90-1_amd64.deb
|
||||||
|
sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dpdk/openvswitch-switch_2.4.90-1_amd64.deb
|
||||||
|
sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eux
|
|
||||||
sudo apt-get install -y pkg-config unzip liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
|
|
||||||
rm -rf /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install/
|
|
||||||
mkdir /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install/
|
|
||||||
cd /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install/;wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd-install/dppd-prox-v021.zip;unzip dppd-prox-v021.zip
|
|
||||||
export RTE_SDK=/etc/fuel/plugins/fuel-plugin-ovs-0.5/dpdk-install/dpdk-2.1.0
|
|
||||||
export RTE_TARGET=x86_64-native-linuxapp-gcc
|
|
||||||
cd /etc/fuel/plugins/fuel-plugin-ovs-0.5/dppd-install/dppd-PROX-v021
|
|
||||||
export DPPD_DIR=`pwd`
|
|
||||||
make
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
INSTALL_HOME=/usr/share/dppd/
|
||||||
|
sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
|
||||||
|
cd $INSTALL_HOME
|
||||||
|
sudo apt-get install -y pkg-config unzip liblua5.2-dev libpcap-dev libedit-dev libncurses5-dev libncursesw5-dev
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/dppd/dppd-prox-v021.zip;
|
||||||
|
unzip dppd-prox-v021.zip
|
||||||
|
export RTE_SDK=/usr/share/dpdk/dpdk-2.1.0
|
||||||
|
export RTE_TARGET=x86_64-native-linuxapp-gcc
|
||||||
|
cd /usr/share/dppd/dppd-PROX-v021
|
||||||
|
export DPPD_DIR=`pwd`; make
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
INSTALL_HOME=/usr/share/ovs/
|
||||||
|
sudo rm -rf $INSTALL_HOME ; mkdir -p $INSTALL_HOME
|
||||||
|
cd $INSTALL_HOME
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-datapath-dkms_2.4.90-1_all.deb
|
||||||
|
sudo dpkg -i openvswitch-datapath-dkms_2.4.90-1_all.deb
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-common_2.4.90-1_amd64.deb
|
||||||
|
sudo dpkg -i openvswitch-common_2.4.90-1_amd64.deb
|
||||||
|
wget http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.5/repositories/ubuntu/ovs/openvswitch-switch_2.4.90-1_amd64.deb
|
||||||
|
sudo dpkg -i openvswitch-switch_2.4.90-1_amd64.deb
|
Loading…
Reference in New Issue