summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-10-05 19:13:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-10-05 19:13:23 +0000
commitf941e233e575821695dc876c9a7a9f6c31e6dd00 (patch)
tree8a09882f1d086d65b86d6c5a7a02474380cd66b4
parent4c8141069f9adf7d315bc53c236d8e7928030def (diff)
parent0220094bfe4abdc964f282f4f01190897e3065e4 (diff)
Merge "Increase memory size for virt-customize"
-rwxr-xr-xbuild/barometer-install.sh9
-rwxr-xr-xbuild/overcloud-full.sh6
-rwxr-xr-xbuild/overcloud-onos.sh4
-rwxr-xr-xbuild/overcloud-opendaylight.sh4
-rwxr-xr-xbuild/undercloud.sh2
-rw-r--r--build/variables.sh5
6 files changed, 17 insertions, 13 deletions
diff --git a/build/barometer-install.sh b/build/barometer-install.sh
index bde7479e..15753a44 100755
--- a/build/barometer-install.sh
+++ b/build/barometer-install.sh
@@ -17,6 +17,7 @@
# Get and install packages needed for Barometer service.
# These are: collectd rpm's and dependencies, collectd-openstack-plugins,
# puppet-barometer module.
+source ./variables.sh
# Versions/branches
COLLECTD_OPENSTACK_PLUGINS_BRANCH="stable/pike"
@@ -101,7 +102,7 @@ function barometer_pkgs {
# Upload tar files to image
# untar collectd packages
# install dependencies
- LIBGUESTFS_BACKEND=direct virt-customize \
+ LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--upload ${BUILD_DIR}/collectd.tar.gz:/opt/ \
--upload ${BUILD_DIR}/collectd-openstack-plugins.tar.gz:/opt/ \
--upload ${BUILD_DIR}/puppet-barometer.tar.gz:/etc/puppet/modules/ \
@@ -111,12 +112,12 @@ function barometer_pkgs {
--install libvirt,libvirt-devel,gcc \
-a $OVERCLOUD_IMAGE
- LIBGUESTFS_BACKEND=direct virt-customize \
+ LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command 'python3.4 /opt/get-pip.py' \
--run-command 'pip3 install requests libvirt-python pbr babel future six' \
-a $OVERCLOUD_IMAGE
- LIBGUESTFS_BACKEND=direct virt-customize \
+ LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command "yum install -y \
/opt/libcollectdclient-${SUFFIX} \
/opt/libcollectdclient-devel-${SUFFIX} \
@@ -136,7 +137,7 @@ function barometer_pkgs {
# install collectd-openstack-plugins
# install puppet-barometer module
# make directories for config files and mibs
- LIBGUESTFS_BACKEND=direct virt-customize \
+ LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command 'mkdir /opt/stack/collectd-openstack' \
--run-command "tar xfz /opt/collectd-openstack-plugins.tar.gz -C /opt/stack/collectd-openstack" \
--run-command "cd /etc/puppet/modules/ && mkdir barometer && \
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index dea70f54..ac412d90 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -48,7 +48,7 @@ qemu-img resize overcloud-full_build.qcow2 +1500M
# installing forked apex-puppet-tripleo
# upload neutron port data plane status
# REMOVE Tacker VNFFG patch when moving to Pike
-LIBGUESTFS_BACKEND=direct virt-customize \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command "xfs_growfs /dev/sda" \
--upload ${BUILD_DIR}/apex-puppet-tripleo.tar.gz:/etc/puppet/modules \
--run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf apex-puppet-tripleo.tar.gz" \
@@ -82,7 +82,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
# apply congress parallel execution patch
# Requirements from Doctor project
# TODO(cgoncalves): code merged in Pike dev cycle. drop from >= OpenStack Pike / > OPNFV Euphrates
-LIBGUESTFS_BACKEND=direct virt-customize \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_lib_dps.patch " \
--run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_server_dps.patch" \
--run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_openstacksdk_dps.patch" \
@@ -141,7 +141,7 @@ populate_cache $kvmfornfv_uri_base/$kvmfornfv_kernel_rpm
# upload puppet fdio
# git clone vsperf into the overcloud image
# upload the rt_kvm kernel
-LIBGUESTFS_BACKEND=direct virt-customize \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command "mkdir /root/dpdk_rpms" \
$dpdk_pkg_str \
--upload ${BUILD_DIR}/puppet-fdio.tar.gz:/etc/puppet/modules \
diff --git a/build/overcloud-onos.sh b/build/overcloud-onos.sh
index c64c19b3..6af4118b 100755
--- a/build/overcloud-onos.sh
+++ b/build/overcloud-onos.sh
@@ -23,7 +23,7 @@ rm -rf puppet-onos
populate_cache "$onos_release_uri/$onos_release_file" "$(curl https://downloads.onosproject.org/nightly/ | grep $onos_release_file | grep -o -e '[0-9a-f]\{32\}')"
populate_cache "$onos_jdk_uri/jdk-8u51-linux-x64.tar.gz"
-LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/${onos_release_file}:/opt/ \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE --upload ${CACHE_DIR}/${onos_release_file}:/opt/ \
--run-command "mkdir /opt/onos && cd /opt/ && tar -xzf $onos_release_file -C /opt/onos --strip-components=1" \
-a overcloud-full-onos_build.qcow2
@@ -31,7 +31,7 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/${onos_release_fi
git clone https://github.com/bobzhouHW/puppet-onos.git
tar --xform="s:puppet-onos/:onos/:" -czf puppet-onos.tar.gz puppet-onos
-LIBGUESTFS_BACKEND=direct virt-customize --upload ${CACHE_DIR}/jdk-8u51-linux-x64.tar.gz:/opt/ \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE --upload ${CACHE_DIR}/jdk-8u51-linux-x64.tar.gz:/opt/ \
--upload ${BUILD_DIR}/puppet-onos/files/install_jdk8.tar:/opt/ \
--run-command "cd /opt/ && tar -xf install_jdk8.tar && sh /opt/install_jdk8/install_jdk8.sh" \
--upload ${BUILD_DIR}/puppet-onos/files/networking-onos.tar:/opt/ \
diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh
index 22a539af..ed3f539e 100755
--- a/build/overcloud-opendaylight.sh
+++ b/build/overcloud-opendaylight.sh
@@ -71,7 +71,7 @@ populate_cache http://artifacts.opnfv.org/apex/danube/fdio_netvirt/opendaylight-
# Patch in OPNFV custom puppet-tripleO
# install quagga/zrpc
# upload neutron patch for generic NS linux interface driver + OVS for external networks
-LIBGUESTFS_BACKEND=direct virt-customize \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--upload ${BUILD_DIR}/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \
--run-command "mkdir -p /root/master" \
--run-command "yumdownloader --destdir=/root/master opendaylight" \
@@ -101,7 +101,7 @@ if [ "$(uname -i)" == 'x86_64' ]; then
# Download quagga/zrpc rpms
populate_cache http://artifacts.opnfv.org/apex/danube/quagga/quagga-3.tar.gz
-LIBGUESTFS_BACKEND=direct virt-customize \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--install zeromq-4.1.4 \
--upload ${CACHE_DIR}/quagga-3.tar.gz:/root/ \
--run-command "cd /root/ && tar xzf quagga-3.tar.gz" \
diff --git a/build/undercloud.sh b/build/undercloud.sh
index baaf424e..98f20e82 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -34,7 +34,7 @@ populate_cache $calipso_uri_base/$calipso_script
# enabling ceph OSDs to live on the controller
# seeding configuration files specific to OPNFV
# Add performance image scripts
-LIBGUESTFS_BACKEND=direct virt-customize \
+LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
--run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \
--run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \
--upload ${BUILD_DIR}/apex-tripleo-heat-templates.tar.gz:/usr/share \
diff --git a/build/variables.sh b/build/variables.sh
index b0713268..93c71957 100644
--- a/build/variables.sh
+++ b/build/variables.sh
@@ -16,6 +16,9 @@ CACHE_HISTORY=".cache_history"
PATCHES_DIR="${BUILD_ROOT}/patches"
BUILD_UTILS="$(dirname ${BUILD_ROOT})/apex/build_utils.py"
+# Run virt-customize commands with a guest memory of 4G to avoid
+# oom issues on some of the larger build steps
+VIRT_CUSTOMIZE="virt-customize -m 4096"
rdo_images_uri=${RDO_IMAGES_URI:-http://artifacts.opnfv.org/apex/euphrates/rdo}
@@ -53,4 +56,4 @@ nosdn_vpp_rpms=(
'https://nexus.fd.io/content/repositories/fd.io.centos7/io/fd/vpp/vpp-api-python/17.07.01-release.x86_64/vpp-api-python-17.07.01-release.x86_64.rpm'
'https://nexus.fd.io/content/repositories/fd.io.centos7/io/fd/vpp/vpp-lib/17.07.01-release.x86_64/vpp-lib-17.07.01-release.x86_64.rpm'
'https://nexus.fd.io/content/repositories/fd.io.centos7/io/fd/vpp/vpp-plugins/17.07.01-release.x86_64/vpp-plugins-17.07.01-release.x86_64.rpm'
-) \ No newline at end of file
+)