Install package by dpkg since fuel plugin don't support multi version

Change-Id: Id337d64e11de95c13519530bad284b28237ca455
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
This commit is contained in:
Guo Ruijing 2016-04-29 14:59:09 +08:00
parent bca561ecd3
commit d5e302c267
5 changed files with 28 additions and 3 deletions

View File

@ -3,17 +3,17 @@ if $operatingsystem == 'Ubuntu' {
if $fuel_settings['fuel-plugin-ovs']['support_nsh'] and
$fuel_settings['fuel-plugin-ovs']['support_dpdk'] {
exec { 'install ovs/nsh-dpdk':
command => '/usr/bin/apt-get -y --force-yes install openvswitch-datapath-dkms_2.4.90.nshdpdk-1 openvswitch-common_2.4.90.nshdpdk-1 openvswitch-switch_2.4.90.nshdpdk-1'
command => '/usr/bin/curl http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/install.sh | /bin/bash -s nshdpdk'
}
}
elsif $fuel_settings['fuel-plugin-ovs']['support_dpdk'] {
exec { 'install ovs/dpdk':
command => '/usr/bin/apt-get -y --force-yes install openvswitch-datapath-dkms_2.4.90.dpdk-1 openvswitch-common_2.4.90.dpdk-1 openvswitch-switch_2.4.90.dpdk-1'
command => '/usr/bin/curl http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/install.sh | /bin/bash -s dpdk'
}
}
elsif $fuel_settings['fuel-plugin-ovs']['support_nsh'] {
exec { 'install ovs/nsh':
command => '/usr/bin/apt-get -y --force-yes install openvswitch-datapath-dkms_2.4.90.nsh-1 openvswitch-common_2.4.90.nsh-1 openvswitch-switch_2.4.90.nsh-1'
command => '/usr/bin/curl http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/install.sh | /bin/bash -s nsh'
}
}

25
repositories/ubuntu/install.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
set -eux
INSTALL_HOME=/tmp/ovs-nshdpdk
rm -rf $INSTALL_HOME; mkdir -p $INSTALL_HOME
cd $INSTALL_HOME
wget -r -nd -np http://10.20.0.2:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu
if [ $1 = 'nshdpdk' ]
then
dpkg -i openvswitch-datapath-dkms_2.4.90.nshdpdk-1_all.deb
dpkg -i openvswitch-common_2.4.90.nshdpdk-1_amd64.deb
dpkg -i openvswitch-switch_2.4.90.nshdpdk-1_amd64.deb
elif [ $1 = 'nsh' ]
then
dpkg -i openvswitch-datapath-dkms_2.4.90.nsh-1_all.deb
dpkg -i openvswitch-common_2.4.90.nsh-1_amd64.deb
dpkg -i openvswitch-switch_2.4.90.nsh-1_amd64.deb
elif [ $1 = 'dpdk' ]
then
dpkg -i openvswitch-datapath-dkms_2.4.90.dpdk-1_all.deb
dpkg -i openvswitch-common_2.4.90.dpdk-1_amd64.deb
dpkg -i openvswitch-switch_2.4.90.dpdk-1_amd64.deb
fi