2 ##############################################################################
3 # Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others.
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 ##############################################################################
14 populate_cache "$rdo_images_uri/overcloud-full.tar"
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
20 ##########################################################
21 ##### Prep initial overcloud image with common deps #####
22 ##########################################################
24 pushd images > /dev/null
25 # Update puppet-aodh it's old
27 git clone https://github.com/openstack/puppet-aodh aodh
28 pushd aodh > /dev/null
29 git checkout stable/liberty
31 tar -czf puppet-aodh.tar.gz aodh
33 # grab latest puppet-neutron module
35 git clone -b stable/liberty https://github.com/openstack/puppet-neutron.git
37 git archive --format=tar.gz --prefix=neutron/ HEAD > ../puppet-neutron.tar.gz
41 # Add epel to install ceph
43 # puppet-neutron-force-metadata.patch
44 # puppet-cinder-quota-fix
46 AODH_PKG="openstack-aodh-api,openstack-aodh-common,openstack-aodh-compat,openstack-aodh-evaluator,openstack-aodh-expirer"
47 AODH_PKG+=",openstack-aodh-listener,openstack-aodh-notifier"
48 LIBGUESTFS_BACKEND=direct virt-customize \
49 --upload puppet-aodh.tar.gz:/etc/puppet/modules/ \
50 --run-command "cd /etc/puppet/modules/ && rm -rf aodh && tar xzf puppet-aodh.tar.gz" \
51 --run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \
52 --install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
53 --install "$AODH_PKG,ceph" \
54 --run-command "rm -rf /etc/puppet/modules/neutron" \
55 --upload puppet-neutron.tar.gz:/etc/puppet/modules/ \
56 --run-command "cd /etc/puppet/modules/ && tar xzf puppet-neutron.tar.gz" \
57 --upload ../puppet-cinder-quota-fix.patch:/tmp \
58 --run-command "cd /etc/puppet/modules/cinder && patch -Np1 < /tmp/puppet-cinder-quota-fix.patch" \
59 --upload ../aodh-puppet-tripleo.patch:/tmp \
60 --run-command "cd /etc/puppet/modules/tripleo && patch -Np1 < /tmp/aodh-puppet-tripleo.patch" \
61 -a overcloud-full_build.qcow2
63 mv -f overcloud-full_build.qcow2 overcloud-full.qcow2