blob: 391e5bec7086b0bb82621029ddbe6d805627a0aa [file] [log] [blame]
Dean Troyer0986a7b2014-10-29 22:08:13 -05001=============
2Configuration
3=============
Sean M. Collins09e550c2014-10-21 11:40:08 -04004
Ian Wienand815db162015-08-06 10:25:45 +10005.. contents::
6 :local:
7 :depth: 1
8
Sean M. Collins09e550c2014-10-21 11:40:08 -04009local.conf
Sean Dague07d7e5b2014-11-17 07:10:14 -050010==========
Sean M. Collins09e550c2014-10-21 11:40:08 -040011
Ian Wienanda35391e2015-08-10 13:53:40 +100012DevStack configuration is modified via the file ``local.conf``. It is
13a modified INI format file that introduces a meta-section header to
14carry additional information regarding the configuration files to be
15changed.
16
17A sample is provided in ``devstack/samples``
Sean M. Collins09e550c2014-10-21 11:40:08 -040018
19The new header is similar to a normal INI section header but with double
20brackets (``[[ ... ]]``) and two internal fields separated by a pipe
dieterly7c7679e2015-09-18 15:10:48 -060021(``|``). Note that there are no spaces between the double brackets and the
22internal fields. Likewise, there are no spaces between the pipe and the
23internal fields:
Sean M. Collins09e550c2014-10-21 11:40:08 -040024::
25
dieterly7c7679e2015-09-18 15:10:48 -060026 '[[' <phase> '|' <config-file-name> ']]'
Sean M. Collins09e550c2014-10-21 11:40:08 -040027
28where ``<phase>`` is one of a set of phase names defined by ``stack.sh``
29and ``<config-file-name>`` is the configuration filename. The filename
30is eval'ed in the ``stack.sh`` context so all environment variables are
31available and may be used. Using the project config file variables in
32the header is strongly suggested (see the ``NOVA_CONF`` example below).
33If the path of the config file does not exist it is skipped.
34
35The defined phases are:
36
37- **local** - extracts ``localrc`` from ``local.conf`` before
38 ``stackrc`` is sourced
Sean M. Collins09e550c2014-10-21 11:40:08 -040039- **post-config** - runs after the layer 2 services are configured and
40 before they are started
41- **extra** - runs after services are started and before any files in
42 ``extra.d`` are executed
YAMAMOTO Takashi961643e2015-07-31 13:45:27 +090043- **post-extra** - runs after files in ``extra.d`` are executed
Sean M. Collins09e550c2014-10-21 11:40:08 -040044
45The file is processed strictly in sequence; meta-sections may be
46specified more than once but if any settings are duplicated the last to
47appear in the file will be used.
48
49::
50
51 [[post-config|$NOVA_CONF]]
52 [DEFAULT]
53 use_syslog = True
54
55 [osapi_v3]
56 enabled = False
57
58A specific meta-section ``local|localrc`` is used to provide a default
59``localrc`` file (actually ``.localrc.auto``). This allows all custom
60settings for DevStack to be contained in a single file. If ``localrc``
Ian Wienand7cd16ce2016-04-08 09:40:56 +100061exists it will be used instead to preserve backward-compatibility.
Sean M. Collins09e550c2014-10-21 11:40:08 -040062
63::
64
65 [[local|localrc]]
66 FIXED_RANGE=10.254.1.0/24
67 ADMIN_PASSWORD=speciale
68 LOGFILE=$DEST/logs/stack.sh.log
69
70Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to
71*NOT* start with a ``/`` (slash) character. A slash will need to be
72added:
73
74::
75
76 [[post-config|/$Q_PLUGIN_CONF_FILE]]
77
78Also note that the ``localrc`` section is sourced as a shell script
Juan Antonio Osorio Roblesfe6dccb2014-11-28 13:12:14 +020079fragment and MUST conform to the shell requirements, specifically no
Sean M. Collins09e550c2014-10-21 11:40:08 -040080whitespace around ``=`` (equals).
81
Ian Wienand7cd16ce2016-04-08 09:40:56 +100082openrc
83======
84
85``openrc`` configures login credentials suitable for use with the
86OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the
87beginning (which in turn sources the ``localrc`` section of
88``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST``
89to use in the endpoints. The values shown below are the default values.
90
91OS\_PROJECT\_NAME (OS\_TENANT\_NAME)
92 Keystone has
93 standardized the term *project* as the entity that owns resources. In
94 some places references still exist to the previous term
95 *tenant* for this use. Also, *project\_name* is preferred to
96 *project\_id*. OS\_TENANT\_NAME remains supported for compatibility
97 with older tools.
98
99 ::
100
101 OS_PROJECT_NAME=demo
102
103OS\_USERNAME
104 In addition to the owning entity (project), OpenStack calls the entity
105 performing the action *user*.
106
107 ::
108
109 OS_USERNAME=demo
110
111OS\_PASSWORD
112 Keystone's default authentication requires a password be provided.
113 The usual cautions about putting passwords in environment variables
114 apply, for most DevStack uses this may be an acceptable tradeoff.
115
116 ::
117
118 OS_PASSWORD=secret
119
120HOST\_IP, SERVICE\_HOST
121 Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also
122 be used to specify the endpoint, which is convenient for some
123 ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the
124 ``localrc`` section.
125
126 ::
127
128 HOST_IP=127.0.0.1
129 SERVICE_HOST=$HOST_IP
130
131OS\_AUTH\_URL
132 Authenticating against an OpenStack cloud using Keystone returns a
133 *Token* and *Service Catalog*. The catalog contains the endpoints
134 for all services the user/tenant has access to - including Nova,
135 Glance, Keystone and Swift.
136
137 ::
138
139 OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0
140
141KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG
142 Set command-line client log level to ``DEBUG``. These are commented
143 out by default.
144
145 ::
146
147 # export KEYSTONECLIENT_DEBUG=1
148 # export NOVACLIENT_DEBUG=1
149
150
151
James Polley5f2eb6d2015-03-30 17:36:26 +1100152.. _minimal-configuration:
153
Sean M. Collins09e550c2014-10-21 11:40:08 -0400154Minimal Configuration
Sean Dague07d7e5b2014-11-17 07:10:14 -0500155=====================
Sean M. Collins09e550c2014-10-21 11:40:08 -0400156
157While ``stack.sh`` is happy to run without a ``localrc`` section in
158``local.conf``, devlife is better when there are a few minimal variables
159set. This is an example of a minimal configuration that touches the
160values that most often need to be set.
161
162- no logging
163- pre-set the passwords to prevent interactive prompts
164- move network ranges away from the local network (``FIXED_RANGE`` and
165 ``FLOATING_RANGE``, commented out below)
166- set the host IP if detection is unreliable (``HOST_IP``, commented
167 out below)
168
169::
170
171 [[local|localrc]]
Balagopal7ed812c2016-03-01 04:43:31 +0000172 ADMIN_PASSWORD=secret
Sean M. Collins09e550c2014-10-21 11:40:08 -0400173 DATABASE_PASSWORD=$ADMIN_PASSWORD
174 RABBIT_PASSWORD=$ADMIN_PASSWORD
175 SERVICE_PASSWORD=$ADMIN_PASSWORD
Sean M. Collins09e550c2014-10-21 11:40:08 -0400176 #FIXED_RANGE=172.31.1.0/24
177 #FLOATING_RANGE=192.168.20.0/25
178 #HOST_IP=10.3.4.5
179
180If the ``*_PASSWORD`` variables are not set here you will be prompted to
181enter values for them by ``stack.sh``.
182
183The network ranges must not overlap with any networks in use on the
184host. Overlap is not uncommon as RFC-1918 'private' ranges are commonly
185used for both the local networking and Nova's fixed and floating ranges.
186
187``HOST_IP`` is normally detected on the first run of ``stack.sh`` but
188often is indeterminate on later runs due to the IP being moved from an
Juan Antonio Osorio Roblesfe6dccb2014-11-28 13:12:14 +0200189Ethernet interface to a bridge on the host. Setting it here also makes it
Sean M. Collins09e550c2014-10-21 11:40:08 -0400190available for ``openrc`` to set ``OS_AUTH_URL``. ``HOST_IP`` is not set
191by default.
192
Brian Haley180f5eb2015-06-16 13:14:31 -0400193``HOST_IPV6`` is normally detected on the first run of ``stack.sh`` but
194will not be set if there is no IPv6 address on the default Ethernet interface.
195Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``.
196``HOST_IPV6`` is not set by default.
197
Ian Wienanda35391e2015-08-10 13:53:40 +1000198Historical Notes
199================
Ian Wienand7d5be292015-08-10 13:39:17 +1000200
Ian Wienanda35391e2015-08-10 13:53:40 +1000201Historically DevStack obtained all local configuration and
202customizations from a ``localrc`` file. In Oct 2013 the
203``local.conf`` configuration method was introduced (in `review 46768
204<https://review.openstack.org/#/c/46768/>`__) to simplify this
205process.
Ian Wienand7d5be292015-08-10 13:39:17 +1000206
Ian Wienand815db162015-08-06 10:25:45 +1000207Configuration Notes
208===================
209
210.. contents::
211 :local:
Sean M. Collins09e550c2014-10-21 11:40:08 -0400212
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000213Service Repos
214-------------
215
216The Git repositories used to check out the source for each service are
217controlled by a pair of variables set for each service. ``*_REPO``
218points to the repository and ``*_BRANCH`` selects which branch to
219check out. These may be overridden in ``local.conf`` to pull source
220from a different repo for testing, such as a Gerrit branch
221proposal. ``GIT_BASE`` points to the primary repository server.
222
223 ::
224
225 NOVA_REPO=$GIT_BASE/openstack/nova.git
226 NOVA_BRANCH=master
227
228To pull a branch directly from Gerrit, get the repo and branch from
229the Gerrit review page:
230
231 ::
232
233 git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD
234
235 The repo is the stanza following ``fetch`` and the branch is the
236 stanza following that:
237
238 ::
239
240 NOVA_REPO=https://review.openstack.org/p/openstack/nova
241 NOVA_BRANCH=refs/changes/50/5050/1
242
243
Sean Dague07d7e5b2014-11-17 07:10:14 -0500244Installation Directory
245----------------------
246
Ian Wienand815db162015-08-06 10:25:45 +1000247The DevStack install directory is set by the ``DEST`` variable. By
248default it is ``/opt/stack``.
249
250By setting it early in the ``localrc`` section you can reference it in
251later variables. It can be useful to set it even though it is not
252changed from the default value.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400253
254 ::
255
256 DEST=/opt/stack
257
Ian Wienand815db162015-08-06 10:25:45 +1000258Logging
259-------
260
261Enable Logging
262~~~~~~~~~~~~~~
263
264By default ``stack.sh`` output is only written to the console where it
265runs. It can be sent to a file in addition to the console by setting
266``LOGFILE`` to the fully-qualified name of the destination log file. A
267timestamp will be appended to the given filename for each run of
268``stack.sh``.
269
270 ::
271
272 LOGFILE=$DEST/logs/stack.sh.log
273
274Old log files are cleaned automatically if ``LOGDAYS`` is set to the
275number of days of old log files to keep.
276
277 ::
278
279 LOGDAYS=1
280
281The some of the project logs (Nova, Cinder, etc) will be colorized by
282default (if ``SYSLOG`` is not set below); this can be turned off by
283setting ``LOG_COLOR`` to ``False``.
284
285 ::
286
287 LOG_COLOR=False
288
289Logging the Service Output
290~~~~~~~~~~~~~~~~~~~~~~~~~~
291
292DevStack will log the ``stdout`` output of the services it starts.
293When using ``screen`` this logs the output in the screen windows to a
294file. Without ``screen`` this simply redirects stdout of the service
295process to a file in ``LOGDIR``.
296
297 ::
298
299 LOGDIR=$DEST/logs
300
Markus Zoellerc30657d2015-11-02 11:27:46 +0100301Note the use of ``DEST`` to locate the main install directory; this
302is why we suggest setting it in ``local.conf``.
Ian Wienand815db162015-08-06 10:25:45 +1000303
304Enabling Syslog
305~~~~~~~~~~~~~~~
306
307Logging all services to a single syslog can be convenient. Enable
308syslogging by setting ``SYSLOG`` to ``True``. If the destination log
309host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be used
yangyapeng01cf55a2015-10-29 13:21:29 -0400310to direct the message stream to the log host.
Ian Wienand815db162015-08-06 10:25:45 +1000311
312 ::
313
314 SYSLOG=True
315 SYSLOG_HOST=$HOST_IP
316 SYSLOG_PORT=516
317
Ian Wienand7d5be292015-08-10 13:39:17 +1000318
Ian Wienanda35391e2015-08-10 13:53:40 +1000319Example Logging Configuration
320~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
321
322For example, non-interactive installs probably wish to save output to
323a file, keep service logs and disable color in the stored files.
324
325 ::
326
327 [[local|localrc]]
328 DEST=/opt/stack/
329 LOGDIR=$DEST/logs
330 LOGFILE=$LOGDIR/stack.sh.log
331 LOG_COLOR=False
332
Ian Wienand7d5be292015-08-10 13:39:17 +1000333Database Backend
334----------------
335
336Multiple database backends are available. The available databases are defined
337in the lib/databases directory.
Markus Zoellerc30657d2015-11-02 11:27:46 +0100338``mysql`` is the default database, choose a different one by putting the
339following in the ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000340
341 ::
342
343 disable_service mysql
344 enable_service postgresql
345
Markus Zoellerc30657d2015-11-02 11:27:46 +0100346``mysql`` is the default database.
Ian Wienand7d5be292015-08-10 13:39:17 +1000347
348RPC Backend
349-----------
350
351Support for a RabbitMQ RPC backend is included. Additional RPC
352backends may be available via external plugins. Enabling or disabling
353RabbitMQ is handled via the usual service functions and
354``ENABLED_SERVICES``.
355
356Example disabling RabbitMQ in ``local.conf``:
357
358::
Markus Zoellerc30657d2015-11-02 11:27:46 +0100359
Ian Wienand7d5be292015-08-10 13:39:17 +1000360 disable_service rabbit
361
362
363Apache Frontend
364---------------
365
366The Apache web server can be enabled for wsgi services that support
367being deployed under HTTPD + mod_wsgi. By default, services that
368recommend running under HTTPD + mod_wsgi are deployed under Apache. To
369use an alternative deployment strategy (e.g. eventlet) for services
370that support an alternative to HTTPD + mod_wsgi set
371``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your
372``local.conf``.
373
374Each service that can be run under HTTPD + mod_wsgi also has an
375override toggle available that can be set in your ``local.conf``.
376
377Keystone is run under Apache with ``mod_wsgi`` by default.
378
379Example (Keystone)
380
381::
382
383 KEYSTONE_USE_MOD_WSGI="True"
384
385Example (Nova):
386
387::
388
389 NOVA_USE_MOD_WSGI="True"
390
391Example (Swift):
392
393::
394
395 SWIFT_USE_MOD_WSGI="True"
396
Oleksii Chuprykova6928102015-06-11 08:56:58 -0400397Example (Heat):
398
399::
400
401 HEAT_USE_MOD_WSGI="True"
402
Ian Wienand7d5be292015-08-10 13:39:17 +1000403
Anton Arefiev651cb1a2015-09-01 10:55:20 +0300404Example (Cinder):
405
406::
407
408 CINDER_USE_MOD_WSGI="True"
409
Ian Wienand7d5be292015-08-10 13:39:17 +1000410
Sean Dague07d7e5b2014-11-17 07:10:14 -0500411Libraries from Git
412------------------
413
Ian Wienand815db162015-08-06 10:25:45 +1000414By default devstack installs OpenStack server components from git,
415however it installs client libraries from released versions on pypi.
416This is appropriate if you are working on server development, but if
417you want to see how an unreleased version of the client affects the
418system you can have devstack install it from upstream, or from local
419git trees by specifying it in ``LIBS_FROM_GIT``. Multiple libraries
420can be specified as a comma separated list.
Sean Dague07d7e5b2014-11-17 07:10:14 -0500421
422 ::
423
424 LIBS_FROM_GIT=python-keystoneclient,oslo.config
425
Marc Koderer46f8cb72016-05-13 09:08:16 +0200426Setting the variable to ``ALL`` will activate the download for all
427libraries.
428
Dean Troyer5686dbc2015-03-09 14:27:51 -0500429Virtual Environments
430--------------------
431
Ian Wienand815db162015-08-06 10:25:45 +1000432Enable the use of Python virtual environments by setting ``USE_VENV``
433to ``True``. This will enable the creation of venvs for each project
434that is defined in the ``PROJECT_VENV`` array.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500435
Ian Wienand815db162015-08-06 10:25:45 +1000436Each entry in the ``PROJECT_VENV`` array contains the directory name
437of a venv to be used for the project. The array index is the project
438name. Multiple projects can use the same venv if desired.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500439
440 ::
441
442 PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
443
Ian Wienand815db162015-08-06 10:25:45 +1000444``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional
445packages to be installed into each venv. Often projects will not have
446certain packages listed in its ``requirements.txt`` file because they
447are 'optional' requirements, i.e. only needed for certain
448configurations. By default, the enabled databases will have their
449Python bindings added when they are enabled.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500450
Ian Wienand815db162015-08-06 10:25:45 +1000451 ::
Sean Dague07d7e5b2014-11-17 07:10:14 -0500452
Ian Wienand815db162015-08-06 10:25:45 +1000453 ADDITIONAL_VENV_PACKAGES="python-foo, python-bar"
Sean M. Collins09e550c2014-10-21 11:40:08 -0400454
Sean M. Collins09e550c2014-10-21 11:40:08 -0400455
456A clean install every time
Sean Dague07d7e5b2014-11-17 07:10:14 -0500457--------------------------
458
Ian Wienand815db162015-08-06 10:25:45 +1000459By default ``stack.sh`` only clones the project repos if they do not
460exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if
461``RECLONE`` is set to ``yes``. This avoids having to manually remove
462repos in order to get the current branch from ``$GIT_BASE``.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400463
464 ::
465
466 RECLONE=yes
467
Chris Dentebdd9ac2015-03-04 12:35:14 +0000468Upgrade packages installed by pip
469---------------------------------
470
Ian Wienand815db162015-08-06 10:25:45 +1000471By default ``stack.sh`` only installs Python packages if no version is
472currently installed or the current version does not match a specified
473requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing
474required Python packages will be upgraded to the most recent version
475that matches requirements.
Chris Dentebdd9ac2015-03-04 12:35:14 +0000476
477 ::
478
479 PIP_UPGRADE=True
480
John Huaa4693b52015-08-06 13:53:35 +0100481Guest Images
482------------
483
484Images provided in URLS via the comma-separated ``IMAGE_URLS``
485variable will be downloaded and uploaded to glance by DevStack.
486
487Default guest-images are predefined for each type of hypervisor and
488their testing-requirements in ``stack.sh``. Setting
489``DOWNLOAD_DEFAULT_IMAGES=False`` will prevent DevStack downloading
490these default images; in that case, you will want to populate
491``IMAGE_URLS`` with sufficient images to satisfy testing-requirements.
492
493 ::
494
495 DOWNLOAD_DEFAULT_IMAGES=False
496 IMAGE_URLS="http://foo.bar.com/image.qcow,"
497 IMAGE_URLS+="http://foo.bar.com/image2.qcow"
498
Rafael Folcof0131e12015-09-23 12:55:02 -0500499
500Instance Type
501-------------
502
503``DEFAULT_INSTANCE_TYPE`` can be used to configure the default instance
504type. When this parameter is not specified, Devstack creates additional
505micro & nano flavors for really small instances to run Tempest tests.
506
507For guests with larger memory requirements, ``DEFAULT_INSTANCE_TYPE``
508should be specified in the configuration file so Tempest selects the
509default flavors instead.
510
511KVM on Power with QEMU 2.4 requires 512 MB to load the firmware -
512`QEMU 2.4 - PowerPC <http://wiki.qemu.org/ChangeLog/2.4>`__ so users
513running instances on ppc64/ppc64le can choose one of the default
514created flavors as follows:
515
516 ::
517
518 DEFAULT_INSTANCE_TYPE=m1.tiny
519
520
John Davidge21529a52014-06-30 09:55:11 -0400521IP Version
Brian Haley180f5eb2015-06-16 13:14:31 -0400522----------
523
Clay Gerrard148d0e62016-09-01 02:38:06 -0700524``IP_VERSION`` can be used to configure Neutron to create either an
525IPv4, IPv6, or dual-stack self-service project data-network by with
Sean Daguedb48db12016-04-06 08:09:31 -0400526either ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6``
Clay Gerrard148d0e62016-09-01 02:38:06 -0700527respectively.
John Davidge21529a52014-06-30 09:55:11 -0400528
529 ::
530
Clay Gerrard148d0e62016-09-01 02:38:06 -0700531 IP_VERSION=4+6
John Davidge21529a52014-06-30 09:55:11 -0400532
Ian Wienand815db162015-08-06 10:25:45 +1000533The following optional variables can be used to alter the default IPv6
534behavior:
John Davidge21529a52014-06-30 09:55:11 -0400535
536 ::
537
538 IPV6_RA_MODE=slaac
539 IPV6_ADDRESS_MODE=slaac
540 FIXED_RANGE_V6=fd$IPV6_GLOBAL_ID::/64
541 IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1
542
Ian Wienand815db162015-08-06 10:25:45 +1000543*Note*: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` can be
544configured with any valid IPv6 prefix. The default values make use of
545an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193.
Brian Haley180f5eb2015-06-16 13:14:31 -0400546
Ian Wienand815db162015-08-06 10:25:45 +1000547Service Version
548~~~~~~~~~~~~~~~
549
550DevStack can enable service operation over either IPv4 or IPv6 by
551setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or
552``SERVICE_IP_VERSION=6`` respectively.
553
554When set to ``4`` devstack services will open listen sockets on
555``0.0.0.0`` and service endpoints will be registered using ``HOST_IP``
556as the address.
557
558When set to ``6`` devstack services will open listen sockets on ``::``
559and service endpoints will be registered using ``HOST_IPV6`` as the
560address.
561
562The default value for this setting is ``4``. Dual-mode support, for
563example ``4+6`` is not currently supported. ``HOST_IPV6`` can
564optionally be used to alter the default IPv6 address
Brian Haley180f5eb2015-06-16 13:14:31 -0400565
566 ::
567
568 HOST_IPV6=${some_local_ipv6_address}
John Davidge21529a52014-06-30 09:55:11 -0400569
Ian Wienand7d5be292015-08-10 13:39:17 +1000570Multi-node setup
571~~~~~~~~~~~~~~~~
Sean M. Collins09e550c2014-10-21 11:40:08 -0400572
Ian Wienand7d5be292015-08-10 13:39:17 +1000573See the :doc:`multi-node lab guide<guides/multinode-lab>`
Sean M. Collins09e550c2014-10-21 11:40:08 -0400574
Ian Wienand7d5be292015-08-10 13:39:17 +1000575Projects
576--------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400577
Ian Wienand7d5be292015-08-10 13:39:17 +1000578Neutron
579~~~~~~~
Sean M. Collins09e550c2014-10-21 11:40:08 -0400580
Ian Wienand7d5be292015-08-10 13:39:17 +1000581See the :doc:`neutron configuration guide<guides/neutron>` for
582details on configuration of Neutron
Sean M. Collins09e550c2014-10-21 11:40:08 -0400583
Sean M. Collins09e550c2014-10-21 11:40:08 -0400584
Ian Wienand7d5be292015-08-10 13:39:17 +1000585Swift
586~~~~~
587
588Swift is disabled by default. When enabled, it is configured with
589only one replica to avoid being IO/memory intensive on a small
590VM. When running with only one replica the account, container and
591object services will run directly in screen. The others services like
592replicator, updaters or auditor runs in background.
593
Markus Zoellerc30657d2015-11-02 11:27:46 +0100594If you would like to enable Swift you can add this to your ``localrc``
Ian Wienand7d5be292015-08-10 13:39:17 +1000595section:
596
597::
598
599 enable_service s-proxy s-object s-container s-account
600
601If you want a minimal Swift install with only Swift and Keystone you
Markus Zoellerc30657d2015-11-02 11:27:46 +0100602can have this instead in your ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000603
604::
605
606 disable_all_services
607 enable_service key mysql s-proxy s-object s-container s-account
608
609If you only want to do some testing of a real normal swift cluster
610with multiple replicas you can do so by customizing the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100611``SWIFT_REPLICAS`` in your ``localrc`` section (usually to 3).
Ian Wienand7d5be292015-08-10 13:39:17 +1000612
Christian Schwede91d22452016-04-12 10:53:46 +0200613You can manually override the ring building to use specific storage
614nodes, for example when you want to test a multinode environment. In
615this case you have to set a space-separated list of IPs in
616``SWIFT_STORAGE_IPS`` in your ``localrc`` section that should be used
617as Swift storage nodes.
618Please note that this does not create a multinode setup, it is only
619used when adding nodes to the Swift rings.
620
621::
622
623 SWIFT_STORAGE_IPS="192.168.1.10 192.168.1.11 192.168.1.12"
624
Ian Wienand7d5be292015-08-10 13:39:17 +1000625Swift S3
626++++++++
627
Markus Zoellerc30657d2015-11-02 11:27:46 +0100628If you are enabling ``swift3`` in ``ENABLED_SERVICES`` DevStack will
Ian Wienand7d5be292015-08-10 13:39:17 +1000629install the swift3 middleware emulation. Swift will be configured to
630act as a S3 endpoint for Keystone so effectively replacing the
Markus Zoellerc30657d2015-11-02 11:27:46 +0100631``nova-objectstore``.
Ian Wienand7d5be292015-08-10 13:39:17 +1000632
633Only Swift proxy server is launched in the screen session all other
Markus Zoellerc30657d2015-11-02 11:27:46 +0100634services are started in background and managed by ``swift-init`` tool.
Ian Wienand7d5be292015-08-10 13:39:17 +1000635
636Heat
637~~~~
638
Markus Zoellerc30657d2015-11-02 11:27:46 +0100639Heat is disabled by default (see ``stackrc`` file). To enable it
640explicitly you'll need the following settings in your ``localrc``
Ian Wienand7d5be292015-08-10 13:39:17 +1000641section
642
643::
644
645 enable_service heat h-api h-api-cfn h-api-cw h-eng
646
647Heat can also run in standalone mode, and be configured to orchestrate
648on an external OpenStack cloud. To launch only Heat in standalone mode
Markus Zoellerc30657d2015-11-02 11:27:46 +0100649you'll need the following settings in your ``localrc`` section
Ian Wienand7d5be292015-08-10 13:39:17 +1000650
651::
652
653 disable_all_services
654 enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng
655 HEAT_STANDALONE=True
656 KEYSTONE_SERVICE_HOST=...
657 KEYSTONE_AUTH_HOST=...
658
659Tempest
660~~~~~~~
661
662If tempest has been successfully configured, a basic set of smoke
663tests can be run as follows:
664
665::
666
667 $ cd /opt/stack/tempest
668 $ tox -efull tempest.scenario.test_network_basic_ops
669
670By default tempest is downloaded and the config file is generated, but the
671tempest package is not installed in the system's global site-packages (the
672package install includes installing dependences). So tempest won't run
673outside of tox. If you would like to install it add the following to your
674``localrc`` section:
675
676::
677
678 INSTALL_TEMPEST=True
679
680
681Xenserver
682~~~~~~~~~
683
684If you would like to use Xenserver as the hypervisor, please refer to
Markus Zoellerc30657d2015-11-02 11:27:46 +0100685the instructions in ``./tools/xen/README.md``.
Ian Wienand7d5be292015-08-10 13:39:17 +1000686
687Cells
688~~~~~
689
690`Cells <http://wiki.openstack.org/blueprint-nova-compute-cells>`__ is
691an alternative scaling option. To setup a cells environment add the
Markus Zoellerc30657d2015-11-02 11:27:46 +0100692following to your ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000693
694::
695
696 enable_service n-cell
697
698Be aware that there are some features currently missing in cells, one
699notable one being security groups. The exercises have been patched to
700disable functionality not supported by cells.
701
702Cinder
703~~~~~~
704
705The logical volume group used to hold the Cinder-managed volumes is
Jordan Pittierf5069f32016-11-08 12:10:12 +0100706set by ``VOLUME_GROUP_NAME``, the logical volume name prefix is set with
Ian Wienand7d5be292015-08-10 13:39:17 +1000707``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
708with ``VOLUME_BACKING_FILE_SIZE``.
709
710 ::
711
Jordan Pittierf5069f32016-11-08 12:10:12 +0100712 VOLUME_GROUP_NAME="stack-volumes"
Ian Wienand7d5be292015-08-10 13:39:17 +1000713 VOLUME_NAME_PREFIX="volume-"
714 VOLUME_BACKING_FILE_SIZE=10250M
715
716
717Keystone
718~~~~~~~~
719
720Multi-Region Setup
721++++++++++++++++++
722
723We want to setup two devstack (RegionOne and RegionTwo) with shared
724keystone (same users and services) and horizon. Keystone and Horizon
725will be located in RegionOne. Full spec is available at:
726`<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__.
727
728In RegionOne:
729
730::
731
732 REGION_NAME=RegionOne
733
734In RegionTwo:
735
736::
henriquetrutaf2126222016-01-05 13:43:18 -0300737
Ian Wienand7d5be292015-08-10 13:39:17 +1000738 disable_service horizon
739 KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
740 KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
741 REGION_NAME=RegionTwo
zhiyuan_cai6f1781f2016-04-07 18:36:46 +0800742 KEYSTONE_REGION_NAME=RegionOne
743
744In the devstack for RegionOne, we set REGION_NAME as RegionOne, so region of
745the services started in this devstack are registered as RegionOne. In devstack
746for RegionTwo, similarly, we set REGION_NAME as RegionTwo since we want
747services started in this devstack to be registered in RegionTwo. But Keystone
748service is started and registered in RegionOne, not RegionTwo, so we use
749KEYSTONE_REGION_NAME to specify the region of Keystone service.
750KEYSTONE_REGION_NAME has a default value the same as REGION_NAME thus we omit
751it in the configuration of RegionOne.
henriquetrutaf2126222016-01-05 13:43:18 -0300752
753Disabling Identity API v2
754+++++++++++++++++++++++++
755
756The Identity API v2 is deprecated as of Mitaka and it is recommended to only
757use the v3 API. It is possible to setup keystone without v2 API, by doing:
758
759::
760
761 ENABLE_IDENTITY_V2=False
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000762
763Exercises
764~~~~~~~~~
765
766``exerciserc`` is used to configure settings for the exercise scripts.
767The values shown below are the default values. These can all be
768overridden by setting them in the ``localrc`` section.
769
770* Max time to wait while vm goes from build to active state
771
772 ::
773
774 ACTIVE_TIMEOUT==30
775
776* Max time to wait for proper IP association and dis-association.
777
778 ::
779
780 ASSOCIATE_TIMEOUT=15
781
782* Max time till the vm is bootable
783
784 ::
785
786 BOOT_TIMEOUT=30
787
788* Max time from run instance command until it is running
789
790 ::
791
792 RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))
793
794* Max time to wait for a vm to terminate
795
796 ::
797
798 TERMINATE_TIMEOUT=30