Merge "Forces metadata on every scenario"
[apex.git] / build / overcloud-full.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 ./cache.sh
12 source ./variables.sh
13
14 populate_cache "$rdo_images_uri/overcloud-full.tar"
15
16 if [ ! -d images/ ]; then mkdir images; fi
17 tar -xf cache/overcloud-full.tar -C images/
18 mv -f images/overcloud-full.qcow2 images/overcloud-full_build.qcow2
19
20 ##########################################################
21 #####  Prep initial overcloud image with common deps #####
22 ##########################################################
23
24 pushd images > /dev/null
25
26 dpdk_pkg_str=''
27 for package in ${dpdk_rpms[@]}; do
28   curl -O "$dpdk_uri_base/$package"
29   dpdk_pkg_str+=" --upload $package:/root/dpdk_rpms"
30 done
31
32 # remove openstack-neutron-openvswitch, ain't nobody need that in OPNFV
33 # enable connection tracking for protocal sctp
34 # upload dpdk rpms but do not install
35 LIBGUESTFS_BACKEND=direct virt-customize \
36     --run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \
37     --run-command "mkdir /root/dpdk_rpms" \
38     $dpdk_pkg_str \
39     -a overcloud-full_build.qcow2
40
41 mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
42 popd > /dev/null