Use fedorapeople for getting fedora image

It looks the official Fedora mirror is unstable right now, so we
uploaded the image to fedorapeople. This is a temprorary solution.
Once the official mirror become stable, we switch back to it.

Note: alt.fedoraproject.org seems to have a newer image and
the official mirrors (download.fedoraproject.org) do not seem to have
gotten the new image yet. So when download.fedoraproject.org
redirects (302) to a mirror the image does not exist there. We can
pull image from alt directly, but we opted for using fedorapeople as
we don't want to introduce load on alt.

Co-Authored-By: Hongbin Lu <hongbin.lu@huawei.com>

Closes-Bug: #1567124
Change-Id: I441898d846d1768b9723b293196b5339271a377e
This commit is contained in:
Davanum Srinivas 2016-04-06 08:27:12 -04:00 committed by Hongbin Lu
parent b225ccdbc5
commit 3fe5849df5
1 changed files with 10 additions and 9 deletions

View File

@ -16,15 +16,16 @@ if is_service_enabled m-api m-cond; then
# add image to glance
if [[ "$ENABLED_SERVICES" =~ 'm-api' ]]; then
# TODO Add a "latest" link to fedora release process
ATOMIC_IMAGE_NAME=$( \
wget --spider --level 1 \
--recursive --accept-regex=".*qcow2" \
"https://alt.fedoraproject.org/pub/alt/atomic/stable/Cloud-Images/x86_64/Images/" 2>&1 | \
grep qcow2 | \
sed 's/.*Cloud-Images\/x86_64\/Images\///' | \
head -n 1)
echo "Atomic Image: $ATOMIC_IMAGE_NAME"
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://download.fedoraproject.org/pub/alt/atomic/stable/Cloud-Images/x86_64/Images/$ATOMIC_IMAGE_NAME"}
# TODO(hongbin): Uncomment below when the mirror become stable
#ATOMIC_IMAGE_NAME=$( \
# wget -qO- \
# "https://download.fedoraproject.org/pub/alt/atomic/stable/Cloud-Images/x86_64/Images/" 2>&1 | \
# grep qcow2 | \
# sed 's/^.*>\(.*\)<.*$/\1/' | \
# head -n 1 )
#echo "Atomic Image: $ATOMIC_IMAGE_NAME"
#MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://download.fedoraproject.org/pub/alt/atomic/stable/Cloud-Images/x86_64/Images/$ATOMIC_IMAGE_NAME"}
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://fedorapeople.org/groups/magnum/fedora-23-atomic-20160405.qcow2"}
IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}"
fi