summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/functions.sh46
-rwxr-xr-xbuild/overcloud-full.sh23
-rwxr-xr-xbuild/undercloud.sh15
-rw-r--r--build/variables.sh2
4 files changed, 20 insertions, 66 deletions
diff --git a/build/functions.sh b/build/functions.sh
deleted file mode 100644
index becc0df1..00000000
--- a/build/functions.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 Dan Radez (Red Hat) and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-clone_fork () {
- # ARG 1: opnfv-tht or opnfv-puppet-tripleo
- echo "Cloning $1"
-
- # Use apex tripleo-heat-templates fork
- local ghcreds=""
- local pr_num=""
- local ref="stable/euphrates"
- local repo="https://github.com/trozet/$1"
-
- if git log -1 | grep "${1}-pr:" | grep -o '[0-9]*'; then
- pr_num=$(git log -1 | grep "${1}-pr:" | grep -o '[0-9]*')
- fi
-
- if [ "$pr_num" != "" ]; then
- echo "Using pull request $pr_num from $repo"
- # Source credentials since we are rate limited to 60/day
- if [ -f ~/.githubcreds ]; then
- source ~/.githubcreds
- ghcreds=" -u $GHUSERNAME:$GHACCESSTOKEN"
- fi
-
- PR=$(curl $ghcreds https://api.github.com/repos/trozet/$1/pulls/$pr_num)
-
- # Do not pull from merged branches
- MERGED=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['merged']")
- if [ "$MERGED" == "False" ]; then
- ref=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['ref']")
- echo "Setting GitHub Ref to: $REF"
- repo=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['repo']['clone_url']")
- echo "Setting GitHub URL to: $repo"
- fi
- fi
-
- rm -rf $1
- git clone $repo -b $ref $1
-}
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index adcf4df6..0f7318a6 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -10,7 +10,6 @@
set -xe
source ./cache.sh
source ./variables.sh
-source ./functions.sh
populate_cache "$rdo_images_uri/overcloud-full.tar"
@@ -25,15 +24,15 @@ mv -f ${BUILD_DIR}/overcloud-full.qcow2 ${BUILD_DIR}/overcloud-full_build.qcow2
pushd ${BUILD_DIR} > /dev/null
# prep opnfv-puppet-tripleo for undercloud
-clone_fork opnfv-puppet-tripleo
-pushd opnfv-puppet-tripleo > /dev/null
-git archive --format=tar.gz --prefix=tripleo/ HEAD > ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz
+python3 -B $BUILD_UTILS clone-fork -r apex-puppet-tripleo
+pushd apex-puppet-tripleo > /dev/null
+git archive --format=tar.gz --prefix=tripleo/ HEAD > ${BUILD_DIR}/apex-puppet-tripleo.tar.gz
popd > /dev/null
# download customized os-net-config
-clone_fork os-net-config
-pushd os-net-config/os_net_config > /dev/null
-git archive --format=tar.gz --prefix=os_net_config/ HEAD > ${BUILD_DIR}/os-net-config.tar.gz
+python3 -B $BUILD_UTILS clone-fork -r apex-os-net-config
+pushd apex-os-net-config/os_net_config > /dev/null
+git archive --format=tar.gz --prefix=os_net_config/ HEAD > ${BUILD_DIR}/apex-os-net-config.tar.gz
popd > /dev/null
dpdk_pkg_str=''
@@ -77,7 +76,7 @@ done
qemu-img resize overcloud-full_build.qcow2 +900MB
# expand file system to max disk size
-# installing forked opnfv-puppet-tripleo
+# installing forked apex-puppet-tripleo
# upload dpdk rpms but do not install
# install fd.io yum repo and packages
# upload puppet fdio
@@ -85,10 +84,10 @@ qemu-img resize overcloud-full_build.qcow2 +900MB
# upload the rt_kvm kernel
LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "xfs_growfs /dev/sda" \
- --upload ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \
- --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \
- --upload ${BUILD_DIR}/os-net-config.tar.gz:/usr/lib/python2.7/site-packages \
- --run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf os-net-config.tar.gz" \
+ --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" \
+ --upload ${BUILD_DIR}/apex-os-net-config.tar.gz:/usr/lib/python2.7/site-packages \
+ --run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf apex-os-net-config.tar.gz" \
--run-command "if ! rpm -qa | grep python-redis; then yum install -y python-redis; fi" \
--run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \
--run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \
diff --git a/build/undercloud.sh b/build/undercloud.sh
index 8d82bcac..0e1a2e35 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -10,7 +10,6 @@
set -xe
source ./cache.sh
source ./variables.sh
-source ./functions.sh
populate_cache "$rdo_images_uri/undercloud.qcow2"
if [ ! -d "$BUILD_DIR" ]; then mkdir ${BUILD_DIR}; fi
@@ -18,27 +17,27 @@ cp -f ${CACHE_DIR}/undercloud.qcow2 ${BUILD_DIR}/undercloud_build.qcow2
pushd ${BUILD_DIR} > /dev/null
-# prep opnfv-tht for undercloud
-clone_fork opnfv-tht
-pushd opnfv-tht > /dev/null
-git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > ${BUILD_DIR}/opnfv-tht.tar.gz
+# prep apex-tht for undercloud
+python3 -B $BUILD_UTILS clone-fork -r apex-tripleo-heat-templates
+pushd apex-tripleo-heat-templates > /dev/null
+git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > ${BUILD_DIR}/apex-tripleo-heat-templates.tar.gz
popd > /dev/null
# inject rt_kvm kernel rpm name into the enable file
sed "s/kvmfornfv_kernel.rpm/$kvmfornfv_kernel_rpm/" ${BUILD_ROOT}/enable_rt_kvm.yaml | tee ${BUILD_DIR}/enable_rt_kvm.yaml
# Turn off GSSAPI Auth in sshd
-# installing forked opnfv-tht
+# installing forked apex-tht
# enabling ceph OSDs to live on the controller
# seeding configuration files specific to OPNFV
# Add performance image scripts
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}/opnfv-tht.tar.gz:/usr/share \
+ --upload ${BUILD_DIR}/apex-tripleo-heat-templates.tar.gz:/usr/share \
--install "openstack-utils" \
--install "ceph-common" \
- --run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf opnfv-tht.tar.gz" \
+ --run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf apex-tripleo-heat-templates.tar.gz" \
--run-command "sed -i '/ControllerEnableCephStorage/c\\ ControllerEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \
--run-command "sed -i '/ComputeEnableCephStorage/c\\ ComputeEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \
--run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \
diff --git a/build/variables.sh b/build/variables.sh
index 41d86e92..145b582f 100644
--- a/build/variables.sh
+++ b/build/variables.sh
@@ -14,6 +14,8 @@ QUAGGA_RPMS_DIR=${BUILD_DIR}/quagga_build_dir
CACHE_DIR="$(dirname ${BUILD_ROOT})/.cache"
CACHE_HISTORY=".cache_history"
PATCHES_DIR="${BUILD_ROOT}/patches"
+BUILD_UTILS="$(dirname ${BUILD_ROOT})/lib/python/build_utils.py"
+
rdo_images_uri=${RDO_IMAGES_URI:-https://images.rdoproject.org/ocata/delorean/current-tripleo/stable/}