Merge "Add RHEL 7 image element"

This commit is contained in:
Jenkins 2014-03-20 11:33:24 +00:00 committed by Gerrit Code Review
commit 94805549d8
5 changed files with 67 additions and 0 deletions

8
elements/rhel7/README.md Normal file
View File

@ -0,0 +1,8 @@
Use RHEL 7 cloud images as the baseline for built disk images.
Note: As of this writing, RHEL 7 is still in beta, so final download
locations are not available. This element defaults to using the RHEL 6.5
image, but that will need to be overridden using the appropriate DIB_*
environment variables to point at a RHEL 7 image.
For further details see the redhat-common README.

View File

@ -0,0 +1,6 @@
cache-url
dib-run-parts
redhat-common
rpm-distro
source-repositories
yum

View File

@ -0,0 +1,21 @@
#!/bin/bash
cat << EOF > /etc/yum.repos.d/rhel7.repo
[rhel7]
name=RHEL7
failovermethod=priority
baseurl=http://ftp.redhat.com/redhat/rhel/beta/7/x86_64/os/
enabled=1
metadata_expire=7d
gpgcheck=0
EOF
cat << EOF > /etc/yum.repos.d/epel.repo
[epel]
name=epel
failovermethod=priority
baseurl=http://download-i2.fedoraproject.org/pub/epel/beta/7/x86_64/
enabled=1
metadata_expire=7d
gpgcheck=0
EOF

View File

@ -0,0 +1,31 @@
#!/bin/bash
set -eu
[ -n "$ARCH" ]
[ -n "$TARGET_ROOT" ]
if [ 'amd64' = "$ARCH" ] ; then
ARCH="x86_64"
fi
DIB_LOCAL_IMAGE=${DIB_LOCAL_IMAGE:-""}
if [ -n "$DIB_LOCAL_IMAGE" ]; then
IMAGE_LOCATION=$DIB_LOCAL_IMAGE
# No need to copy a local image into the cache directory, so just specify
# the cached path as the original path.
CACHED_IMAGE=$IMAGE_LOCATION
BASE_IMAGE_FILE=`basename $DIB_LOCAL_IMAGE`
BASE_IMAGE_TAR=$BASE_IMAGE_FILE.tgz
else
DIB_RELEASE=${DIB_RELEASE:-latest}
DIB_CLOUD_IMAGES=${DIB_CLOUD_IMAGES:-http://rhn.redhat.com}
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-rhel-guest-image-6-6.5-20131115.0-1.qcow2}
BASE_IMAGE_TAR=$DIB_RELEASE-rhel-server-$ARCH-latest.tgz
IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE
CACHED_IMAGE=$DIB_IMAGE_CACHE/$BASE_IMAGE_FILE
fi
$TMP_HOOKS_PATH/bin/extract-image $BASE_IMAGE_FILE $BASE_IMAGE_TAR $IMAGE_LOCATION $CACHED_IMAGE

View File

@ -0,0 +1 @@
lsb-release file /opt/stack/lsb-release/lsb_release https://bzr.linuxfoundation.org/loggerhead/lsb/devel/si/download/head:/lsb_release-20060624065236-gakl5b7e37gwk5mg-12/lsb_release