Forked from jpeeler/apply-containerized-controller-patches.sh
Last active
March 16, 2016 18:42
-
-
Save rthallisey/69caffe797c6155dd0b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root." 1>&2 | |
exit 1 | |
fi | |
TMPDIR=$(mktemp -d /tmp/tripleo-docker-patches.XXXXXXXXXX) || exit 1 | |
INSTACK_UNDERCLOUD_PATCHES=( | |
# Disable auto activation of all volumes - https://review.openstack.org/#/c/248174/ | |
# Merged 12/8/2015 | |
https://review.openstack.org/changes/248174/revisions/c418409557607af245c7036df587686f8203bf75/ | |
) | |
IRONIC_PATCHES=( | |
# Fix iPXE template for whole disk image - https://review.openstack.org/#/c/255362/ | |
# Merged 12/11/2015 | |
https://review.openstack.org/changes/255362/revisions/952d5c5a06f35181768e52dd660afe548bc6fa60/ | |
) | |
THT_PATCHES=( | |
# Docker compute role configured via Puppet - https://review.openstack.org/#/c/209505/ | |
# Merged 8/9/2015 - docker-rdo.yaml in puddle, docker directory missing | |
# https://review.openstack.org/changes/209505/revisions/65958395f4ff4de30ccc927df855555cbe014be2/ | |
# Change the Atomic image name so its less specific - https://review.openstack.org/#/c/243764/ | |
# Merged 11/10/2015 | |
# https://review.openstack.org/changes/243764/revisions/266d123286e91bb733102ae20f607caeead520f2/ | |
# Update docker compute environment to use json config - https://review.openstack.org/#/c/234313/ | |
# Merged 11/20/2015 | |
# https://review.openstack.org/changes/234313/revisions/3a9186d6585d13528bf904a40556242c02ba4233/ | |
# Add local docker registry support - https://review.openstack.org/#/c/237071/ | |
# Merged 11/20/2015 | |
# https://review.openstack.org/changes/237071/revisions/092bcd9283db3379cc2ccc50499e7904d9647c25/ | |
# Nova-libvirt needs to bind to /sys/fs/cgroup - https://review.openstack.org/#/c/241369/ | |
# Merged 11/20/2015 | |
# https://review.openstack.org/changes/241369/revisions/1264b1bba2b7528b00d745533768a30896e064d7/ | |
# Point registry at tripleoupstream - https://review.openstack.org/#/c/248214/ | |
# Merged 11/24/2015 | |
# https://review.openstack.org/changes/248214/revisions/0eafa814d53cb3f0ed9f2db526c7eb58aa2e2f2f/ | |
# Convert JSON generations from bash to python - https://review.openstack.org/#/c/253135/ | |
# Merged 1/4/2016 - in 3/3 puddle | |
# https://review.openstack.org/changes/253135/revisions/6380ed84d2bddc88d6fb00cbd40ab435a3e6168e/ | |
# Network Isolation support for containerized compute - https://review.openstack.org/#/c/254304/ | |
# Merged 1/5/2016 - in 3/3 puddle | |
# https://review.openstack.org/changes/254304/revisions/db16fd6b59257ea9eacbf071e9e799041822dcab/ | |
# Use new heat docker agents image - https://review.openstack.org/#/c/253515/ | |
# Merged 1/7/2016 - in 3/3 puddle | |
# https://review.openstack.org/changes/253515/revisions/6aa2330b70bb2ae278f12ea6d97636ca753106a9/ | |
# Minor fixes to allow local docker registry usage - https://review.openstack.org/#/c/280410/ | |
# Merged 2/17/16 - in 3/3 puddle | |
# https://review.openstack.org/changes/280410/revisions/7ce376ab3c98ecac851a6e672d3955d67b3bf961/ | |
# Allow container template to recognize an update - https://review.openstack.org/#/c/272212/1 | |
# Merged - 3/2 | |
https://review.openstack.org/changes/272212/revisions/5030543bbd82069004385d862c6e8e242e463bc3/ | |
# Remove hack the pulls latest docker - https://review.openstack.org/#/c/264362/ | |
# Merged only in liberty 2/26 - Patch does not belong in master | |
https://review.openstack.org/changes/258625/revisions/4f42ebf1fe4d7816f8bffac3bc9655be38cb5df1/ | |
#until puddle is rebased, this patch must be used (different from above) | |
#https://review.openstack.org/changes/256129/revisions/3258256bae3b2f14dbe528f016cca585e964c02b/ | |
# Remove DNS hack - https://review.openstack.org/#/c/284979/ | |
# Merged 3/3/16 | |
https://review.openstack.org/changes/284979/revisions/f00bc6d2ab962bce4f6bd29d1542e8a1db7b70be/ | |
# Parameterize the heat-docker-agents image - https://review.openstack.org/#/c/291237/ | |
# NOT YET MERGED | |
https://review.openstack.org/changes/291237/revisions/f0f91f48c19bb2387e3a7042cb190d4563656cb7/ | |
# Allow the containerized compute node to spawn larger VMs - https://review.openstack.org/#/c/291235/1 | |
# NOT YET MERGED | |
https://review.openstack.org/changes/291235/revisions/b1b7ca17efa44015528e444acdfe33fc34b6322e/ | |
# Remove unused Neutron Agents container - https://review.openstack.org/#/c/291236/1 | |
# NOT YET MERGED | |
https://review.openstack.org/changes/291236/revisions/71d6eaed61b030ce2dca7a39330fac8875097be6/ | |
) | |
DIB_PATCHES=( | |
# The mirror for installing epel is timing out - https://review.openstack.org/#/c/262050/ | |
# Merged 1/5/2016 | |
https://review.openstack.org/changes/262050/revisions/2b28993fb8fdfd3130e4ed2c0ab1eda65cd730b9/ | |
) | |
fail() { | |
echo $1 | |
rm -rf $TMPDIR | |
exit 1 | |
} | |
apply_patch() { | |
local patch_url=$1 | |
local patch_strip=$2 | |
local target_dir=$3 | |
# reviews.openstack.org has broken base64 support, see https://code.google.com/p/gerrit/issues/detail?id=3312 | |
#curl -s ${patch_url}/patch?download | base64 -d > ${TMPDIR}/patch_to_apply.diff | |
curl -s ${patch_url}/patch?zip > ${TMPDIR}/patch.zip | |
unzip ${TMPDIR}/patch.zip -d ${TMPDIR}/patch_to_apply | |
patch -p $patch_strip -d $target_dir < ${TMPDIR}/patch_to_apply/*.diff || fail "failed to apply patch" | |
rm -rf ${TMPDIR}/patch.zip ${TMPDIR}/patch_to_apply | |
} | |
install_prereqs() { | |
yum -y install unzip || exit 1 | |
} | |
install_prereqs | |
for p in ${THT_PATCHES[@]}; do | |
apply_patch $p 1 /usr/share/openstack-tripleo-heat-templates/ | |
done | |
#for p in ${INSTACK_UNDERCLOUD_PATCHES[@]}; do | |
# apply_patch $p 2 /usr/share/instack-undercloud/ | |
#done | |
#for p in ${IRONIC_PATCHES[@]}; do | |
# apply_patch $p 1 /usr/lib/python2.7/site-packages/ | |
#done | |
#for p in ${DIB_PATCHES[@]}; do | |
# apply_patch $p 1 /usr/share/diskimage-builder/ | |
#done | |
rm -rf $TMPDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment