Merge "Initial centos7 support for build-image.sh"

This commit is contained in:
Jenkins 2014-10-08 21:41:19 +00:00 committed by Gerrit Code Review
commit 298f900411
2 changed files with 22 additions and 4 deletions

View File

@ -12,7 +12,7 @@ Install the dependencies:
::
sudo apt-get install kpartx qemu-utils curl
sudo apt-get install kpartx qemu-utils curl python-yaml
Install diskimage-builder:
@ -28,9 +28,15 @@ Building an image is simple, we have a script!
::
bash tools/build-image.sh
DISTRO="ubuntu" bash tools/build-image.sh
You should be left with a file called devstack-gate-precise.qcow2.
See the script for environment variables to set distribution, etc.
You should be left with a .qcow2 image file of your selected
distribution.
It is a good idea to set ``TMP_DIR`` to somewhere with plenty of space
to avoid the disappointment of a full-disk mid-way through the script
run.
Mounting the image
------------------

View File

@ -20,8 +20,20 @@ import os
import subprocess
import sys
# this is a bit weird; we want to get the filter to use on the
# devstack lib/[apt|rpm] files to pre-install them. So we have to
# swizzle things around
RELEASE=None
if 'DIB_RELEASE' in os.environ:
RELEASE=os.environ['DIB_RELEASE']
if 'DISTRO_NAME' in os.environ:
if os.environ['DISTRO_NAME'] == 'centos7':
# centos7 matches as rhel7 in devstack
RELEASE='rhel7'
if not RELEASE:
print "Can not determine RELEASE"
sys.exit(1)
RELEASE = os.environ['DIB_RELEASE']
TMP_MOUNT_PATH = os.environ['TMP_MOUNT_PATH']
TMP_HOOKS_PATH = os.environ['TMP_HOOKS_PATH']