summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-05-27 14:50:37 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-05-27 14:52:10 +0800
commit10894a064c73b9d06cd340bdd21c5f947ecfb349 (patch)
tree54703387d0b06d5050142af2b5c919d7683ba4a2
parent953703d2da96edcf1054bcee6a08803ce52b46ae (diff)
Fix some install issues
Change-Id: I6ad863bdb05e3ef7802395b8a4dcb737603bfb9a Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Notes
Notes (review): Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 27 May 2016 07:21:11 +0000 Reviewed-on: https://review.openstack.org/321408 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rw-r--r--deployment_scripts/install.sh17
-rw-r--r--deployment_scripts/puppet/manifests/ovs-install-compute.pp6
-rw-r--r--deployment_tasks.yaml12
-rw-r--r--environment_config.yaml8
-rw-r--r--metadata.yaml2
-rwxr-xr-xovs_build/build-ovs-dpdk.sh1
-rwxr-xr-xovs_build/build-ovs-nsh-dpdk.sh1
-rwxr-xr-xpre_build_hook15
8 files changed, 33 insertions, 29 deletions
diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh
index be01aa8..7b1171f 100644
--- a/deployment_scripts/install.sh
+++ b/deployment_scripts/install.sh
@@ -9,15 +9,30 @@ host=$1
9nsh=$2 9nsh=$2
10dpdk=$3 10dpdk=$3
11 11
12wget -r -nd -np http://$host:8080/plugins/fuel-plugin-ovs-0.9/ovs_package/ubuntu
13 12
14if [ $nsh = 'true' ] 13if [ $nsh = 'true' ]
15then 14then
15 wget -r -np -nH --cut-dirs=3 http://$host:8080/plugins/fuel-plugin-ovs-0.9/ovs-nsh/
16 dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb 16 dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb
17 dpkg -i openvswitch-common_2.5.90-1_amd64.deb 17 dpkg -i openvswitch-common_2.5.90-1_amd64.deb
18 dpkg -i openvswitch-switch_2.5.90-1_amd64.deb 18 dpkg -i openvswitch-switch_2.5.90-1_amd64.deb
19 dpkg -i python-openvswitch_2.5.90-1_all.deb
19 if [ $dpdk = 'true' ] 20 if [ $dpdk = 'true' ]
20 then 21 then
22 dpkg -i libxenstore3.0_4.4.2-0ubuntu0.14.04.5_amd64.deb
23 dpkg -i libdpdk0_2.2.0-1_amd64.deb
24 dpkg -i dpdk_2.2.0-1_amd64.deb
21 dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb 25 dpkg -i openvswitch-switch-dpdk_2.5.90-1_amd64.deb
22 fi 26 fi
27elif [ $dpdk = 'true' ]
28then
29 wget -r -np -nH --cut-dirs=3 http://$host:8080/plugins/fuel-plugin-ovs-0.9/ovs-dpdk/
30 dpkg -i libxenstore3.0_4.4.2-0ubuntu0.14.04.5_amd64.deb
31 dpkg -i libdpdk0_2.2.0-1_amd64.deb
32 dpkg -i dpdk_2.2.0-1_amd64.deb
33 dpkg -i openvswitch-datapath-dkms_2.5.1-1_all.deb
34 dpkg -i openvswitch-common_2.5.1-1_amd64.deb
35 dpkg -i openvswitch-switch_2.5.1-1_amd64.deb
36 dpkg -i python-openvswitch_2.5.1-1_all.deb
37 dpkg -i openvswitch-switch-dpdk_2.5.1-1_amd64.deb
23fi 38fi
diff --git a/deployment_scripts/puppet/manifests/ovs-install-compute.pp b/deployment_scripts/puppet/manifests/ovs-install-compute.pp
index 0d15ee1..3991454 100644
--- a/deployment_scripts/puppet/manifests/ovs-install-compute.pp
+++ b/deployment_scripts/puppet/manifests/ovs-install-compute.pp
@@ -1,10 +1,10 @@
1$fuel_settings = parseyaml(file('/etc/astute.yaml')) 1$fuel_settings = parseyaml(file('/etc/astute.yaml'))
2$master_ip = $::fuel_settings['master_ip'] 2$master_ip = $::fuel_settings['master_ip']
3$support_nsh = $::fuel_settings['fuel-plugin-ovs']['support_nsh'] 3$install_nsh = $::fuel_settings['fuel-plugin-ovs']['install_nsh']
4$support_dpdk = $::fuel_settings['fuel-plugin-ovs']['support_dpdk'] 4$install_dpdk = $::fuel_settings['fuel-plugin-ovs']['install_dpdk']
5if $operatingsystem == 'Ubuntu' { 5if $operatingsystem == 'Ubuntu' {
6 exec { 'install ovs_nsh_dpdk': 6 exec { 'install ovs_nsh_dpdk':
7 command => "curl http://${master_ip}:8080/plugins/fuel-plugin-ovs-0.9/deployment_scripts/install.sh | bash -s ${master_ip} ${support_nsh} ${support_dpdk}", 7 command => "curl http://${master_ip}:8080/plugins/fuel-plugin-ovs-0.9/deployment_scripts/install.sh | bash -s ${master_ip} ${install_nsh} ${install_dpdk}",
8 path => "/usr/bin:/usr/sbin:/bin:/sbin"; 8 path => "/usr/bin:/usr/sbin:/bin:/sbin";
9 } 9 }
10} elsif $operatingsystem == 'CentOS' { 10} elsif $operatingsystem == 'CentOS' {
diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml
index 12d9bc4..d190afb 100644
--- a/deployment_tasks.yaml
+++ b/deployment_tasks.yaml
@@ -1,17 +1,7 @@
1- id: ovs_nsh_dpdk
2 type: group
3 role: ['compute']
4 requires: [deploy_start]
5 required_for: [deploy_end]
6 tasks: [hiera, setup_repositories, fuel_pkgs, globals, tools, logging, ovs_install_compute]
7 parameters:
8 strategy:
9 type: parallel
10
11- id: ovs_install_compute 1- id: ovs_install_compute
12 type: puppet 2 type: puppet
13 version: 2.0.0 3 version: 2.0.0
14 groups: [ovs_nsh_dpdk] 4 groups: [compute]
15 required_for: [pre_deployment_end] 5 required_for: [pre_deployment_end]
16 requires: [pre_deployment_start] 6 requires: [pre_deployment_start]
17 parameters: 7 parameters:
diff --git a/environment_config.yaml b/environment_config.yaml
index 04a3fda..c4688fd 100644
--- a/environment_config.yaml
+++ b/environment_config.yaml
@@ -1,11 +1,11 @@
1attributes: 1attributes:
2 support_dpdk: 2 install_dpdk:
3 type: "checkbox" 3 type: "checkbox"
4 weight: 20 4 weight: 20
5 value: false 5 value: false
6 label: "support DPDK" 6 label: "install DPDK"
7 support_nsh: 7 install_nsh:
8 type: "checkbox" 8 type: "checkbox"
9 weight: 20 9 weight: 20
10 value: false 10 value: false
11 label: "support NSH" 11 label: "install NSH"
diff --git a/metadata.yaml b/metadata.yaml
index b8f5edf..4aad5c6 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -1,7 +1,7 @@
1# Plugin name 1# Plugin name
2name: fuel-plugin-ovs 2name: fuel-plugin-ovs
3# Human-readable name for your plugin 3# Human-readable name for your plugin
4title: Openvswitch with NSH/DPDK support 4title: Install Openvswitch with NSH/DPDK
5# Plugin version 5# Plugin version
6version: '0.9.0' 6version: '0.9.0'
7# Description 7# Description
diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh
index 0393967..8b2ac2e 100755
--- a/ovs_build/build-ovs-dpdk.sh
+++ b/ovs_build/build-ovs-dpdk.sh
@@ -43,6 +43,7 @@ dpdk (2.2.0-1) unstable; urgency=low
43EOF 43EOF
44debian/rules build; fakeroot debian/rules binary 44debian/rules build; fakeroot debian/rules binary
45cd ${BUILD_HOME}; sudo dpkg -i *.deb 45cd ${BUILD_HOME}; sudo dpkg -i *.deb
46apt-get download libxenstore3.0
46 47
47cd ${BUILD_HOME} 48cd ${BUILD_HOME}
48wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz 49wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz
diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh
index 9dcf389..53bb617 100755
--- a/ovs_build/build-ovs-nsh-dpdk.sh
+++ b/ovs_build/build-ovs-nsh-dpdk.sh
@@ -43,6 +43,7 @@ dpdk (2.2.0-1) unstable; urgency=low
43EOF 43EOF
44debian/rules build; fakeroot debian/rules binary 44debian/rules build; fakeroot debian/rules binary
45cd ${BUILD_HOME}; sudo dpkg -i *.deb 45cd ${BUILD_HOME}; sudo dpkg -i *.deb
46apt-get download libxenstore3.0
46 47
47cd ${BUILD_HOME} 48cd ${BUILD_HOME}
48wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz 49wget -c https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz
diff --git a/pre_build_hook b/pre_build_hook
index ec8efd1..d860cb8 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -8,20 +8,17 @@ DIR="$(dirname `readlink -f $0`)"
8function build_pkg { 8function build_pkg {
9 case $1 in 9 case $1 in
10 ubuntu) 10 ubuntu)
11 rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu
12
11 cd ${DIR}/ovs_build 13 cd ${DIR}/ovs_build
12 sudo docker build -t ovs_build . 14 sudo docker build -t ovs_build .
13 15
14 rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu 16 rm -rf ${DIR}/ovs-dpdk; mkdir -p ${DIR}/ovs-dpdk/; chmod 777 ${DIR}/ovs-dpdk
15 rm -rf ${DIR}/tmp/; mkdir -p ${DIR}/tmp/; chmod 777 ${DIR}/tmp 17 sudo docker run -v ${DIR}/ovs-dpdk:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh
16 sudo docker run -v ${DIR}/tmp:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh
17 cp -r ${DIR}/tmp/*.deb ${DIR}/repositories/ubuntu
18 18
19 rm -rf ${DIR}/ovs_package/ubuntu; mkdir -p ${DIR}/ovs_package/ubuntu 19 rm -rf ${DIR}/ovs-nsh; mkdir -p ${DIR}/ovs-nsh/; chmod 777 ${DIR}/ovs-nsh
20 rm -rf ${DIR}/tmp/; mkdir -p ${DIR}/tmp/; chmod 777 ${DIR}/tmp 20 sudo docker run -v ${DIR}/ovs-nsh:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
21 sudo docker run -v ${DIR}/tmp:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
22 cp -r ${DIR}/tmp/*.deb ${DIR}/ovs_package/ubuntu
23 21
24 rm -rf ${DIR}/tmp/;
25 ;; 22 ;;
26 *) echo "Not supported system"; exit 1;; 23 *) echo "Not supported system"; exit 1;;
27 esac 24 esac