blob: 0f327d26d72523a0df76e89a0be610d06771f9c1 [file] [log] [blame]
Anthony Young6ab10d42011-10-20 10:24:50 -07001#!/usr/bin/env bash
2
3# Load local configuration
4source ./stackrc
5
Anthony Young1097c7c2011-12-27 23:22:14 -08006# Set api HOST_IP endpoint. SERVICE_HOST may also be used to specify the endpoint,
7# which is convenient for some localrc configurations.
Jesse Andrewsf75d8482011-10-24 13:38:52 -07008HOST_IP=${HOST_IP:-127.0.0.1}
Anthony Young1097c7c2011-12-27 23:22:14 -08009SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
Anthony Young6ab10d42011-10-20 10:24:50 -070010
11# Nova original used project_id as the *account* that owned resources (servers,
12# ip address, ...) With the addition of Keystone we have standardized on the
13# term **tenant** as the entity that owns the resources. **novaclient** still
14# uses the old deprecated terms project_id. Note that this field should now be
15# set to tenant_name, not tenant_id.
16export NOVA_PROJECT_ID=${TENANT:-demo}
17
18# In addition to the owning entity (tenant), nova stores the entity performing
19# the action as the **user**.
20export NOVA_USERNAME=${USERNAME:-demo}
21
22# With Keystone you pass the keystone password instead of an api key.
Jesse Andrews38df1222011-11-20 09:55:44 -080023# The most recent versions of novaclient use NOVA_PASSWORD instead of NOVA_API_KEY
24export NOVA_PASSWORD=${ADMIN_PASSWORD:-secrete}
Anthony Young6ab10d42011-10-20 10:24:50 -070025
Anthony Youngd4ddf3d2011-10-20 11:37:53 -070026# With the addition of Keystone, to use an openstack cloud you should
27# authenticate against keystone, which returns a **Token** and **Service
28# Catalog**. The catalog contains the endpoint for all services the user/tenant
29# has access to - including nova, glance, keystone, swift, ... We currently
30# recommend using the 2.0 *auth api*.
Anthony Young6ab10d42011-10-20 10:24:50 -070031#
Vishvananda Ishayaf56e3952011-10-24 16:05:57 -070032# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
Jesse Andrews9c853732011-10-21 19:05:40 -070033# will use the 1.1 *compute api*
Anthony Young1097c7c2011-12-27 23:22:14 -080034export NOVA_URL=${NOVA_URL:-http://$SERVICE_HOST:5000/v2.0/}
Anthony Young6ab10d42011-10-20 10:24:50 -070035
36# Currently novaclient needs you to specify the *compute api* version. This
37# needs to match the config of your catalog returned by Keystone.
Anthony Youngd81ed032011-10-20 13:09:39 -070038export NOVA_VERSION=${NOVA_VERSION:-1.1}
Anthony Young6ab10d42011-10-20 10:24:50 -070039
40# FIXME - why does this need to be specified?
Anthony Youngd81ed032011-10-20 13:09:39 -070041export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne}
Anthony Young6ab10d42011-10-20 10:24:50 -070042
Vishvananda Ishayaf56e3952011-10-24 16:05:57 -070043# Set the ec2 url so euca2ools works
Anthony Young1097c7c2011-12-27 23:22:14 -080044export EC2_URL=${EC2_URL:-http://$SERVICE_HOST:8773/services/Cloud}
Vishvananda Ishayaf56e3952011-10-24 16:05:57 -070045
46# Access key is set in the initial keystone data to be the same as username
47export EC2_ACCESS_KEY=${USERNAME:-demo}
48
49# Secret key is set in the initial keystone data to the admin password
50export EC2_SECRET_KEY=${ADMIN_PASSWORD:-secrete}
51
Anthony Young6ab10d42011-10-20 10:24:50 -070052# set log level to DEBUG (helps debug issues)
Jesse Andrewsf1bfba22011-10-24 10:56:10 -070053# export NOVACLIENT_DEBUG=1
Vishvananda Ishayaf56e3952011-10-24 16:05:57 -070054
Todd Willey2599b312011-11-04 10:31:37 -040055# Max time till the vm is bootable
Dean Troyer751c1522012-01-10 15:34:34 -060056export BOOT_TIMEOUT=${BOOT_TIMEOUT:-30}
Todd Willey2599b312011-11-04 10:31:37 -040057
58# Max time to wait while vm goes from build to active state
Dean Troyer751c1522012-01-10 15:34:34 -060059export ACTIVE_TIMEOUT=${ACTIVE_TIMEOUT:-30}
Todd Willey2599b312011-11-04 10:31:37 -040060
Todd Willey9a3066f2011-11-05 11:02:34 -040061# Max time from run instance command until it is running
62export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
63
Todd Willey2599b312011-11-04 10:31:37 -040064# Max time to wait for proper IP association and dis-association.
Dean Troyer751c1522012-01-10 15:34:34 -060065export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-15}