summaryrefslogtreecommitdiffstats
path: root/build/undercloud.sh
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-03-03 18:06:16 -0500
committerTim Rozet <trozet@redhat.com>2016-04-20 12:18:21 +0000
commit348ee6a04f9a6a2792c947928f7243c406845004 (patch)
treedfac5bd769d65cf3e626623b3adbb94088e4e24e /build/undercloud.sh
parentaa3bb02b50fe29226bc228790a6aaa1f0fb15db2 (diff)
Deploy ceph OSDs on the compute nodes too
- Also fixing the github PR json parsing opnfv-tht-pr: 7 JIRA: APEX-89 Change-Id: I5c27209ed006309285bd24d77cc2392513325116 Signed-off-by: Dan Radez <dradez@redhat.com> Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'build/undercloud.sh')
-rwxr-xr-xbuild/undercloud.sh33
1 files changed, 17 insertions, 16 deletions
diff --git a/build/undercloud.sh b/build/undercloud.sh
index 3ac46e0f..65462ec8 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -18,18 +18,6 @@ cp -f cache/undercloud.qcow2 images/
#Adding OpenStack packages to undercloud
pushd images > /dev/null
-# install the packages above and enabling ceph to live on the controller
-# OpenWSMan package update supports the AMT Ironic driver for the TealBox
-LIBGUESTFS_BACKEND=direct virt-customize \
- --run-command "sed -i '/ControllerEnableCephStorage/c\\ ControllerEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \
- --run-command "sed -i '/ \$enable_ceph = /c\\ \$enable_ceph = true' /usr/share/openstack-tripleo-heat-templates/puppet/manifests/overcloud_controller_pacemaker.pp" \
- --run-command "sed -i '/ \$enable_ceph = /c\\ \$enable_ceph = true' /usr/share/openstack-tripleo-heat-templates/puppet/manifests/overcloud_controller.pp" \
- --run-command "curl http://download.opensuse.org/repositories/Openwsman/CentOS_CentOS-7/Openwsman.repo > /etc/yum.repos.d/wsman.repo" \
- --run-command "yum update -y openwsman*" \
- --run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \
- --upload ../opnfv-environment.yaml:/home/stack/ \
- -a undercloud.qcow2
-
# Use apex tripleo-heat-templates fork
PR_NUMBER=""
REF="stable/colorado"
@@ -51,10 +39,12 @@ if [ "$PR_NUMBER" != "" ]; then
PR=$(curl $GHCREDS https://api.github.com/repos/trozet/opnfv-tht/pulls/$PR_NUMBER)
# Do not pull from merged branches
- MERGED=$(echo $PR | python -c "import sys,json; print json.load(sys.stdin)['head']['merged']")
- if [ "$MERGED" == false ]; then
- REF=$(echo $PR | python -c "import sys,json; print json.load(sys.stdin)['head']['ref']")
- REPO=$(echo $PR | python -c "import sys,json; print json.load(sys.stdin)['head']['repo']['git_url']")
+ 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']['git_url']")
+ echo "Setting GitHub URL to: $REPO"
fi
fi
@@ -68,5 +58,16 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload opnfv-tht.tar.gz:/usr/share \
--run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf opnfv-tht.tar.gz" \
-a undercloud.qcow2
+# install the packages above and enabling ceph to live on the controller
+# OpenWSMan package update supports the AMT Ironic driver for the TealBox
+LIBGUESTFS_BACKEND=direct virt-customize \
+ --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 "curl http://download.opensuse.org/repositories/Openwsman/CentOS_CentOS-7/Openwsman.repo > /etc/yum.repos.d/wsman.repo" \
+ --run-command "yum update -y openwsman*" \
+ --run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \
+ --upload ../opnfv-environment.yaml:/home/stack/ \
+ -a undercloud.qcow2
+
popd > /dev/null