Initial centos7 support for build-image.sh
Add some filtering to 55-cache-devsatck-repos to handle centos7, which actually gets setup with a DISTRO_NAME of rhel7 in devstack Update the readme file to highlight the options for building other images. "DISTRO=centos7 ./tools/build-image.sh" creates a workable centos7 qcow image with this change and a d-i-b that includes Ie24033468b78587ea87188ee1b843b26895798ff Change-Id: Ida38cba0a303ab77432d5d354f1952e00ebfa00e
This commit is contained in:
parent
81291bd00c
commit
f5c3bd5dad
@ -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:
|
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
|
Mounting the image
|
||||||
------------------
|
------------------
|
||||||
|
@ -20,8 +20,20 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
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']
|
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)
|
||||||
|
|
||||||
TMP_MOUNT_PATH = os.environ['TMP_MOUNT_PATH']
|
TMP_MOUNT_PATH = os.environ['TMP_MOUNT_PATH']
|
||||||
TMP_HOOKS_PATH = os.environ['TMP_HOOKS_PATH']
|
TMP_HOOKS_PATH = os.environ['TMP_HOOKS_PATH']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user