From d5e302c26791ba27ea86abc02cdadd8bd3f3432d Mon Sep 17 00:00:00 2001 From: Guo Ruijing Date: Fri, 29 Apr 2016 14:59:09 +0800 Subject: [PATCH] Install package by dpkg since fuel plugin don't support multi version Change-Id: Id337d64e11de95c13519530bad284b28237ca455 Signed-off-by: Guo Ruijing --- .../puppet/manifests/ovs-install-compute.pp | 6 ++--- repositories/ubuntu/install.sh | 25 +++++++++++++++++++ repositories/ubuntu/ovs-dpdk/.gitkeep | 0 repositories/ubuntu/ovs-nsh-dpdk/.gitkeep | 0 repositories/ubuntu/ovs-nsh/.gitkeep | 0 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 repositories/ubuntu/install.sh delete mode 100644 repositories/ubuntu/ovs-dpdk/.gitkeep delete mode 100644 repositories/ubuntu/ovs-nsh-dpdk/.gitkeep delete mode 100644 repositories/ubuntu/ovs-nsh/.gitkeep diff --git a/deployment_scripts/puppet/manifests/ovs-install-compute.pp b/deployment_scripts/puppet/manifests/ovs-install-compute.pp index 9b9301f..dae0659 100644 --- a/deployment_scripts/puppet/manifests/ovs-install-compute.pp +++ b/deployment_scripts/puppet/manifests/ovs-install-compute.pp @@ -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' } } diff --git a/repositories/ubuntu/install.sh b/repositories/ubuntu/install.sh new file mode 100755 index 0000000..5630609 --- /dev/null +++ b/repositories/ubuntu/install.sh @@ -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 diff --git a/repositories/ubuntu/ovs-dpdk/.gitkeep b/repositories/ubuntu/ovs-dpdk/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/repositories/ubuntu/ovs-nsh-dpdk/.gitkeep b/repositories/ubuntu/ovs-nsh-dpdk/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/repositories/ubuntu/ovs-nsh/.gitkeep b/repositories/ubuntu/ovs-nsh/.gitkeep deleted file mode 100644 index e69de29..0000000