exercises: Multihost support for Glance client

floating_ips and volumes exercises both access Glance directly, but
assume it is running locally.  To better accomodate exercising a
multi-host cloud, specify glance host via GLANCE_HOST setting which
defaults to HOST_IP to maintain current single-node functionality.

Change-Id: Iad06044af031083afa477204d446ada5161ca521
This commit is contained in:
Adam Gandelman 2012-01-30 14:43:14 -08:00
parent d2be50c6e0
commit ce05e03213
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,4 @@
Adam Gandelman <adamg@canonical.com>
Andy Smith <github@anarkystic.com>
Anthony Young <sleepsonthefloor@gmail.com>
Brad Hall <brad@nicira.com>

View File

@ -70,10 +70,10 @@ nova list
nova image-list
# But we recommend using glance directly
glance -f -A $TOKEN index
glance -f -A $TOKEN -H $GLANCE_HOST index
# Grab the id of the image to launch
IMAGE=`glance -f -A $TOKEN index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
IMAGE=`glance -f -A $TOKEN -H $GLANCE_HOST index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
# Security Groups
# ---------------

View File

@ -56,10 +56,10 @@ nova list
nova image-list
# But we recommend using glance directly
glance -f -A $TOKEN index
glance -f -A $TOKEN -H $GLANCE_HOST index
# Grab the id of the image to launch
IMAGE=`glance -f -A $TOKEN index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
IMAGE=`glance -f -A $TOKEN -H $GLANCE_HOST index | egrep $DEFAULT_IMAGE_NAME | head -1 | cut -d" " -f1`
# determinine instance type
# -------------------------

4
openrc
View File

@ -8,6 +8,10 @@ source ./stackrc
HOST_IP=${HOST_IP:-127.0.0.1}
SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
# Some exercises call glance directly. On a single-node installation, Glance
# should be listening on HOST_IP. If its running elsewhere, it can be set here
GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
# Nova original used project_id as the *account* that owned resources (servers,
# ip address, ...) With the addition of Keystone we have standardized on the
# term **tenant** as the entity that owns the resources. **novaclient** still