summaryrefslogtreecommitdiffstats
path: root/build/overcloud-full.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-09-21 12:48:02 -0400
committerFeng Pan <fpan@redhat.com>2016-09-21 17:32:13 -0400
commit839cc3c0c4d625a163c238e0c08b5540e4e2e1ab (patch)
treec27210dd5abca2afb89870731b2e2ef1500364a7 /build/overcloud-full.sh
parent4523fd8c90acf923a526cae390922c1dbcd6220e (diff)
Fixes SFC OVS to be built in Apex
Our kernel version is always updated in our build, causing static kmod builds for OVS to fail. This adds OVS NSH to Apex build process. JIRA: APEX-214 Change-Id: Ib071565d71c3471c2a03345b999adcad5af1962f Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'build/overcloud-full.sh')
-rwxr-xr-xbuild/overcloud-full.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index 21667070..88f96851 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -154,5 +154,44 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--upload ../puppet-neutron/manifests/plugins/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/plugins/ml2/ \
-a overcloud-full_build.qcow2
+rm -rf ovs_nsh_patches
+rm -rf ovs
+git clone https://github.com/yyang13/ovs_nsh_patches.git
+git clone https://github.com/openvswitch/ovs.git
+pushd ovs > /dev/null
+git reset --hard 7d433ae57ebb90cd68e8fa948a096f619ac4e2d8
+cp ../ovs_nsh_patches/*.patch ./
+# Hack for build servers that have no git config
+git config user.email "apex@opnfv.com"
+git config user.name "apex"
+git am *.patch
+popd > /dev/null
+tar czf ovs.tar.gz ovs
+
+# Required packages to redirect stdin with virt-customize
+virt_pkg_str="./$libguestfs_pkg "
+wget $virt_uri_base/$libguestfs_pkg
+for package in ${virt_pkgs[@]}; do
+ wget "$virt_uri_base/$package"
+ virt_pkg_str+=" ./$package"
+done
+
+if ! sudo yum -y install ${virt_pkg_str}; then
+ if [ "$(rpm -q libguestfs)" != "$(rpm -qpf $libguestfs_pkg)" ]; then
+ echo "ERROR: Failed to update libguestfs"
+ exit 1
+ fi
+fi
+
+
+
+# BUILD NSH OVS
+LIBGUESTFS_BACKEND=direct virt-customize \
+ --upload ../build_ovs_nsh.sh:/root/ \
+ --upload ovs.tar.gz:/root/ \
+ --run-command "cd /root/ && tar xzf ovs.tar.gz" \
+ --run-command "cd /root/ovs && /root/build_ovs_nsh.sh" \
+ -a overcloud-full_build.qcow2
+
mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
popd > /dev/null