From c443e808fed8e21cdc667bef05383bd776c3dfda Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Fri, 21 Mar 2014 20:42:20 +1000 Subject: [PATCH] Enable the download-cedarish to make solum easier to get started This makes the install instructions easier. Change-Id: Ia6ef0c6174e6e639268937d56e2996f59cece92b --- contrib/lp-cedarish/vm-slug/download-cedarish | 24 ++++++++++--------- contrib/lp-cedarish/vm-slug/prepare | 6 ++--- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/contrib/lp-cedarish/vm-slug/download-cedarish b/contrib/lp-cedarish/vm-slug/download-cedarish index c16b6f1a4..04bf442e0 100755 --- a/contrib/lp-cedarish/vm-slug/download-cedarish +++ b/contrib/lp-cedarish/vm-slug/download-cedarish @@ -11,6 +11,8 @@ if [ $? != 0 ]; then exit 1 fi +sudo mkdir -p /opt/solum/cedarish +sudo chown $USER /opt/solum/cedarish IMAGE_DIR=/opt/solum/cedarish/image mkdir -p $IMAGE_DIR @@ -30,14 +32,14 @@ fi echo image: $IMAGE_DIR/cedarish.qcow2 -#glance image-list 2> /dev/null > /dev/null -#if [[ $? == 0 ]]; then -# echo it would appear I know how to talk to glance -# echo therefore I will attempt to upload your image -# glance image-delete cedarish -# glance image-create --name cedarish --disk-format qcow2 --container-format bare --file $IMAGE_DIR/cedarish.qcow2 -#else -# echo I cannot talk to glance your image is here: $IMAGE_DIR/$ID.qcow2 -# echo Try this: glance image-create --name cedarish --disk-format qcow2 --container-format bare --file $IMAGE_DIR/cedarish.qcow2 -# exit 1 -#fi +glance image-list 2> /dev/null > /dev/null +if [[ $? == 0 ]]; then + echo it would appear I know how to talk to glance + echo therefore I will attempt to upload your image + glance image-delete cedarish + glance image-create --name cedarish --disk-format qcow2 --container-format bare --file $IMAGE_DIR/cedarish.qcow2 +else + echo I cannot talk to glance your image is here: $IMAGE_DIR/$ID.qcow2 + echo Try this: glance image-create --name cedarish --disk-format qcow2 --container-format bare --file $IMAGE_DIR/cedarish.qcow2 + exit 1 +fi diff --git a/contrib/lp-cedarish/vm-slug/prepare b/contrib/lp-cedarish/vm-slug/prepare index dc7c9e8db..cee305f2f 100755 --- a/contrib/lp-cedarish/vm-slug/prepare +++ b/contrib/lp-cedarish/vm-slug/prepare @@ -3,9 +3,9 @@ DIR=$(dirname $0) # uncomment this if we want to auto build/download cedarish vm -#ACTION=$1 -#shift -#: ${ACTION:='download-cedarish'} +ACTION=$1 +shift +#${ACTION:='download-cedarish'} # great security practice in 3 ... 2 ... 1 ... # install docker