Browse code

Documentation and formatting cleanup

* No functional changes to see here

Change-Id: I68b7abb3a30effc9e76c6e7deb1e3c6ef140f6bb

Dean Troyer authored on 2012/11/08 03:31:34
Showing 1 changed files
... ...
@@ -12,13 +12,12 @@
12 12
 # developer install.
13 13
 
14 14
 # To keep this script simple we assume you are running on a recent **Ubuntu**
15
-# (11.10 Oneiric or 12.04 Precise) or **Fedora** (F16 or F17) machine.  It
15
+# (11.10 Oneiric or newer) or **Fedora** (F16 or newer) machine.  It
16 16
 # should work in a VM or physical server.  Additionally we put the list of
17 17
 # ``apt`` and ``rpm`` dependencies and other configuration files in this repo.
18 18
 
19 19
 # Learn more and get the most recent version at http://devstack.org
20 20
 
21
-
22 21
 # Keep track of the devstack directory
23 22
 TOP_DIR=$(cd $(dirname "$0") && pwd)
24 23
 
... ...
@@ -33,6 +32,7 @@ GetDistro
33 33
 # Import database library (must be loaded before stackrc which sources localrc)
34 34
 source $TOP_DIR/lib/database
35 35
 
36
+
36 37
 # Settings
37 38
 # ========
38 39
 
... ...
@@ -107,9 +107,8 @@ if [[ ! ${DISTRO} =~ (oneiric|precise|quantal|raring|f16|f17) ]]; then
107 107
     fi
108 108
 fi
109 109
 
110
-# Disallow qpid on oneiric
110
+# Qpid was introduced to Ubuntu in precise, disallow it on oneiric
111 111
 if [ "${DISTRO}" = "oneiric" ] && is_service_enabled qpid ; then
112
-    # Qpid was introduced in precise
113 112
     echo "You must use Ubuntu Precise or newer for Qpid support."
114 113
     exit 1
115 114
 fi
... ...
@@ -453,14 +452,16 @@ MULTI_HOST=`trueorfalse False $MULTI_HOST`
453 453
 # fail.
454 454
 #
455 455
 # If you are running on a single node and don't need to access the VMs from
456
-# devices other than that node, you can set FLAT_INTERFACE=
457
-# This will stop nova from bridging any interfaces into FLAT_NETWORK_BRIDGE.
456
+# devices other than that node, you can set ``FLAT_INTERFACE=``
457
+# This will stop nova from bridging any interfaces into ``FLAT_NETWORK_BRIDGE``.
458 458
 FLAT_INTERFACE=${FLAT_INTERFACE-$GUEST_INTERFACE_DEFAULT}
459 459
 
460 460
 ## FIXME(ja): should/can we check that FLAT_INTERFACE is sane?
461 461
 
462
-# Using Quantum networking:
463
-#
462
+
463
+# Quantum Networking
464
+# ------------------
465
+
464 466
 # Make sure that quantum is enabled in ENABLED_SERVICES.  If you want
465 467
 # to run Quantum on this host, make sure that q-svc is also in
466 468
 # ENABLED_SERVICES.
... ...
@@ -478,18 +479,20 @@ FLAT_INTERFACE=${FLAT_INTERFACE-$GUEST_INTERFACE_DEFAULT}
478 478
 # With Quantum networking the NET_MAN variable is ignored.
479 479
 
480 480
 
481
-# Database configuration
481
+# Database Configuration
482 482
 # ----------------------
483
+
483 484
 # To select between database backends, add a line to localrc like:
484 485
 #
485 486
 #  use_database postgresql
486 487
 #
487
-# The available database backends are defined in the DATABASE_BACKENDS
488
+# The available database backends are defined in the ``DATABASE_BACKENDS``
488 489
 # variable defined in stackrc. By default, MySQL is enabled as the database
489 490
 # backend.
490 491
 
491 492
 initialize_database_backends && echo "Using $DATABASE_TYPE database backend" || echo "No database enabled"
492 493
 
494
+
493 495
 # RabbitMQ or Qpid
494 496
 # --------------------------
495 497
 
... ...
@@ -541,7 +544,7 @@ if is_service_enabled swift; then
541 541
         S3_SERVICE_PORT=${S3_SERVICE_PORT:-8080}
542 542
     fi
543 543
     # We only ask for Swift Hash if we have enabled swift service.
544
-    # SWIFT_HASH is a random unique string for a swift cluster that
544
+    # ``SWIFT_HASH`` is a random unique string for a swift cluster that
545 545
     # can never change.
546 546
     read_password SWIFT_HASH "ENTER A RANDOM SWIFT HASH."
547 547
 fi
... ...
@@ -556,7 +559,7 @@ S3_SERVICE_PORT=${S3_SERVICE_PORT:-3333}
556 556
 # The ``SERVICE_TOKEN`` is used to bootstrap the Keystone database.  It is
557 557
 # just a string and is not a 'real' Keystone token.
558 558
 read_password SERVICE_TOKEN "ENTER A SERVICE_TOKEN TO USE FOR THE SERVICE ADMIN TOKEN."
559
-# Services authenticate to Identity with servicename/SERVICE_PASSWORD
559
+# Services authenticate to Identity with servicename/``SERVICE_PASSWORD``
560 560
 read_password SERVICE_PASSWORD "ENTER A SERVICE_PASSWORD TO USE FOR THE SERVICE AUTHENTICATION."
561 561
 # Horizon currently truncates usernames and passwords at 20 characters
562 562
 read_password ADMIN_PASSWORD "ENTER A PASSWORD TO USE FOR HORIZON AND KEYSTONE (20 CHARS OR LESS)."
... ...
@@ -565,7 +568,6 @@ read_password ADMIN_PASSWORD "ENTER A PASSWORD TO USE FOR HORIZON AND KEYSTONE (
565 565
 SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME:-service}
566 566
 
567 567
 
568
-
569 568
 # Horizon
570 569
 # -------
571 570
 
... ...
@@ -579,10 +581,9 @@ APACHE_GROUP=${APACHE_GROUP:-$APACHE_USER}
579 579
 # ---------
580 580
 
581 581
 # Draw a spinner so the user knows something is happening
582
-function spinner()
583
-{
582
+function spinner() {
584 583
     local delay=0.75
585
-    local spinstr='|/-\'
584
+    local spinstr='/-\|'
586 585
     printf "..." >&3
587 586
     while [ true ]; do
588 587
         local temp=${spinstr#?}
... ...
@@ -637,6 +638,7 @@ if [[ -n "$LOGFILE" ]]; then
637 637
     SUMFILE=$LOGFILE.${CURRENT_LOG_TIME}.summary
638 638
 
639 639
     # Redirect output according to config
640
+
640 641
     # Copy stdout to fd 3
641 642
     exec 3>&1
642 643
     if [[ "$VERBOSE" == "True" ]]; then
... ...
@@ -767,7 +769,7 @@ fi
767 767
 if is_service_enabled q-agt; then
768 768
     if is_quantum_ovs_base_plugin "$Q_PLUGIN"; then
769 769
         # Install deps
770
-        # FIXME add to files/apts/quantum, but don't install if not needed!
770
+        # FIXME add to ``files/apts/quantum``, but don't install if not needed!
771 771
         if [[ "$os_PACKAGE" = "deb" ]]; then
772 772
             kernel_version=`cat /proc/version | cut -d " " -f3`
773 773
             install_package make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
... ...
@@ -810,6 +812,7 @@ pip_install $(get_packages $FILES/pips | sort -u)
810 810
 
811 811
 echo_summary "Installing OpenStack project source"
812 812
 
813
+# Grab clients first
813 814
 install_keystoneclient
814 815
 install_glanceclient
815 816
 install_novaclient
... ...
@@ -871,6 +874,7 @@ if is_service_enabled ryu || (is_service_enabled quantum && [[ "$Q_PLUGIN" = "ry
871 871
     git_clone $RYU_REPO $RYU_DIR $RYU_BRANCH
872 872
 fi
873 873
 
874
+
874 875
 # Initialization
875 876
 # ==============
876 877
 
... ...
@@ -972,10 +976,15 @@ fi
972 972
 
973 973
 # Configure database
974 974
 # ------------------
975
+
975 976
 if is_service_enabled $DATABASE_BACKENDS; then
976 977
     configure_database
977 978
 fi
978 979
 
980
+
981
+# Configure screen
982
+# ----------------
983
+
979 984
 if [ -z "$SCREEN_HARDSTATUS" ]; then
980 985
     SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
981 986
 fi
... ...
@@ -985,9 +994,11 @@ SCREENRC=$TOP_DIR/$SCREEN_NAME-screenrc
985 985
 if [[ -e $SCREENRC ]]; then
986 986
     echo -n > $SCREENRC
987 987
 fi
988
+
988 989
 # Create a new named screen to run processes in
989 990
 screen -d -m -S $SCREEN_NAME -t shell -s /bin/bash
990 991
 sleep 1
992
+
991 993
 # Set a reasonable status bar
992 994
 screen -r $SCREEN_NAME -X hardstatus alwayslastline "$SCREEN_HARDSTATUS"
993 995
 
... ...
@@ -1097,6 +1108,7 @@ fi
1097 1097
 
1098 1098
 # Ryu
1099 1099
 # ---
1100
+
1100 1101
 # Ryu is not a part of OpenStack project. Please ignore following block if
1101 1102
 # you are not interested in Ryu.
1102 1103
 # launch ryu manager
... ...
@@ -1123,11 +1135,10 @@ fi
1123 1123
 # Quantum
1124 1124
 # -------
1125 1125
 
1126
+# Quantum Network Configuration
1126 1127
 if is_service_enabled quantum; then
1127 1128
     echo_summary "Configuring Quantum"
1128
-    #
1129
-    # Quantum Network Configuration
1130
-    #
1129
+
1131 1130
     # The following variables control the Quantum openvswitch and
1132 1131
     # linuxbridge plugins' allocation of tenant networks and
1133 1132
     # availability of provider networks. If these are not configured
... ...
@@ -1155,7 +1166,7 @@ if is_service_enabled quantum; then
1155 1155
     # allocated. An external network switch must be configured to
1156 1156
     # trunk these VLANs between hosts for multi-host connectivity.
1157 1157
     #
1158
-    # Example: TENANT_VLAN_RANGE=1000:1999
1158
+    # Example: ``TENANT_VLAN_RANGE=1000:1999``
1159 1159
     TENANT_VLAN_RANGE=${TENANT_VLAN_RANGE:-}
1160 1160
 
1161 1161
     # If using VLANs for tenant networks, or if using flat or VLAN
... ...
@@ -1164,7 +1175,7 @@ if is_service_enabled quantum; then
1164 1164
     # openvswitch agent or LB_PHYSICAL_INTERFACE for the linuxbridge
1165 1165
     # agent, as described below.
1166 1166
     #
1167
-    # Example: PHYSICAL_NETWORK=default
1167
+    # Example: ``PHYSICAL_NETWORK=default``
1168 1168
     PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-}
1169 1169
 
1170 1170
     # With the openvswitch plugin, if using VLANs for tenant networks,
... ...
@@ -1174,7 +1185,7 @@ if is_service_enabled quantum; then
1174 1174
     # physical interface must be manually added to the bridge as a
1175 1175
     # port for external connectivity.
1176 1176
     #
1177
-    # Example: OVS_PHYSICAL_BRIDGE=br-eth1
1177
+    # Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
1178 1178
     OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-}
1179 1179
 
1180 1180
     # With the linuxbridge plugin, if using VLANs for tenant networks,
... ...
@@ -1182,13 +1193,13 @@ if is_service_enabled quantum; then
1182 1182
     # the name of the network interface to use for the physical
1183 1183
     # network.
1184 1184
     #
1185
-    # Example: LB_PHYSICAL_INTERFACE=eth1
1185
+    # Example: ``LB_PHYSICAL_INTERFACE=eth1``
1186 1186
     LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-}
1187 1187
 
1188 1188
     # With the openvswitch plugin, set to True in localrc to enable
1189
-    # provider GRE tunnels when ENABLE_TENANT_TUNNELS is False.
1189
+    # provider GRE tunnels when ``ENABLE_TENANT_TUNNELS`` is False.
1190 1190
     #
1191
-    # Example: OVS_ENABLE_TUNNELING=True
1191
+    # Example: ``OVS_ENABLE_TUNNELING=True``
1192 1192
     OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS}
1193 1193
 
1194 1194
     # Put config files in ``/etc/quantum`` for everyone to find
... ...
@@ -1276,7 +1287,7 @@ if is_service_enabled q-svc; then
1276 1276
             echo "WARNING - The openvswitch plugin is using local tenant networks, with no connectivity between hosts."
1277 1277
         fi
1278 1278
 
1279
-        # Override OVS_VLAN_RANGES and OVS_BRIDGE_MAPPINGS in localrc
1279
+        # Override ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc``
1280 1280
         # for more complex physical network configurations.
1281 1281
         if [[ "$OVS_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
1282 1282
             OVS_VLAN_RANGES=$PHYSICAL_NETWORK
... ...
@@ -1299,7 +1310,7 @@ if is_service_enabled q-svc; then
1299 1299
             echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
1300 1300
         fi
1301 1301
 
1302
-        # Override LB_VLAN_RANGES and LB_INTERFACE_MAPPINGS in localrc
1302
+        # Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
1303 1303
         # for more complex physical network configurations.
1304 1304
         if [[ "$LB_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
1305 1305
             LB_VLAN_RANGES=$PHYSICAL_NETWORK
... ...
@@ -1339,7 +1350,7 @@ if is_service_enabled q-agt; then
1339 1339
         fi
1340 1340
 
1341 1341
         # Setup physical network bridge mappings.  Override
1342
-        # OVS_VLAN_RANGES and OVS_BRIDGE_MAPPINGS in localrc for more
1342
+        # ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
1343 1343
         # complex physical network configurations.
1344 1344
         if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
1345 1345
             OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
... ...
@@ -1353,7 +1364,7 @@ if is_service_enabled q-agt; then
1353 1353
         AGENT_BINARY="$QUANTUM_DIR/bin/quantum-openvswitch-agent"
1354 1354
     elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then
1355 1355
         # Setup physical network interface mappings.  Override
1356
-        # LB_VLAN_RANGES and LB_INTERFACE_MAPPINGS in localrc for more
1356
+        # ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
1357 1357
         # complex physical network configurations.
1358 1358
         if [[ "$LB_INTERFACE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
1359 1359
             LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
... ...
@@ -1454,6 +1465,7 @@ if is_service_enabled quantum; then
1454 1454
     fi
1455 1455
 fi
1456 1456
 
1457
+
1457 1458
 # Nova
1458 1459
 # ----
1459 1460
 
... ...
@@ -1807,6 +1819,7 @@ elif [ -n "$RABBIT_HOST" ] &&  [ -n "$RABBIT_PASSWORD" ]; then
1807 1807
 fi
1808 1808
 add_nova_opt "glance_api_servers=$GLANCE_HOSTPORT"
1809 1809
 
1810
+
1810 1811
 # XenServer
1811 1812
 # ---------
1812 1813