| ... | ... |
@@ -4,21 +4,53 @@ |
| 4 | 4 |
|
| 5 | 5 |
# we will use the ``nova`` cli tool provided by the ``python-novaclient`` |
| 6 | 6 |
# package |
| 7 |
+# |
|
| 7 | 8 |
|
| 8 |
-# Settings/Options |
|
| 9 |
-# ================ |
|
| 9 |
+ |
|
| 10 |
+# This script exits on an error so that errors don't compound and you see |
|
| 11 |
+# only the first error that occured. |
|
| 12 |
+set -o errexit |
|
| 13 |
+ |
|
| 14 |
+# Print the commands being run so that we can see the command that triggers |
|
| 15 |
+# an error. It is also useful for following allowing as the install occurs. |
|
| 16 |
+set -o xtrace |
|
| 17 |
+ |
|
| 18 |
+ |
|
| 19 |
+# Settings |
|
| 20 |
+# ======== |
|
| 10 | 21 |
|
| 11 | 22 |
HOST=${HOST:-localhost}
|
| 12 |
-export NOVA_PROJECT_ID=${TENANT:-admin}
|
|
| 13 |
-export NOVA_USERNAME=${USERNAME:-admin}
|
|
| 14 |
-export NOVA_API_KEY=${PASS:-secrete}
|
|
| 15 |
- |
|
| 16 |
-# keystone is the authentication system. We use the **auth** 2.0 protocol. |
|
| 17 |
-# Upon successful authentication, we are return a token and catalog of |
|
| 18 |
-# endpoints (for openstack services) |
|
| 19 |
-export NOVA_URL="http://$HOST:5000/v2.0/" |
|
| 23 |
+ |
|
| 24 |
+# Nova original used project_id as the *account* that owned resources (servers, |
|
| 25 |
+# ip address, ...) With the addition of Keystone we have standardized on the |
|
| 26 |
+# term **tenant** as the entity that owns the resources. **novaclient** still |
|
| 27 |
+# uses the old deprecated terms project_id. |
|
| 28 |
+export NOVA_PROJECT_ID=${TENANT:-demo}
|
|
| 29 |
+ |
|
| 30 |
+# In addition to the owning entity (tenant), nova stores the entity performing |
|
| 31 |
+# the action as the **user**. |
|
| 32 |
+export NOVA_USERNAME=${USERNAME:-demo}
|
|
| 33 |
+ |
|
| 34 |
+# With Keystone you pass the keystone password instead of an api key. |
|
| 35 |
+export NOVA_API_KEY=${PASSWORD:-secrete}
|
|
| 36 |
+ |
|
| 37 |
+# With the addition of Keystone, to use an openstack cloud you should |
|
| 38 |
+# authenticate against keystone, which returns a **Token** and **Service |
|
| 39 |
+# Catalog**. The catalog contains the endpoint for all services the user/tenant |
|
| 40 |
+# has access to - including nova, glance, keystone, swift, ... We currently |
|
| 41 |
+# recommend using the 2.0 *auth api*. |
|
| 42 |
+# |
|
| 43 |
+# *NOTE*: Using the 2.0 *auth api* does mean that compute api is 2.0. We will |
|
| 44 |
+# use the 1.1 *compute api* |
|
| 45 |
+export NOVA_URL=${NOVA_URL:-http://$HOST:5000/v2.0/}
|
|
| 46 |
+ |
|
| 47 |
+# Currently novaclient needs you to specify the *compute api* version. This |
|
| 48 |
+# needs to match the config of your catalog returned by Keystone. |
|
| 20 | 49 |
export NOVA_VERSION=1.1 |
| 21 | 50 |
|
| 22 |
-export |
|
| 23 | 51 |
|
| 52 |
+# Servers |
|
| 53 |
+# ======= |
|
| 54 |
+ |
|
| 55 |
+# retreive a list of servers for our tenant |
|
| 24 | 56 |
nova list |