| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash | 
|  | 2 |  | 
|  | 3 | # Load local configuration | 
|  | 4 | source ./stackrc | 
|  | 5 |  | 
|  | 6 | # Set api host endpoint | 
| Jesse Andrews | f75d848 | 2011-10-24 13:38:52 -0700 | [diff] [blame] | 7 | HOST_IP=${HOST_IP:-127.0.0.1} | 
| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 8 |  | 
|  | 9 | # Nova original used project_id as the *account* that owned resources (servers, | 
|  | 10 | # ip address, ...)   With the addition of Keystone we have standardized on the | 
|  | 11 | # term **tenant** as the entity that owns the resources.  **novaclient** still | 
|  | 12 | # uses the old deprecated terms project_id.  Note that this field should now be | 
|  | 13 | # set to tenant_name, not tenant_id. | 
|  | 14 | export NOVA_PROJECT_ID=${TENANT:-demo} | 
|  | 15 |  | 
|  | 16 | # In addition to the owning entity (tenant), nova stores the entity performing | 
|  | 17 | # the action as the **user**. | 
|  | 18 | export NOVA_USERNAME=${USERNAME:-demo} | 
|  | 19 |  | 
|  | 20 | # With Keystone you pass the keystone password instead of an api key. | 
|  | 21 | export NOVA_API_KEY=${ADMIN_PASSWORD:-secrete} | 
|  | 22 |  | 
| Anthony Young | d4ddf3d | 2011-10-20 11:37:53 -0700 | [diff] [blame] | 23 | # With the addition of Keystone, to use an openstack cloud you should | 
|  | 24 | # authenticate against keystone, which returns a **Token** and **Service | 
|  | 25 | # Catalog**.  The catalog contains the endpoint for all services the user/tenant | 
|  | 26 | # has access to - including nova, glance, keystone, swift, ...  We currently | 
|  | 27 | # recommend using the 2.0 *auth api*. | 
| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 28 | # | 
| Vishvananda Ishaya | f56e395 | 2011-10-24 16:05:57 -0700 | [diff] [blame] | 29 | # *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0.  We | 
| Jesse Andrews | 9c85373 | 2011-10-21 19:05:40 -0700 | [diff] [blame] | 30 | # will use the 1.1 *compute api* | 
| Jesse Andrews | f75d848 | 2011-10-24 13:38:52 -0700 | [diff] [blame] | 31 | export NOVA_URL=${NOVA_URL:-http://$HOST_IP:5000/v2.0/} | 
| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 32 |  | 
|  | 33 | # Currently novaclient needs you to specify the *compute api* version.  This | 
|  | 34 | # needs to match the config of your catalog returned by Keystone. | 
| Anthony Young | d81ed03 | 2011-10-20 13:09:39 -0700 | [diff] [blame] | 35 | export NOVA_VERSION=${NOVA_VERSION:-1.1} | 
| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 36 |  | 
|  | 37 | # FIXME - why does this need to be specified? | 
| Anthony Young | d81ed03 | 2011-10-20 13:09:39 -0700 | [diff] [blame] | 38 | export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne} | 
| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 39 |  | 
| Vishvananda Ishaya | f56e395 | 2011-10-24 16:05:57 -0700 | [diff] [blame] | 40 | # Set the ec2 url so euca2ools works | 
|  | 41 | export EC2_URL=${EC2_URL:-http://$HOST_IP:8773/services/Cloud} | 
|  | 42 |  | 
|  | 43 | # Access key is set in the initial keystone data to be the same as username | 
|  | 44 | export EC2_ACCESS_KEY=${USERNAME:-demo} | 
|  | 45 |  | 
|  | 46 | # Secret key is set in the initial keystone data to the admin password | 
|  | 47 | export EC2_SECRET_KEY=${ADMIN_PASSWORD:-secrete} | 
|  | 48 |  | 
| Anthony Young | 6ab10d4 | 2011-10-20 10:24:50 -0700 | [diff] [blame] | 49 | # set log level to DEBUG (helps debug issues) | 
| Jesse Andrews | f1bfba2 | 2011-10-24 10:56:10 -0700 | [diff] [blame] | 50 | # export NOVACLIENT_DEBUG=1 | 
| Vishvananda Ishaya | f56e395 | 2011-10-24 16:05:57 -0700 | [diff] [blame] | 51 |  |