Create volume in javelin config

This commit is contained in:
Dean Troyer 2012-08-31 10:04:05 -05:00
parent 1c3e85687a
commit f3f772f89e
2 changed files with 13 additions and 1 deletions

View File

@ -3,6 +3,7 @@
JPROJECT=javelin
JUSER=javelin
JPASSWORD=gungnir
JAVELIN_SECGROUP=zulu
JAVELIN_SECGROUP=angon
JAVELIN_VOLUME=assegai
JSERVER=peltast

View File

@ -118,6 +118,17 @@ if [[ -z "$FLAVOR" ]]; then
fi
# Create a Volume
# ---------------
if ! nova volume-list | grep -q $JAVELIN_VOLUME; then
nova volume-create --display_name=$JAVELIN_VOLUME 1
if ! timeout $ACTIVE_TIMEOUT sh -c "while ! nova volume-list | grep $JAVELIN_VOLUME | grep -q available; do sleep 1; done"; then
echo "$JAVELIN_VOLUME volume not created"
exit 1
fi
fi
# Create An Instance
# ------------------