Browse code

Freshen samples

Tend the bit rot in the sample local.sh and localrc files.

Change-Id: I58bc3929629d088ac1c3f1dc355c5bec2c6e6b98

Dean Troyer authored on 2012/09/01 00:55:36
Showing 2 changed files
... ...
@@ -7,9 +7,10 @@
7 7
 # work properly.
8 8
 
9 9
 # This is a collection of some of the things we have found to be useful to run
10
-# after stack.sh to tweak the OpenStack configuration that DevStack produces.
10
+# after ``stack.sh`` to tweak the OpenStack configuration that DevStack produces.
11 11
 # These should be considered as samples and are unsupported DevStack code.
12 12
 
13
+
13 14
 # Keep track of the devstack directory
14 15
 TOP_DIR=$(cd $(dirname "$0") && pwd)
15 16
 
... ...
@@ -34,7 +35,7 @@ source $TOP_DIR/openrc
34 34
 
35 35
 # Add first keypair found in localhost:$HOME/.ssh
36 36
 for i in $HOME/.ssh/id_rsa.pub $HOME/.ssh/id_dsa.pub; do
37
-    if [[ -f $i ]]; then
37
+    if [[ -r $i ]]; then
38 38
         nova keypair-add --pub_key=$i `hostname`
39 39
         break
40 40
     fi
... ...
@@ -55,8 +56,9 @@ MI_NAME=m1.micro
55 55
 if [[ -z $(nova flavor-list | grep $MI_NAME) ]]; then
56 56
     nova flavor-create $MI_NAME 6 128 0 1
57 57
 fi
58
+
59
+
58 60
 # Other Uses
59 61
 # ----------
60 62
 
61
-# Add tcp/22 to default security group
62
-
63
+# Add tcp/22 and icmp to default security group
... ...
@@ -1,9 +1,10 @@
1 1
 # Sample ``localrc`` for user-configurable variables in ``stack.sh``
2 2
 
3
-# NOTE: Copy this file to the root ``devstack`` directory for it to work properly.
3
+# NOTE: Copy this file to the root ``devstack`` directory for it to
4
+# work properly.
4 5
 
5
-# ``localrc`` is a user-maintained setings file that is sourced at the end of
6
-# ``stackrc``. This gives it the ability to override any variables set in ``stackrc``.
6
+# ``localrc`` is a user-maintained setings file that is sourced from ``stackrc``.
7
+# This gives it the ability to override any variables set in ``stackrc``.
7 8
 # Also, most of the settings in ``stack.sh`` are written to only be set if no
8 9
 # value has already been set; this lets ``localrc`` effectively override the
9 10
 # default values.
... ...
@@ -21,40 +22,51 @@
21 21
 # there are a few minimal variables set:
22 22
 
23 23
 # If the ``*_PASSWORD`` variables are not set here you will be prompted to enter
24
-# values for them by ``stack.sh``.
24
+# values for them by ``stack.sh`` and they will be added to ``localrc``.
25 25
 ADMIN_PASSWORD=nomoresecrete
26 26
 MYSQL_PASSWORD=stackdb
27 27
 RABBIT_PASSWORD=stackqueue
28 28
 SERVICE_PASSWORD=$ADMIN_PASSWORD
29 29
 
30
-# HOST_IP should be set manually for best results.  It is auto-detected during the
31
-# first run of ``stack.sh`` but often is indeterminate on later runs due to the IP
32
-# being moved from an Ethernet interface to a bridge on the host. Setting it here
33
-# also makes it available for ``openrc`` to include when setting ``OS_AUTH_URL``.
30
+# ``HOST_IP`` should be set manually for best results if the NIC configuration
31
+# of the host is unusual, i.e. ``eth1`` has the default route but ``eth0`` is the
32
+# public interface.  It is auto-detected in ``stack.sh`` but often is indeterminate
33
+# on later runs due to the IP moving from an Ethernet interface to a bridge on
34
+# the host. Setting it here also makes it available for ``openrc`` to include
35
+# when setting ``OS_AUTH_URL``.
34 36
 # ``HOST_IP`` is not set by default.
35
-HOST_IP=w.x.y.z
37
+#HOST_IP=w.x.y.z
36 38
 
37 39
 
38
-# Set DevStack Install Directory
39
-# ------------------------------
40
+# Logging
41
+# -------
40 42
 
41
-# The DevStack install directory is set by the ``DEST`` variable. By setting it
42
-# early in ``localrc`` you can reference it in later variables. The default value
43
-# is ``/opt/stack``. It can be useful to set it even though it is not changed from
44
-# the default value.
45
-DEST=/opt/stack
43
+# By default ``stack.sh`` output only goes to the terminal where it runs.  It can
44
+# be configured to additionally log to a file by setting ``LOGFILE`` to the full
45
+# path of the destination log file.  A timestamp will be appended to the given name.
46
+LOGFILE=$DEST/logs/stack.sh.log
47
+
48
+# Old log files are automatically removed after 7 days to keep things neat.  Change
49
+# the number of days by setting ``LOGDAYS``.
50
+LOGDAYS=2
51
+
52
+# Nova logs will be colorized if ``SYSLOG`` is not set; turn this off by setting
53
+# ``LOG_COLOR`` false.
54
+#LOG_COLOR=False
46 55
 
47 56
 
48 57
 # Using milestone-proposed branches
49 58
 # ---------------------------------
50 59
 
51 60
 # Uncomment these to grab the milestone-proposed branches from the repos:
61
+#CINDER_BRANCH=milestone-proposed
52 62
 #GLANCE_BRANCH=milestone-proposed
53 63
 #HORIZON_BRANCH=milestone-proposed
54 64
 #KEYSTONE_BRANCH=milestone-proposed
55 65
 #KEYSTONECLIENT_BRANCH=milestone-proposed
56 66
 #NOVA_BRANCH=milestone-proposed
57 67
 #NOVACLIENT_BRANCH=milestone-proposed
68
+#QUANTUM_BRANCH=milestone-proposed
58 69
 #SWIFT_BRANCH=milestone-proposed
59 70
 
60 71