Merge "DIB output filename and requirements fixes"
This commit is contained in:
commit
efd6aef662
@ -21,13 +21,10 @@ function build_octavia_worker_image {
|
|||||||
TOKEN=$(openstack token issue | grep ' id ' | get_field 2)
|
TOKEN=$(openstack token issue | grep ' id ' | get_field 2)
|
||||||
die_if_not_set $LINENO TOKEN "Keystone failed to get token."
|
die_if_not_set $LINENO TOKEN "Keystone failed to get token."
|
||||||
|
|
||||||
# TODO(ptoohill): Tempfix..? -o option stopped working and it no longer saves image to working dir...
|
|
||||||
if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
|
if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
|
||||||
$OCTAVIA_DIR/diskimage-create/diskimage-create.sh -s 2
|
$OCTAVIA_DIR/diskimage-create/diskimage-create.sh -s 2 -o $OCTAVIA_AMP_IMAGE_FILE
|
||||||
# $OCTAVIA_DIR/diskimage-create/diskimage-create.sh -o $OCTAVIA_AMP_IMAGE_NAME
|
|
||||||
fi
|
fi
|
||||||
upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN
|
upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN
|
||||||
# upload_image file://${OCTAVIA_AMP_IMAGE_NAME}.qcow2 $TOKEN
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_octavia_accounts {
|
function create_octavia_accounts {
|
||||||
|
@ -106,7 +106,7 @@ while getopts "a:b:c:hi:o:t:r:s:vw:" opt; do
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
o)
|
o)
|
||||||
AMP_OUTPUTFILENAME=$OPTARG
|
AMP_OUTPUTFILENAME=$(readlink -f $OPTARG)
|
||||||
;;
|
;;
|
||||||
t)
|
t)
|
||||||
AMP_IMAGETYPE=$OPTARG
|
AMP_IMAGETYPE=$OPTARG
|
||||||
@ -153,7 +153,7 @@ AMP_CACHEDIR=${AMP_CACHEDIR:-"$HOME/.cache/image-create"}
|
|||||||
|
|
||||||
AMP_BASEOS=${AMP_BASEOS:-"ubuntu"}
|
AMP_BASEOS=${AMP_BASEOS:-"ubuntu"}
|
||||||
|
|
||||||
AMP_OUTPUTFILENAME=${AMP_OUTPUTFILENAME:-"$AMP_DIR/amphora-x64-haproxy"}
|
AMP_OUTPUTFILENAME=${AMP_OUTPUTFILENAME:-"$PWD/amphora-x64-haproxy"}
|
||||||
|
|
||||||
AMP_IMAGETYPE=${AMP_IMAGETYPE:-"qcow2"}
|
AMP_IMAGETYPE=${AMP_IMAGETYPE:-"qcow2"}
|
||||||
|
|
||||||
@ -254,18 +254,18 @@ if [ "$platform" = 'NAME="Ubuntu"' ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ "$platform" = 'NAME=Fedora' ]; then
|
elif [ "$platform" = 'NAME=Fedora' ]; then
|
||||||
PKG_LIST="qemu kpartx git"
|
PKG_LIST="qemu kpartx git python-pip"
|
||||||
for pkg in $PKG_LIST; do
|
for pkg in $PKG_LIST; do
|
||||||
if ! yum list $pkg &> /dev/null; then
|
if ! yum list installed $pkg &> /dev/null; then
|
||||||
echo "Required package " $pkg " is not installed. Exiting."
|
echo "Required package " $pkg " is not installed. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
# centos or rhel
|
# centos or rhel
|
||||||
PKG_LIST="qemu-kvm qemu-img kpartx git"
|
PKG_LIST="qemu-kvm qemu-img kpartx git python-pip"
|
||||||
for pkg in $PKG_LIST; do
|
for pkg in $PKG_LIST; do
|
||||||
if ! yum list $pkg &> /dev/null; then
|
if ! yum list installed $pkg &> /dev/null; then
|
||||||
echo "Required package " $pkg " is not installed. Exiting."
|
echo "Required package " $pkg " is not installed. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -273,7 +273,7 @@ else
|
|||||||
if [ ${platform:0:6} = "CentOS" ]; then
|
if [ ${platform:0:6} = "CentOS" ]; then
|
||||||
# install EPEL repo, in order to install argparse
|
# install EPEL repo, in order to install argparse
|
||||||
PKG_LIST="python-argparse"
|
PKG_LIST="python-argparse"
|
||||||
if ! yum list $pkg &> /dev/null; then
|
if ! yum list installed $pkg &> /dev/null; then
|
||||||
echo "CentOS requires the python-argparse package be "
|
echo "CentOS requires the python-argparse package be "
|
||||||
echo "installed separately from the EPEL repo."
|
echo "installed separately from the EPEL repo."
|
||||||
echo "Required package " $pkg " is not installed. Exiting."
|
echo "Required package " $pkg " is not installed. Exiting."
|
||||||
|
Loading…
Reference in New Issue
Block a user