summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Naser <mnaser@vexxhost.com>2017-08-25 14:02:22 -0400
committerMohammed Naser <mnaser@vexxhost.com>2017-08-25 14:09:34 -0400
commit5b011dcbccdb01c7730acbc7d2f0c7c59757dff4 (patch)
tree300b34a263d7ea7d17dbd3950a31754efd00a57f
parentd480884c56017779c2438ce3c0ed3db6efc9bac7 (diff)
Allow control of image output format
In certain cases, it is preferable to build a different format of image such as using Ceph RBD backend which prefers a RAW image format. This option allows passing that value over to DIB in order to control the final image format. Change-Id: I851fc222b5e8a77d148c5f9d53c2688b17e6e96f
Notes
Notes (review): Code-Review+2: Luigi Toscano <ltoscano@redhat.com> Code-Review+2: Telles Mota Vidal Nóbrega <tenobreg@redhat.com> Workflow+1: Telles Mota Vidal Nóbrega <tenobreg@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 28 Aug 2017 13:30:23 +0000 Reviewed-on: https://review.openstack.org/498012 Project: openstack/sahara-image-elements Branch: refs/heads/master
-rwxr-xr-xdiskimage-create/diskimage-create.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh
index 964b0c7..01be5cb 100755
--- a/diskimage-create/diskimage-create.sh
+++ b/diskimage-create/diskimage-create.sh
@@ -36,6 +36,7 @@ usage() {
36 echo " [-r 5.1.0|5.2.0]" 36 echo " [-r 5.1.0|5.2.0]"
37 echo " [-s 1.3.1|1.6.0|2.1.0]" 37 echo " [-s 1.3.1|1.6.0|2.1.0]"
38 echo " [-t 0.9.2|1.0.1|1.1.0]" 38 echo " [-t 0.9.2|1.0.1|1.1.0]"
39 echo " [-f qcow2|raw]"
39 echo " [-d]" 40 echo " [-d]"
40 echo " [-u]" 41 echo " [-u]"
41 echo " [-j openjdk|oracle-java]" 42 echo " [-j openjdk|oracle-java]"
@@ -47,6 +48,7 @@ usage() {
47 echo " '-v' is hadoop version (default: all supported by plugin)" 48 echo " '-v' is hadoop version (default: all supported by plugin)"
48 echo " '-r' is MapR Version (default: ${DIB_DEFAULT_MAPR_VERSION})" 49 echo " '-r' is MapR Version (default: ${DIB_DEFAULT_MAPR_VERSION})"
49 echo " '-s' is Spark version (default: ${DIB_DEFAULT_SPARK_VERSION})" 50 echo " '-s' is Spark version (default: ${DIB_DEFAULT_SPARK_VERSION})"
51 echo " '-f' is the image format (default: qcow2)"
50 echo " '-d' enable debug mode, root account will have password 'hadoop'" 52 echo " '-d' enable debug mode, root account will have password 'hadoop'"
51 echo " '-u' install missing packages necessary for building" 53 echo " '-u' install missing packages necessary for building"
52 echo " '-j' is java distribution (default: openjdk)" 54 echo " '-j' is java distribution (default: openjdk)"
@@ -61,7 +63,7 @@ usage() {
61 echo 63 echo
62} 64}
63 65
64while getopts "p:i:v:dur:s:t:j:xhb" opt; do 66while getopts "p:i:v:f:dur:s:t:j:xhb" opt; do
65 case $opt in 67 case $opt in
66 p) 68 p)
67 PLUGIN=$OPTARG 69 PLUGIN=$OPTARG
@@ -84,6 +86,9 @@ while getopts "p:i:v:dur:s:t:j:xhb" opt; do
84 t) 86 t)
85 DIB_STORM_VERSION=$OPTARG 87 DIB_STORM_VERSION=$OPTARG
86 ;; 88 ;;
89 f)
90 IMAGE_FORMAT="-t $OPTARG"
91 ;;
87 u) 92 u)
88 DIB_UPDATE_REQUESTED=true 93 DIB_UPDATE_REQUESTED=true
89 ;; 94 ;;
@@ -459,7 +464,7 @@ image_create() {
459 ;; 464 ;;
460 esac 465 esac
461 466
462 disk-image-create $TRACING -o "$output" $args "$distro" $elements "$@" 467 disk-image-create $IMAGE_FORMAT $TRACING -o "$output" $args "$distro" $elements "$@"
463 468
464 # cleanup 469 # cleanup
465 case "$distro" in 470 case "$distro" in