... | ... |
@@ -19,44 +19,8 @@ set -o xtrace |
19 | 19 |
# Settings |
20 | 20 |
# ======== |
21 | 21 |
|
22 |
-# Use stackrc and localrc for settings |
|
23 |
-source ./stackrc |
|
24 |
- |
|
25 |
-HOST=${HOST:-localhost} |
|
26 |
- |
|
27 |
-# Nova original used project_id as the *account* that owned resources (servers, |
|
28 |
-# ip address, ...) With the addition of Keystone we have standardized on the |
|
29 |
-# term **tenant** as the entity that owns the resources. **novaclient** still |
|
30 |
-# uses the old deprecated terms project_id. Note that this field should now be |
|
31 |
-# set to tenant_name, not tenant_id. |
|
32 |
-export NOVA_PROJECT_ID=${TENANT:-demo} |
|
33 |
- |
|
34 |
-# In addition to the owning entity (tenant), nova stores the entity performing |
|
35 |
-# the action as the **user**. |
|
36 |
-export NOVA_USERNAME=${USERNAME:-demo} |
|
37 |
- |
|
38 |
-# With Keystone you pass the keystone password instead of an api key. |
|
39 |
-export NOVA_API_KEY=${ADMIN_PASSWORD:-secrete} |
|
40 |
- |
|
41 |
-# With the addition of Keystone, to use an openstack cloud you should |
|
42 |
-# authenticate against keystone, which returns a **Token** and **Service |
|
43 |
-# Catalog**. The catalog contains the endpoint for all services the user/tenant |
|
44 |
-# has access to - including nova, glance, keystone, swift, ... We currently |
|
45 |
-# recommend using the 2.0 *auth api*. |
|
46 |
-# |
|
47 |
-# *NOTE*: Using the 2.0 *auth api* does mean that compute api is 2.0. We will |
|
48 |
-# use the 1.1 *compute api* |
|
49 |
-export NOVA_URL=${NOVA_URL:-http://$HOST:5000/v2.0/} |
|
50 |
- |
|
51 |
-# Currently novaclient needs you to specify the *compute api* version. This |
|
52 |
-# needs to match the config of your catalog returned by Keystone. |
|
53 |
-export NOVA_VERSION=1.1 |
|
54 |
- |
|
55 |
-# FIXME - why does this need to be specified? |
|
56 |
-export NOVA_REGION_NAME=RegionOne |
|
57 |
- |
|
58 |
-# set log level to DEBUG (helps debug issues) |
|
59 |
-export NOVACLIENT_DEBUG=1 |
|
22 |
+# Use openrc + stackrc + localrc for settings |
|
23 |
+source ./openrc |
|
60 | 24 |
|
61 | 25 |
# Get a token for clients that don't support service catalog |
62 | 26 |
# ========================================================== |
63 | 27 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,41 @@ |
0 |
+#!/usr/bin/env bash |
|
1 |
+ |
|
2 |
+# Load local configuration |
|
3 |
+source ./stackrc |
|
4 |
+ |
|
5 |
+# Set api host endpoint |
|
6 |
+HOST=${HOST:-localhost} |
|
7 |
+ |
|
8 |
+# Nova original used project_id as the *account* that owned resources (servers, |
|
9 |
+# ip address, ...) With the addition of Keystone we have standardized on the |
|
10 |
+# term **tenant** as the entity that owns the resources. **novaclient** still |
|
11 |
+# uses the old deprecated terms project_id. Note that this field should now be |
|
12 |
+# set to tenant_name, not tenant_id. |
|
13 |
+export NOVA_PROJECT_ID=${TENANT:-demo} |
|
14 |
+ |
|
15 |
+# In addition to the owning entity (tenant), nova stores the entity performing |
|
16 |
+# the action as the **user**. |
|
17 |
+export NOVA_USERNAME=${USERNAME:-demo} |
|
18 |
+ |
|
19 |
+# With Keystone you pass the keystone password instead of an api key. |
|
20 |
+export NOVA_API_KEY=${ADMIN_PASSWORD:-secrete} |
|
21 |
+ |
|
22 |
+# With the addition of Keystone, to use an openstack cloud you should |
|
23 |
+# authenticate against keystone, which returns a **Token** and **Service |
|
24 |
+# Catalog**. The catalog contains the endpoint for all services the user/tenant |
|
25 |
+# has access to - including nova, glance, keystone, swift, ... We currently |
|
26 |
+# recommend using the 2.0 *auth api*. |
|
27 |
+# |
|
28 |
+# *NOTE*: Using the 2.0 *auth api* does mean that compute api is 2.0. We will |
|
29 |
+# use the 1.1 *compute api* |
|
30 |
+export NOVA_URL=${NOVA_URL:-http://$HOST:5000/v2.0/} |
|
31 |
+ |
|
32 |
+# Currently novaclient needs you to specify the *compute api* version. This |
|
33 |
+# needs to match the config of your catalog returned by Keystone. |
|
34 |
+export NOVA_VERSION=1.1 |
|
35 |
+ |
|
36 |
+# FIXME - why does this need to be specified? |
|
37 |
+export NOVA_REGION_NAME=RegionOne |
|
38 |
+ |
|
39 |
+# set log level to DEBUG (helps debug issues) |
|
40 |
+export NOVACLIENT_DEBUG=1 |