2011-10-20 17:24:50 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Load local configuration
|
|
|
|
source ./stackrc
|
|
|
|
|
|
|
|
# Set api host endpoint
|
2011-10-24 20:38:52 +00:00
|
|
|
HOST_IP=${HOST_IP:-127.0.0.1}
|
2011-10-20 17:24:50 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
# uses the old deprecated terms project_id. Note that this field should now be
|
|
|
|
# set to tenant_name, not tenant_id.
|
|
|
|
export NOVA_PROJECT_ID=${TENANT:-demo}
|
|
|
|
|
|
|
|
# In addition to the owning entity (tenant), nova stores the entity performing
|
|
|
|
# the action as the **user**.
|
|
|
|
export NOVA_USERNAME=${USERNAME:-demo}
|
|
|
|
|
2011-10-20 18:37:53 +00:00
|
|
|
# With the addition of Keystone, to use an openstack cloud you should
|
|
|
|
# authenticate against keystone, which returns a **Token** and **Service
|
|
|
|
# Catalog**. The catalog contains the endpoint for all services the user/tenant
|
|
|
|
# has access to - including nova, glance, keystone, swift, ... We currently
|
|
|
|
# recommend using the 2.0 *auth api*.
|
2011-10-20 17:24:50 +00:00
|
|
|
#
|
2011-10-24 23:05:57 +00:00
|
|
|
# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
|
2011-10-22 02:05:40 +00:00
|
|
|
# will use the 1.1 *compute api*
|
2011-10-24 20:38:52 +00:00
|
|
|
export NOVA_URL=${NOVA_URL:-http://$HOST_IP:5000/v2.0/}
|
2011-10-20 17:24:50 +00:00
|
|
|
|
|
|
|
# Currently novaclient needs you to specify the *compute api* version. This
|
|
|
|
# needs to match the config of your catalog returned by Keystone.
|
2011-10-20 20:09:39 +00:00
|
|
|
export NOVA_VERSION=${NOVA_VERSION:-1.1}
|
2011-10-20 17:24:50 +00:00
|
|
|
|
|
|
|
# FIXME - why does this need to be specified?
|
2011-10-20 20:09:39 +00:00
|
|
|
export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne}
|
2011-10-20 17:24:50 +00:00
|
|
|
|
2011-10-24 23:05:57 +00:00
|
|
|
# Set the ec2 url so euca2ools works
|
|
|
|
export EC2_URL=${EC2_URL:-http://$HOST_IP:8773/services/Cloud}
|
|
|
|
|
|
|
|
# Access key is set in the initial keystone data to be the same as username
|
|
|
|
export EC2_ACCESS_KEY=${USERNAME:-demo}
|
|
|
|
|
|
|
|
# Secret key is set in the initial keystone data to the admin password
|
|
|
|
export EC2_SECRET_KEY=${ADMIN_PASSWORD:-secrete}
|
|
|
|
|
2011-10-20 17:24:50 +00:00
|
|
|
# set log level to DEBUG (helps debug issues)
|
2011-10-24 17:56:10 +00:00
|
|
|
# export NOVACLIENT_DEBUG=1
|
2011-10-24 23:05:57 +00:00
|
|
|
|
2011-11-04 14:31:37 +00:00
|
|
|
# Max time till the vm is bootable
|
|
|
|
export BOOT_TIMEOUT=${BOOT_TIMEOUT:-15}
|
|
|
|
|
|
|
|
# Max time to wait while vm goes from build to active state
|
|
|
|
export ACTIVE_TIMEOUT=${ACTIVE_TIMEOUT:-10}
|
|
|
|
|
2011-11-05 15:02:34 +00:00
|
|
|
# Max time from run instance command until it is running
|
|
|
|
export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
|
|
|
|
|
2011-11-04 14:31:37 +00:00
|
|
|
# Max time to wait for proper IP association and dis-association.
|
|
|
|
export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-10}
|