Adding developer/troubleshooting section to Installation Instructions
[apex.git] / build / overcloud-opendaylight-sfc.sh
1 #!/bin/sh
2 ##############################################################################
3 # Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 set -e
11 source ./variables.sh
12 pushd images > /dev/null
13
14 ################################################
15 #####    Adding SFC+OpenDaylight overcloud #####
16 ################################################
17
18 #copy opendaylight overcloud full to odl-sfc
19 cp -f overcloud-full-opendaylight.qcow2 overcloud-full-opendaylight-sfc_build.qcow2
20
21 # upgrade ovs into ovs 2.5.90 with NSH function
22 if ! [[ -f "$ovs_rpm_name"  &&  -f "$ovs_kmod_rpm_name" ]]; then
23   curl -L -O ${onos_ovs_uri}/${onos_ovs_pkg}
24   tar -xzf ${onos_ovs_pkg}
25 fi
26
27 LIBGUESTFS_BACKEND=direct virt-customize --upload ${ovs_kmod_rpm_name}:/root/ \
28                                          --run-command "yum install -y /root/${ovs_kmod_rpm_name}" \
29                                          --upload ${ovs_rpm_name}:/root/ \
30                                          --run-command "yum upgrade -y /root/${ovs_rpm_name}" \
31                                          -a overcloud-full-opendaylight-sfc_build.qcow2
32
33 mv overcloud-full-opendaylight-sfc_build.qcow2 overcloud-full-opendaylight-sfc.qcow2
34 popd > /dev/null