Add ability to set DIB_IMAGE_SIZE parameter for CentOS images
Change-Id: Icdc8a92558fc5df84d040172ef97441db7942526 Partial-bug: #1304100
This commit is contained in:
parent
d87fa27722
commit
d822dc4318
|
@ -46,6 +46,17 @@ For Spark you can create only ubuntu image with one hadoop version. You shouldn'
|
|||
For HDP you can create only centos image with hadoop 1.3.0 or 2.0 and without hadoop ('plain' image). You shouldn't specify image type.
|
||||
For IDH you can create only centos image with one hadoop version. You shouldn't specify image type and hadoop version.
|
||||
|
||||
NOTE for CentOS images (for vanilla, hdp and idh plugins):
|
||||
|
||||
Resizing disk space during firstboot on that images fails with errors (https://bugs.launchpad.net/sahara/+bug/1304100). So, you will get an instance that will have a small available disk space. To solve this problem we build images with 10G available disk space as default. If you need in more available disk space you should export parameter DIB_IMAGE_SIZE:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
sudo DIB_IMAGE_SIZE=40 bash sahara-image-elements/diskimage-create/diskimage-create.sh -i centos
|
||||
|
||||
For all another images parameter DIB_IMAGE_SIZE will be unset.
|
||||
|
||||
|
||||
For developers:
|
||||
|
||||
1. If you want to add your element to this repository, you should edit this script in your commit (you should export variables for your element and add name of element to variables 'element_sequence').
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
set -e
|
||||
|
||||
export IMAGE_SIZE=$DIB_IMAGE_SIZE
|
||||
# This will unset parameter DIB_IMAGE_SIZE for Ubuntu and Fedora vanilla images
|
||||
unset DIB_IMAGE_SIZE
|
||||
|
||||
# default debug setting should be false
|
||||
IMAGE_GENERATION_DEBUG_MODE="false"
|
||||
|
||||
|
@ -209,7 +213,7 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "vanilla" ]; then
|
|||
# - Export link and filename for CentOS cloud image to download
|
||||
# - Patameter 'DIB_IMAGE_SIZE' should be specified for CentOS only
|
||||
if [ -z "$IMAGE_TYPE" -o "$IMAGE_TYPE" = "centos" ]; then
|
||||
export DIB_IMAGE_SIZE="10"
|
||||
export DIB_IMAGE_SIZE=${IMAGE_SIZE:-"10"}
|
||||
# Read Create_CentOS_cloud_image.rst to know how to create CentOS image in qcow2 format
|
||||
export BASE_IMAGE_FILE="CentOS-6.5-cloud-init.qcow2"
|
||||
export DIB_CLOUD_IMAGES="http://sahara-files.mirantis.com"
|
||||
|
@ -237,6 +241,7 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "spark" ]; then
|
|||
# Ignoring image type and hadoop version options
|
||||
echo "For spark plugin options -i and -v are ignored"
|
||||
|
||||
unset DIB_IMAGE_SIZE
|
||||
export DIB_HADOOP_VERSION="2.0.0-mr1-cdh4.5.0"
|
||||
export ubuntu_image_name=${ubuntu_spark_image_name:-"ubuntu_sahara_spark_latest"}
|
||||
|
||||
|
@ -261,8 +266,8 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "hdp" ]; then
|
|||
|
||||
# Generate HDP images
|
||||
|
||||
# Parameter 'DIB_IMAGE_SIZE' should be specified for Fedora and CentOS
|
||||
export DIB_IMAGE_SIZE="10"
|
||||
# Parameter 'DIB_IMAGE_SIZE' should be specified for CentOS only
|
||||
export DIB_IMAGE_SIZE=${IMAGE_SIZE:-"10"}
|
||||
|
||||
# CentOS cloud image:
|
||||
# - Disable including 'base' element for CentOS
|
||||
|
@ -330,7 +335,7 @@ if [ -z "$PLUGIN" -o "$PLUGIN" = "idh" ]; then
|
|||
# Ignoring image type and hadoop version options
|
||||
echo "For idh plugin option -i is ignored"
|
||||
|
||||
export DIB_IMAGE_SIZE="10"
|
||||
export DIB_IMAGE_SIZE=${IMAGE_SIZE:-"10"}
|
||||
export BASE_IMAGE_FILE="CentOS-6.4-cloud-init.qcow2"
|
||||
export DIB_CLOUD_IMAGES="http://sahara-files.mirantis.com"
|
||||
|
||||
|
|
Loading…
Reference in New Issue