Browse code

Clean up configuration documentation

The current format is just copy-paste after auto-conversion and very
inconsistent. Move discussion of each option into a section and
reword some slightly so they read more clearly. Group some together
into a section+sub-sections, such as the logging and ip-version option
discussions.

Add a top table-of-contents for the major sections, and then a
separate toc for each of the configuration options that are discussed
in detail.

Change-Id: Iddd27cb54f1d9f062b9c47ff9ad6a2bef3650d6b

Ian Wienand authored on 2015/08/06 09:25:45
Showing 1 changed files
... ...
@@ -2,6 +2,10 @@
2 2
 Configuration
3 3
 =============
4 4
 
5
+.. contents::
6
+   :local:
7
+   :depth: 1
8
+
5 9
 DevStack has always tried to be mostly-functional with a minimal amount
6 10
 of configuration. The number of options has ballooned as projects add
7 11
 features, new projects added and more combinations need to be tested.
... ...
@@ -142,121 +146,79 @@ will not be set if there is no IPv6 address on the default Ethernet interface.
142 142
 Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``.
143 143
 ``HOST_IPV6`` is not set by default.
144 144
 
145
-Common Configuration Variables
146
-==============================
145
+Configuration Notes
146
+===================
147
+
148
+.. contents::
149
+   :local:
147 150
 
148 151
 Installation Directory
149 152
 ----------------------
150 153
 
151
-    | *Default: ``DEST=/opt/stack``*
152
-    |  The DevStack install directory is set by the ``DEST`` variable.
153
-    |  By setting it early in the ``localrc`` section you can reference it
154
-       in later variables. It can be useful to set it even though it is not
155
-       changed from the default value.
156
-    |
154
+The DevStack install directory is set by the ``DEST`` variable.  By
155
+default it is ``/opt/stack``.
156
+
157
+By setting it early in the ``localrc`` section you can reference it in
158
+later variables.  It can be useful to set it even though it is not
159
+changed from the default value.
157 160
 
158 161
     ::
159 162
 
160 163
         DEST=/opt/stack
161 164
 
162
-Libraries from Git
163
-
164
-   | *Default: ``LIBS_FROM_GIT=""``*
165
-
166
-   | By default devstack installs OpenStack server components from
167
-     git, however it installs client libraries from released versions
168
-     on pypi. This is appropriate if you are working on server
169
-     development, but if you want to see how an unreleased version of
170
-     the client affects the system you can have devstack install it
171
-     from upstream, or from local git trees.
172
-   | Multiple libraries can be specified as a comma separated list.
173
-   |
174
-
175
-   ::
176
-
177
-      LIBS_FROM_GIT=python-keystoneclient,oslo.config
178
-
179
-Virtual Environments
180
-
181
-  | *Default: ``USE_VENV=False``*
182
-  |   Enable the use of Python virtual environments by setting ``USE_VENV``
183
-      to ``True``.  This will enable the creation of venvs for each project
184
-      that is defined in the ``PROJECT_VENV`` array.
185
-
186
-  | *Default: ``PROJECT_VENV['<project>']='<project-dir>.venv'*
187
-  |   Each entry in the ``PROJECT_VENV`` array contains the directory name
188
-      of a venv to be used for the project.  The array index is the project
189
-      name.  Multiple projects can use the same venv if desired.
190
-
191
-  ::
192
-
193
-    PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
194
-
195
-  | *Default: ``ADDITIONAL_VENV_PACKAGES=""``*
196
-  |   A comma-separated list of additional packages to be installed into each
197
-      venv.  Often projects will not have certain packages listed in its
198
-      ``requirements.txt`` file because they are 'optional' requirements,
199
-      i.e. only needed for certain configurations.  By default, the enabled
200
-      databases will have their Python bindings added when they are enabled.
165
+Logging
166
+-------
201 167
 
202 168
 Enable Logging
169
+~~~~~~~~~~~~~~
203 170
 
204
-    | *Defaults: ``LOGFILE="" LOGDAYS=7 LOG_COLOR=True``*
205
-    |  By default ``stack.sh`` output is only written to the console
206
-       where it runs. It can be sent to a file in addition to the console
207
-       by setting ``LOGFILE`` to the fully-qualified name of the
208
-       destination log file. A timestamp will be appended to the given
209
-       filename for each run of ``stack.sh``.
210
-    |
171
+By default ``stack.sh`` output is only written to the console where it
172
+runs. It can be sent to a file in addition to the console by setting
173
+``LOGFILE`` to the fully-qualified name of the destination log file. A
174
+timestamp will be appended to the given filename for each run of
175
+``stack.sh``.
211 176
 
212 177
     ::
213 178
 
214 179
         LOGFILE=$DEST/logs/stack.sh.log
215 180
 
216
-    Old log files are cleaned automatically if ``LOGDAYS`` is set to the
217
-    number of days of old log files to keep.
181
+Old log files are cleaned automatically if ``LOGDAYS`` is set to the
182
+number of days of old log files to keep.
218 183
 
219 184
     ::
220 185
 
221 186
         LOGDAYS=1
222 187
 
223
-    The some of the project logs (Nova, Cinder, etc) will be colorized
224
-    by default (if ``SYSLOG`` is not set below); this can be turned off
225
-    by setting ``LOG_COLOR`` False.
188
+The some of the project logs (Nova, Cinder, etc) will be colorized by
189
+default (if ``SYSLOG`` is not set below); this can be turned off by
190
+setting ``LOG_COLOR`` to ``False``.
226 191
 
227 192
     ::
228 193
 
229 194
         LOG_COLOR=False
230 195
 
231 196
 Logging the Service Output
197
+~~~~~~~~~~~~~~~~~~~~~~~~~~
232 198
 
233
-    | *Default: ``LOGDIR=""``*
234
-    |  DevStack will log the stdout output of the services it starts.
235
-       When using ``screen`` this logs the output in the screen windows
236
-       to a file.  Without ``screen`` this simply redirects stdout of
237
-       the service process to a file in ``LOGDIR``.
238
-    |
199
+DevStack will log the ``stdout`` output of the services it starts.
200
+When using ``screen`` this logs the output in the screen windows to a
201
+file.  Without ``screen`` this simply redirects stdout of the service
202
+process to a file in ``LOGDIR``.
239 203
 
240 204
     ::
241 205
 
242 206
         LOGDIR=$DEST/logs
243 207
 
244
-    *Note the use of ``DEST`` to locate the main install directory; this
245
-    is why we suggest setting it in ``local.conf``.*
208
+*Note the use of ``DEST`` to locate the main install directory; this
209
+is why we suggest setting it in ``local.conf``.*
246 210
 
247 211
 Enabling Syslog
212
+~~~~~~~~~~~~~~~
248 213
 
249
-    | *Default: ``SYSLOG=False SYSLOG_HOST=$HOST_IP SYSLOG_PORT=516``*
250
-    |  Logging all services to a single syslog can be convenient. Enable
251
-       syslogging by setting ``SYSLOG`` to ``True``. If the destination log
252
-       host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be
253
-       used to direct the message stream to the log host.
254
-    |
214
+Logging all services to a single syslog can be convenient. Enable
215
+syslogging by setting ``SYSLOG`` to ``True``. If the destination log
216
+host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be used
217
+to direct the message stream to the log host.  |
255 218
 
256 219
     ::
257 220
 
... ...
@@ -264,15 +226,55 @@ Enabling Syslog
264 264
         SYSLOG_HOST=$HOST_IP
265 265
         SYSLOG_PORT=516
266 266
 
267
+Libraries from Git
268
+------------------
269
+
270
+By default devstack installs OpenStack server components from git,
271
+however it installs client libraries from released versions on pypi.
272
+This is appropriate if you are working on server development, but if
273
+you want to see how an unreleased version of the client affects the
274
+system you can have devstack install it from upstream, or from local
275
+git trees by specifying it in ``LIBS_FROM_GIT``.  Multiple libraries
276
+can be specified as a comma separated list.
277
+
278
+   ::
279
+
280
+      LIBS_FROM_GIT=python-keystoneclient,oslo.config
281
+
282
+Virtual Environments
283
+--------------------
284
+
285
+Enable the use of Python virtual environments by setting ``USE_VENV``
286
+to ``True``.  This will enable the creation of venvs for each project
287
+that is defined in the ``PROJECT_VENV`` array.
288
+
289
+Each entry in the ``PROJECT_VENV`` array contains the directory name
290
+of a venv to be used for the project.  The array index is the project
291
+name.  Multiple projects can use the same venv if desired.
292
+
293
+  ::
294
+
295
+    PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
296
+
297
+``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional
298
+packages to be installed into each venv.  Often projects will not have
299
+certain packages listed in its ``requirements.txt`` file because they
300
+are 'optional' requirements, i.e. only needed for certain
301
+configurations.  By default, the enabled databases will have their
302
+Python bindings added when they are enabled.
303
+
304
+  ::
305
+
306
+     ADDITIONAL_VENV_PACKAGES="python-foo, python-bar"
307
+
308
+
267 309
 A clean install every time
268 310
 --------------------------
269 311
 
270
-    | *Default: ``RECLONE=""``*
271
-    |  By default ``stack.sh`` only clones the project repos if they do
272
-       not exist in ``$DEST``. ``stack.sh`` will freshen each repo on each
273
-       run if ``RECLONE`` is set to ``yes``. This avoids having to manually
274
-       remove repos in order to get the current branch from ``$GIT_BASE``.
275
-    |
312
+By default ``stack.sh`` only clones the project repos if they do not
313
+exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if
314
+``RECLONE`` is set to ``yes``. This avoids having to manually remove
315
+repos in order to get the current branch from ``$GIT_BASE``.
276 316
 
277 317
     ::
278 318
 
... ...
@@ -281,13 +283,11 @@ A clean install every time
281 281
 Upgrade packages installed by pip
282 282
 ---------------------------------
283 283
 
284
-    | *Default: ``PIP_UPGRADE=""``*
285
-    |  By default ``stack.sh`` only installs Python packages if no version
286
-       is currently installed or the current version does not match a specified
287
-       requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing required
288
-       Python packages will be upgraded to the most recent version that
289
-       matches requirements.
290
-    |
284
+By default ``stack.sh`` only installs Python packages if no version is
285
+currently installed or the current version does not match a specified
286
+requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing
287
+required Python packages will be upgraded to the most recent version
288
+that matches requirements.
291 289
 
292 290
     ::
293 291
 
... ...
@@ -296,74 +296,69 @@ Upgrade packages installed by pip
296 296
 Swift
297 297
 -----
298 298
 
299
-    | Default: SWIFT_HASH=""
300
-    | SWIFT_REPLICAS=1
301
-    | SWIFT_DATA_DIR=$DEST/data/swift
299
+Swift is now used as the back-end for the S3-like object store.  When
300
+enabled Nova's objectstore (``n-obj`` in ``ENABLED_SERVICES``) is
301
+automatically disabled. Enable Swift by adding it services to
302
+``ENABLED_SERVICES``
302 303
 
303
-    | Swift is now used as the back-end for the S3-like object store.
304
-      When enabled Nova's objectstore (n-obj in ENABLED_SERVICES) is
305
-      automatically disabled. Enable Swift by adding it services to
306
-      ENABLED_SERVICES: enable_service s-proxy s-object s-container
307
-      s-account
304
+    ::
305
+
306
+       enable_service s-proxy s-object s-container s-account
308 307
 
309
-    Setting Swift's hash value is required and you will be prompted for
310
-    it if Swift is enabled so just set it to something already:
308
+Setting Swift's hash value is required and you will be prompted for it
309
+if Swift is enabled so just set it to something already:
311 310
 
312 311
     ::
313 312
 
314 313
         SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
315 314
 
316
-    For development purposes the default number of replicas is set to
317
-    ``1`` to reduce the overhead required. To better simulate a
318
-    production deployment set this to ``3`` or more.
315
+For development purposes the default number of replicas is set to
316
+``1`` to reduce the overhead required. To better simulate a production
317
+deployment set this to ``3`` or more.
319 318
 
320 319
     ::
321 320
 
322 321
         SWIFT_REPLICAS=3
323 322
 
324
-    The data for Swift is stored in the source tree by default (in
325
-    ``$DEST/swift/data``) and can be moved by setting
326
-    ``SWIFT_DATA_DIR``. The specified directory will be created if it
327
-    does not exist.
323
+The data for Swift is stored in the source tree by default (in
324
+``$DEST/swift/data``) and can be moved by setting
325
+``SWIFT_DATA_DIR``. The specified directory will be created if it does
326
+not exist.
328 327
 
329 328
     ::
330 329
 
331 330
         SWIFT_DATA_DIR=$DEST/data/swift
332 331
 
333
-    *Note: Previously just enabling ``swift`` was sufficient to start
334
-    the Swift services. That does not provide proper service
335
-    granularity, particularly in multi-host configurations, and is
336
-    considered deprecated. Some service combination tests now check for
337
-    specific Swift services and the old blanket acceptance will longer
338
-    work correctly.*
332
+*Note*: Previously just enabling ``swift`` was sufficient to start the
333
+Swift services. That does not provide proper service granularity,
334
+particularly in multi-host configurations, and is considered
335
+deprecated. Some service combination tests now check for specific
336
+Swift services and the old blanket acceptance will longer work
337
+correctly.
339 338
 
340 339
 Service Catalog Backend
341 340
 -----------------------
342 341
 
343
-    | *Default: ``KEYSTONE_CATALOG_BACKEND=sql``*
344
-    |  DevStack uses Keystone's ``sql`` service catalog backend. An
345
-       alternate ``template`` backend is also available. However, it does
346
-       not support the ``service-*`` and ``endpoint-*`` commands of the
347
-       ``keystone`` CLI. To do so requires the ``sql`` backend be enabled:
348
-    |
342
+By default DevStack uses Keystone's ``sql`` service catalog backend.
343
+An alternate ``template`` backend is also available, however, it does
344
+not support the ``service-*`` and ``endpoint-*`` commands of the
345
+``keystone`` CLI.  To do so requires the ``sql`` backend be enabled
346
+with ``KEYSTONE_CATALOG_BACKEND``:
349 347
 
350 348
     ::
351 349
 
352 350
         KEYSTONE_CATALOG_BACKEND=template
353 351
 
354
-    DevStack's default configuration in ``sql`` mode is set in
355
-    ``files/keystone_data.sh``
352
+DevStack's default configuration in ``sql`` mode is set in
353
+``files/keystone_data.sh``
356 354
 
357 355
 Cinder
358 356
 ------
359 357
 
360
-    | Default:
361
-    | VOLUME_GROUP="stack-volumes" VOLUME_NAME_PREFIX="volume-" VOLUME_BACKING_FILE_SIZE=10250M
362
-    |  The logical volume group used to hold the Cinder-managed volumes
363
-       is set by ``VOLUME_GROUP``, the logical volume name prefix is set
364
-       with ``VOLUME_NAME_PREFIX`` and the size of the volume backing file
365
-       is set with ``VOLUME_BACKING_FILE_SIZE``.
366
-    |
358
+The logical volume group used to hold the Cinder-managed volumes is
359
+set by ``VOLUME_GROUP``, the logical volume name prefix is set with
360
+``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
361
+with ``VOLUME_BACKING_FILE_SIZE``.
367 362
 
368 363
     ::
369 364
 
... ...
@@ -374,19 +369,23 @@ Cinder
374 374
 Multi-host DevStack
375 375
 -------------------
376 376
 
377
-    | *Default: ``MULTI_HOST=False``*
378
-    |  Running DevStack with multiple hosts requires a custom
379
-       ``local.conf`` section for each host. The master is the same as a
380
-       single host installation with ``MULTI_HOST=True``. The slaves have
381
-       fewer services enabled and a couple of host variables pointing to
382
-       the master.
383
-    |  **Master**
377
+Running DevStack with multiple hosts requires a custom ``local.conf``
378
+section for each host. The master is the same as a single host
379
+installation with ``MULTI_HOST=True``. The slaves have fewer services
380
+enabled and a couple of host variables pointing to the master.
381
+
382
+Master
383
+~~~~~~
384 384
 
385
+Set ``MULTI_HOST`` to true
385 386
     ::
386 387
 
387 388
         MULTI_HOST=True
388 389
 
389
-    **Slave**
390
+Slave
391
+~~~~~
392
+
393
+Set the following options to point to the master
390 394
 
391 395
     ::
392 396
 
... ...
@@ -398,22 +397,19 @@ Multi-host DevStack
398 398
 IP Version
399 399
 ----------
400 400
 
401
-    | Default: ``IP_VERSION=4+6``
402
-    | This setting can be used to configure DevStack to create either an IPv4,
403
-      IPv6, or dual stack tenant data network by setting ``IP_VERSION`` to
404
-      either ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6``
405
-      respectively. This functionality requires that the Neutron networking
406
-      service is enabled by setting the following options:
407
-    |
401
+``IP_VERSION`` can be used to configure DevStack to create either an
402
+IPv4, IPv6, or dual-stack tenant data-network by with either
403
+``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6``
404
+respectively.  This functionality requires that the Neutron networking
405
+service is enabled by setting the following options:
408 406
 
409 407
     ::
410 408
 
411 409
         disable_service n-net
412 410
         enable_service q-svc q-agt q-dhcp q-l3
413 411
 
414
-    | The following optional variables can be used to alter the default IPv6
415
-      behavior:
416
-    |
412
+The following optional variables can be used to alter the default IPv6
413
+behavior:
417 414
 
418 415
     ::
419 416
 
... ...
@@ -422,24 +418,28 @@ IP Version
422 422
         FIXED_RANGE_V6=fd$IPV6_GLOBAL_ID::/64
423 423
         IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1
424 424
 
425
-    | *Note: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY``
426
-      can be configured with any valid IPv6 prefix. The default values make
427
-      use of an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC 4193.*
428
-    |
429
-
430
-    | Default: ``SERVICE_IP_VERSION=4``
431
-    | This setting can be used to configure DevStack to enable services to
432
-      operate over either IPv4 or IPv6, by setting ``SERVICE_IP_VERSION`` to
433
-      either ``SERVICE_IP_VERSION=4`` or ``SERVICE_IP_VERSION=6`` respectively.
434
-      When set to ``4`` devstack services will open listen sockets on 0.0.0.0
435
-      and service endpoints will be registered using ``HOST_IP`` as the address.
436
-      When set to ``6`` devstack services will open listen sockets on :: and
437
-      service endpoints will be registered using ``HOST_IPV6`` as the address.
438
-      The default value for this setting is ``4``.  Dual-mode support, for
439
-      example ``4+6`` is not currently supported.
440
-    | The following optional variable can be used to alter the default IPv6
441
-      address used:
442
-    |
425
+*Note*: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` can be
426
+configured with any valid IPv6 prefix. The default values make use of
427
+an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193.
428
+
429
+Service Version
430
+~~~~~~~~~~~~~~~
431
+
432
+DevStack can enable service operation over either IPv4 or IPv6 by
433
+setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or
434
+``SERVICE_IP_VERSION=6`` respectively.
435
+
436
+When set to ``4`` devstack services will open listen sockets on
437
+``0.0.0.0`` and service endpoints will be registered using ``HOST_IP``
438
+as the address.
439
+
440
+When set to ``6`` devstack services will open listen sockets on ``::``
441
+and service endpoints will be registered using ``HOST_IPV6`` as the
442
+address.
443
+
444
+The default value for this setting is ``4``.  Dual-mode support, for
445
+example ``4+6`` is not currently supported.  ``HOST_IPV6`` can
446
+optionally be used to alter the default IPv6 address
443 447
 
444 448
     ::
445 449