blob: 1d02395058e9b31881f7a6c8a3e3023d029094a1 [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]]
Kevin Benton4bfbc292016-11-15 17:26:05 -080066 IPV4_ADDRS_SAFE_TO_USE=10.254.1.0/24
Sean M. Collins09e550c2014-10-21 11:40:08 -040067 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
Le Houc09eaf82017-08-28 17:25:38 +0800139 OS_AUTH_URL=http://$SERVICE_HOST:5000/v3.0
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000140
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
Kevin Benton4bfbc292016-11-15 17:26:05 -0800164- move network ranges away from the local network (``IPV4_ADDRS_SAFE_TO_USE``
165 and ``FLOATING_RANGE``, commented out below)
Sean M. Collins09e550c2014-10-21 11:40:08 -0400166- 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
Kevin Benton4bfbc292016-11-15 17:26:05 -0800176 #IPV4_ADDRS_SAFE_TO_USE=172.31.1.0/24
Sean M. Collins09e550c2014-10-21 11:40:08 -0400177 #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
Markus Zoeller14728c72017-05-29 15:39:21 +0200198For architecture specific configurations which differ from the x86 default
199here, see `arch-configuration`_.
200
Ian Wienanda35391e2015-08-10 13:53:40 +1000201Historical Notes
202================
Ian Wienand7d5be292015-08-10 13:39:17 +1000203
Ian Wienanda35391e2015-08-10 13:53:40 +1000204Historically DevStack obtained all local configuration and
205customizations from a ``localrc`` file. In Oct 2013 the
206``local.conf`` configuration method was introduced (in `review 46768
207<https://review.openstack.org/#/c/46768/>`__) to simplify this
208process.
Ian Wienand7d5be292015-08-10 13:39:17 +1000209
Ian Wienand815db162015-08-06 10:25:45 +1000210Configuration Notes
211===================
212
213.. contents::
214 :local:
Sean M. Collins09e550c2014-10-21 11:40:08 -0400215
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000216Service Repos
217-------------
218
219The Git repositories used to check out the source for each service are
220controlled by a pair of variables set for each service. ``*_REPO``
221points to the repository and ``*_BRANCH`` selects which branch to
222check out. These may be overridden in ``local.conf`` to pull source
223from a different repo for testing, such as a Gerrit branch
224proposal. ``GIT_BASE`` points to the primary repository server.
225
226 ::
227
228 NOVA_REPO=$GIT_BASE/openstack/nova.git
229 NOVA_BRANCH=master
230
231To pull a branch directly from Gerrit, get the repo and branch from
232the Gerrit review page:
233
234 ::
235
236 git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD
237
238 The repo is the stanza following ``fetch`` and the branch is the
239 stanza following that:
240
241 ::
242
243 NOVA_REPO=https://review.openstack.org/p/openstack/nova
244 NOVA_BRANCH=refs/changes/50/5050/1
245
246
Sean Dague07d7e5b2014-11-17 07:10:14 -0500247Installation Directory
248----------------------
249
Ian Wienand815db162015-08-06 10:25:45 +1000250The DevStack install directory is set by the ``DEST`` variable. By
251default it is ``/opt/stack``.
252
253By setting it early in the ``localrc`` section you can reference it in
254later variables. It can be useful to set it even though it is not
255changed from the default value.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400256
257 ::
258
259 DEST=/opt/stack
260
Ian Wienand815db162015-08-06 10:25:45 +1000261Logging
262-------
263
264Enable Logging
265~~~~~~~~~~~~~~
266
267By default ``stack.sh`` output is only written to the console where it
268runs. It can be sent to a file in addition to the console by setting
269``LOGFILE`` to the fully-qualified name of the destination log file. A
270timestamp will be appended to the given filename for each run of
271``stack.sh``.
272
273 ::
274
275 LOGFILE=$DEST/logs/stack.sh.log
276
277Old log files are cleaned automatically if ``LOGDAYS`` is set to the
278number of days of old log files to keep.
279
280 ::
281
282 LOGDAYS=1
283
Sean Dague8b8441f2017-05-02 06:14:11 -0400284Some coloring is used during the DevStack runs to make it easier to
285see what is going on. This can be disabled with::
Ian Wienand815db162015-08-06 10:25:45 +1000286
287 LOG_COLOR=False
288
Ian Wienand83ecb972018-02-06 10:03:34 +1100289When using the logfile, by default logs are sent to the console and
290the file. You can set ``VERBOSE`` to ``false`` if you only wish the
291logs to be sent to the file (this may avoid having double-logging in
292some cases where you are capturing the script output and the log
293files). If ``VERBOSE`` is ``true`` you can additionally set
294``VERBOSE_NO_TIMESTAMP`` to avoid timestamps being added to each
295output line sent to the console. This can be useful in some
296situations where the console output is being captured by a runner or
297framework (e.g. Ansible) that adds its own timestamps. Note that the
298log lines sent to the ``LOGFILE`` will still be prefixed with a
299timestamp.
300
Ian Wienand815db162015-08-06 10:25:45 +1000301Logging the Service Output
302~~~~~~~~~~~~~~~~~~~~~~~~~~
303
Sean Dague8b8441f2017-05-02 06:14:11 -0400304By default, services run under ``systemd`` and are natively logging to
305the systemd journal.
Ian Wienand815db162015-08-06 10:25:45 +1000306
Sean Dague8b8441f2017-05-02 06:14:11 -0400307To query the logs use the ``journalctl`` command, such as::
Ian Wienand815db162015-08-06 10:25:45 +1000308
caowei32eccca2017-11-01 11:45:21 +0800309 sudo journalctl --unit devstack@*
Ian Wienand815db162015-08-06 10:25:45 +1000310
Sean Dague8b8441f2017-05-02 06:14:11 -0400311More examples can be found in :ref:`journalctl-examples`.
Ian Wienand7d5be292015-08-10 13:39:17 +1000312
Ian Wienanda35391e2015-08-10 13:53:40 +1000313Example Logging Configuration
314~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315
316For example, non-interactive installs probably wish to save output to
317a file, keep service logs and disable color in the stored files.
318
319 ::
320
321 [[local|localrc]]
322 DEST=/opt/stack/
Ian Wienanda35391e2015-08-10 13:53:40 +1000323 LOGFILE=$LOGDIR/stack.sh.log
324 LOG_COLOR=False
325
Ian Wienand7d5be292015-08-10 13:39:17 +1000326Database Backend
327----------------
328
329Multiple database backends are available. The available databases are defined
330in the lib/databases directory.
Markus Zoellerc30657d2015-11-02 11:27:46 +0100331``mysql`` is the default database, choose a different one by putting the
332following in the ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000333
334 ::
335
336 disable_service mysql
337 enable_service postgresql
338
Markus Zoellerc30657d2015-11-02 11:27:46 +0100339``mysql`` is the default database.
Ian Wienand7d5be292015-08-10 13:39:17 +1000340
341RPC Backend
342-----------
343
344Support for a RabbitMQ RPC backend is included. Additional RPC
345backends may be available via external plugins. Enabling or disabling
346RabbitMQ is handled via the usual service functions and
347``ENABLED_SERVICES``.
348
349Example disabling RabbitMQ in ``local.conf``:
350
351::
Markus Zoellerc30657d2015-11-02 11:27:46 +0100352
Ian Wienand7d5be292015-08-10 13:39:17 +1000353 disable_service rabbit
354
355
356Apache Frontend
357---------------
358
359The Apache web server can be enabled for wsgi services that support
360being deployed under HTTPD + mod_wsgi. By default, services that
361recommend running under HTTPD + mod_wsgi are deployed under Apache. To
362use an alternative deployment strategy (e.g. eventlet) for services
363that support an alternative to HTTPD + mod_wsgi set
364``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your
365``local.conf``.
366
367Each service that can be run under HTTPD + mod_wsgi also has an
368override toggle available that can be set in your ``local.conf``.
369
370Keystone is run under Apache with ``mod_wsgi`` by default.
371
372Example (Keystone)
373
374::
375
376 KEYSTONE_USE_MOD_WSGI="True"
377
378Example (Nova):
379
380::
381
382 NOVA_USE_MOD_WSGI="True"
383
384Example (Swift):
385
386::
387
388 SWIFT_USE_MOD_WSGI="True"
389
Oleksii Chuprykova6928102015-06-11 08:56:58 -0400390Example (Heat):
391
392::
393
394 HEAT_USE_MOD_WSGI="True"
395
Ian Wienand7d5be292015-08-10 13:39:17 +1000396
Anton Arefiev651cb1a2015-09-01 10:55:20 +0300397Example (Cinder):
398
399::
400
401 CINDER_USE_MOD_WSGI="True"
402
Ian Wienand7d5be292015-08-10 13:39:17 +1000403
Sean Dague07d7e5b2014-11-17 07:10:14 -0500404Libraries from Git
405------------------
406
Ian Wienand815db162015-08-06 10:25:45 +1000407By default devstack installs OpenStack server components from git,
408however it installs client libraries from released versions on pypi.
409This is appropriate if you are working on server development, but if
410you want to see how an unreleased version of the client affects the
411system you can have devstack install it from upstream, or from local
412git trees by specifying it in ``LIBS_FROM_GIT``. Multiple libraries
413can be specified as a comma separated list.
Sean Dague07d7e5b2014-11-17 07:10:14 -0500414
415 ::
416
417 LIBS_FROM_GIT=python-keystoneclient,oslo.config
418
Marc Koderer46f8cb72016-05-13 09:08:16 +0200419Setting the variable to ``ALL`` will activate the download for all
420libraries.
421
Dean Troyer5686dbc2015-03-09 14:27:51 -0500422Virtual Environments
423--------------------
424
Ian Wienand815db162015-08-06 10:25:45 +1000425Enable the use of Python virtual environments by setting ``USE_VENV``
426to ``True``. This will enable the creation of venvs for each project
427that is defined in the ``PROJECT_VENV`` array.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500428
Ian Wienand815db162015-08-06 10:25:45 +1000429Each entry in the ``PROJECT_VENV`` array contains the directory name
430of a venv to be used for the project. The array index is the project
431name. Multiple projects can use the same venv if desired.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500432
433 ::
434
435 PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
436
Ian Wienand815db162015-08-06 10:25:45 +1000437``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional
438packages to be installed into each venv. Often projects will not have
439certain packages listed in its ``requirements.txt`` file because they
440are 'optional' requirements, i.e. only needed for certain
441configurations. By default, the enabled databases will have their
442Python bindings added when they are enabled.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500443
Ian Wienand815db162015-08-06 10:25:45 +1000444 ::
Sean Dague07d7e5b2014-11-17 07:10:14 -0500445
Ian Wienand815db162015-08-06 10:25:45 +1000446 ADDITIONAL_VENV_PACKAGES="python-foo, python-bar"
Sean M. Collins09e550c2014-10-21 11:40:08 -0400447
Sean M. Collins09e550c2014-10-21 11:40:08 -0400448
449A clean install every time
Sean Dague07d7e5b2014-11-17 07:10:14 -0500450--------------------------
451
Ian Wienand815db162015-08-06 10:25:45 +1000452By default ``stack.sh`` only clones the project repos if they do not
453exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if
454``RECLONE`` is set to ``yes``. This avoids having to manually remove
455repos in order to get the current branch from ``$GIT_BASE``.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400456
457 ::
458
459 RECLONE=yes
460
Chris Dentebdd9ac2015-03-04 12:35:14 +0000461Upgrade packages installed by pip
462---------------------------------
463
Ian Wienand815db162015-08-06 10:25:45 +1000464By default ``stack.sh`` only installs Python packages if no version is
465currently installed or the current version does not match a specified
466requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing
467required Python packages will be upgraded to the most recent version
468that matches requirements.
Chris Dentebdd9ac2015-03-04 12:35:14 +0000469
470 ::
471
472 PIP_UPGRADE=True
473
John Huaa4693b52015-08-06 13:53:35 +0100474Guest Images
475------------
476
477Images provided in URLS via the comma-separated ``IMAGE_URLS``
478variable will be downloaded and uploaded to glance by DevStack.
479
480Default guest-images are predefined for each type of hypervisor and
481their testing-requirements in ``stack.sh``. Setting
482``DOWNLOAD_DEFAULT_IMAGES=False`` will prevent DevStack downloading
483these default images; in that case, you will want to populate
484``IMAGE_URLS`` with sufficient images to satisfy testing-requirements.
485
486 ::
487
488 DOWNLOAD_DEFAULT_IMAGES=False
489 IMAGE_URLS="http://foo.bar.com/image.qcow,"
490 IMAGE_URLS+="http://foo.bar.com/image2.qcow"
491
Rafael Folcof0131e12015-09-23 12:55:02 -0500492
493Instance Type
494-------------
495
496``DEFAULT_INSTANCE_TYPE`` can be used to configure the default instance
497type. When this parameter is not specified, Devstack creates additional
498micro & nano flavors for really small instances to run Tempest tests.
499
500For guests with larger memory requirements, ``DEFAULT_INSTANCE_TYPE``
501should be specified in the configuration file so Tempest selects the
502default flavors instead.
503
504KVM on Power with QEMU 2.4 requires 512 MB to load the firmware -
505`QEMU 2.4 - PowerPC <http://wiki.qemu.org/ChangeLog/2.4>`__ so users
506running instances on ppc64/ppc64le can choose one of the default
507created flavors as follows:
508
509 ::
510
511 DEFAULT_INSTANCE_TYPE=m1.tiny
512
513
John Davidge21529a52014-06-30 09:55:11 -0400514IP Version
Brian Haley180f5eb2015-06-16 13:14:31 -0400515----------
516
Clay Gerrard148d0e62016-09-01 02:38:06 -0700517``IP_VERSION`` can be used to configure Neutron to create either an
518IPv4, IPv6, or dual-stack self-service project data-network by with
Sean Daguedb48db12016-04-06 08:09:31 -0400519either ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6``
Clay Gerrard148d0e62016-09-01 02:38:06 -0700520respectively.
John Davidge21529a52014-06-30 09:55:11 -0400521
522 ::
523
Clay Gerrard148d0e62016-09-01 02:38:06 -0700524 IP_VERSION=4+6
John Davidge21529a52014-06-30 09:55:11 -0400525
Ian Wienand815db162015-08-06 10:25:45 +1000526The following optional variables can be used to alter the default IPv6
527behavior:
John Davidge21529a52014-06-30 09:55:11 -0400528
529 ::
530
531 IPV6_RA_MODE=slaac
532 IPV6_ADDRESS_MODE=slaac
Kevin Benton4bfbc292016-11-15 17:26:05 -0800533 IPV6_ADDRS_SAFE_TO_USE=fd$IPV6_GLOBAL_ID::/56
John Davidge21529a52014-06-30 09:55:11 -0400534 IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1
535
Kevin Benton4bfbc292016-11-15 17:26:05 -0800536*Note*: ``IPV6_ADDRS_SAFE_TO_USE`` and ``IPV6_PRIVATE_NETWORK_GATEWAY``
537can be configured with any valid IPv6 prefix. The default values make
538use of an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193.
Brian Haley180f5eb2015-06-16 13:14:31 -0400539
Ian Wienand815db162015-08-06 10:25:45 +1000540Service Version
541~~~~~~~~~~~~~~~
542
543DevStack can enable service operation over either IPv4 or IPv6 by
544setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or
545``SERVICE_IP_VERSION=6`` respectively.
546
547When set to ``4`` devstack services will open listen sockets on
548``0.0.0.0`` and service endpoints will be registered using ``HOST_IP``
549as the address.
550
551When set to ``6`` devstack services will open listen sockets on ``::``
552and service endpoints will be registered using ``HOST_IPV6`` as the
553address.
554
555The default value for this setting is ``4``. Dual-mode support, for
556example ``4+6`` is not currently supported. ``HOST_IPV6`` can
557optionally be used to alter the default IPv6 address
Brian Haley180f5eb2015-06-16 13:14:31 -0400558
559 ::
560
561 HOST_IPV6=${some_local_ipv6_address}
John Davidge21529a52014-06-30 09:55:11 -0400562
Ian Wienand7d5be292015-08-10 13:39:17 +1000563Multi-node setup
564~~~~~~~~~~~~~~~~
Sean M. Collins09e550c2014-10-21 11:40:08 -0400565
Ian Wienand7d5be292015-08-10 13:39:17 +1000566See the :doc:`multi-node lab guide<guides/multinode-lab>`
Sean M. Collins09e550c2014-10-21 11:40:08 -0400567
Ian Wienand7d5be292015-08-10 13:39:17 +1000568Projects
569--------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400570
Ian Wienand7d5be292015-08-10 13:39:17 +1000571Neutron
572~~~~~~~
Sean M. Collins09e550c2014-10-21 11:40:08 -0400573
Ian Wienand7d5be292015-08-10 13:39:17 +1000574See the :doc:`neutron configuration guide<guides/neutron>` for
575details on configuration of Neutron
Sean M. Collins09e550c2014-10-21 11:40:08 -0400576
Sean M. Collins09e550c2014-10-21 11:40:08 -0400577
Ian Wienand7d5be292015-08-10 13:39:17 +1000578Swift
579~~~~~
580
581Swift is disabled by default. When enabled, it is configured with
582only one replica to avoid being IO/memory intensive on a small
Sean Dague8b8441f2017-05-02 06:14:11 -0400583VM.
Ian Wienand7d5be292015-08-10 13:39:17 +1000584
Markus Zoellerc30657d2015-11-02 11:27:46 +0100585If you would like to enable Swift you can add this to your ``localrc``
Ian Wienand7d5be292015-08-10 13:39:17 +1000586section:
587
588::
589
590 enable_service s-proxy s-object s-container s-account
591
592If you want a minimal Swift install with only Swift and Keystone you
Markus Zoellerc30657d2015-11-02 11:27:46 +0100593can have this instead in your ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000594
595::
596
597 disable_all_services
598 enable_service key mysql s-proxy s-object s-container s-account
599
600If you only want to do some testing of a real normal swift cluster
601with multiple replicas you can do so by customizing the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100602``SWIFT_REPLICAS`` in your ``localrc`` section (usually to 3).
Ian Wienand7d5be292015-08-10 13:39:17 +1000603
Christian Schwede91d22452016-04-12 10:53:46 +0200604You can manually override the ring building to use specific storage
605nodes, for example when you want to test a multinode environment. In
606this case you have to set a space-separated list of IPs in
607``SWIFT_STORAGE_IPS`` in your ``localrc`` section that should be used
608as Swift storage nodes.
609Please note that this does not create a multinode setup, it is only
610used when adding nodes to the Swift rings.
611
612::
613
614 SWIFT_STORAGE_IPS="192.168.1.10 192.168.1.11 192.168.1.12"
615
Ian Wienand7d5be292015-08-10 13:39:17 +1000616Swift S3
617++++++++
618
Markus Zoellerc30657d2015-11-02 11:27:46 +0100619If you are enabling ``swift3`` in ``ENABLED_SERVICES`` DevStack will
Ian Wienand7d5be292015-08-10 13:39:17 +1000620install the swift3 middleware emulation. Swift will be configured to
621act as a S3 endpoint for Keystone so effectively replacing the
Markus Zoellerc30657d2015-11-02 11:27:46 +0100622``nova-objectstore``.
Ian Wienand7d5be292015-08-10 13:39:17 +1000623
Sean Dague8b8441f2017-05-02 06:14:11 -0400624Only Swift proxy server is launched in the systemd system all other
Markus Zoellerc30657d2015-11-02 11:27:46 +0100625services are started in background and managed by ``swift-init`` tool.
Ian Wienand7d5be292015-08-10 13:39:17 +1000626
Ian Wienand7d5be292015-08-10 13:39:17 +1000627Tempest
628~~~~~~~
629
630If tempest has been successfully configured, a basic set of smoke
631tests can be run as follows:
632
633::
634
635 $ cd /opt/stack/tempest
636 $ tox -efull tempest.scenario.test_network_basic_ops
637
638By default tempest is downloaded and the config file is generated, but the
639tempest package is not installed in the system's global site-packages (the
640package install includes installing dependences). So tempest won't run
641outside of tox. If you would like to install it add the following to your
642``localrc`` section:
643
644::
645
646 INSTALL_TEMPEST=True
647
648
649Xenserver
650~~~~~~~~~
651
652If you would like to use Xenserver as the hypervisor, please refer to
Markus Zoellerc30657d2015-11-02 11:27:46 +0100653the instructions in ``./tools/xen/README.md``.
Ian Wienand7d5be292015-08-10 13:39:17 +1000654
655Cells
656~~~~~
657
658`Cells <http://wiki.openstack.org/blueprint-nova-compute-cells>`__ is
659an alternative scaling option. To setup a cells environment add the
Markus Zoellerc30657d2015-11-02 11:27:46 +0100660following to your ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000661
662::
663
664 enable_service n-cell
665
666Be aware that there are some features currently missing in cells, one
667notable one being security groups. The exercises have been patched to
668disable functionality not supported by cells.
669
670Cinder
671~~~~~~
672
673The logical volume group used to hold the Cinder-managed volumes is
Jordan Pittierf5069f32016-11-08 12:10:12 +0100674set by ``VOLUME_GROUP_NAME``, the logical volume name prefix is set with
Ian Wienand7d5be292015-08-10 13:39:17 +1000675``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
676with ``VOLUME_BACKING_FILE_SIZE``.
677
678 ::
679
Jordan Pittierf5069f32016-11-08 12:10:12 +0100680 VOLUME_GROUP_NAME="stack-volumes"
Ian Wienand7d5be292015-08-10 13:39:17 +1000681 VOLUME_NAME_PREFIX="volume-"
Peter Penchev6bcd8ca2018-01-12 23:49:04 +0200682 VOLUME_BACKING_FILE_SIZE=24G
Ian Wienand7d5be292015-08-10 13:39:17 +1000683
684
685Keystone
686~~~~~~~~
687
688Multi-Region Setup
689++++++++++++++++++
690
691We want to setup two devstack (RegionOne and RegionTwo) with shared
692keystone (same users and services) and horizon. Keystone and Horizon
693will be located in RegionOne. Full spec is available at:
694`<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__.
695
696In RegionOne:
697
698::
699
700 REGION_NAME=RegionOne
701
702In RegionTwo:
703
704::
henriquetrutaf2126222016-01-05 13:43:18 -0300705
Ian Wienand7d5be292015-08-10 13:39:17 +1000706 disable_service horizon
707 KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
708 KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
709 REGION_NAME=RegionTwo
zhiyuan_cai6f1781f2016-04-07 18:36:46 +0800710 KEYSTONE_REGION_NAME=RegionOne
711
712In the devstack for RegionOne, we set REGION_NAME as RegionOne, so region of
713the services started in this devstack are registered as RegionOne. In devstack
714for RegionTwo, similarly, we set REGION_NAME as RegionTwo since we want
715services started in this devstack to be registered in RegionTwo. But Keystone
716service is started and registered in RegionOne, not RegionTwo, so we use
717KEYSTONE_REGION_NAME to specify the region of Keystone service.
718KEYSTONE_REGION_NAME has a default value the same as REGION_NAME thus we omit
719it in the configuration of RegionOne.
henriquetrutaf2126222016-01-05 13:43:18 -0300720
721Disabling Identity API v2
722+++++++++++++++++++++++++
723
724The Identity API v2 is deprecated as of Mitaka and it is recommended to only
725use the v3 API. It is possible to setup keystone without v2 API, by doing:
726
727::
728
729 ENABLE_IDENTITY_V2=False
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000730
731Exercises
732~~~~~~~~~
733
734``exerciserc`` is used to configure settings for the exercise scripts.
735The values shown below are the default values. These can all be
736overridden by setting them in the ``localrc`` section.
737
738* Max time to wait while vm goes from build to active state
739
740 ::
741
742 ACTIVE_TIMEOUT==30
743
744* Max time to wait for proper IP association and dis-association.
745
746 ::
747
748 ASSOCIATE_TIMEOUT=15
749
750* Max time till the vm is bootable
751
752 ::
753
754 BOOT_TIMEOUT=30
755
756* Max time from run instance command until it is running
757
758 ::
759
760 RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))
761
762* Max time to wait for a vm to terminate
763
764 ::
765
766 TERMINATE_TIMEOUT=30
Markus Zoeller14728c72017-05-29 15:39:21 +0200767
768
769.. _arch-configuration:
770
771Architectures
772-------------
773
774The upstream CI runs exclusively on nodes with x86 architectures, but
775OpenStack supports even more architectures. Some of them need to configure
776Devstack in a certain way.
777
778KVM on s390x (IBM z Systems)
779~~~~~~~~~~~~~~~~~~~~~~~~~~~~
780
781KVM on s390x (IBM z Systems) is supported since the *Kilo* release. For
782an all-in-one setup, these minimal settings in the ``local.conf`` file
783are needed::
784
785 [[local|localrc]]
786 ADMIN_PASSWORD=secret
787 DATABASE_PASSWORD=$ADMIN_PASSWORD
788 RABBIT_PASSWORD=$ADMIN_PASSWORD
789 SERVICE_PASSWORD=$ADMIN_PASSWORD
790
791 DOWNLOAD_DEFAULT_IMAGES=False
792 IMAGE_URLS="https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-s390x-disk1.img"
793
Andreas Scheuring941940a2017-09-13 00:24:02 +0200794 # Provide a custom etcd3 binary download URL and ints sha256.
795 # The binary must be located under '/<etcd version>/etcd-<etcd-version>-linux-s390x.tar.gz'
796 # on this URL.
797 # Build instructions for etcd3: https://github.com/linux-on-ibm-z/docs/wiki/Building-etcd
798 ETCD_DOWNLOAD_URL=<your-etcd-download-url>
799 ETCD_SHA256=<your-etcd3-sha256>
800
Markus Zoeller14728c72017-05-29 15:39:21 +0200801 enable_service n-sproxy
802 disable_service n-novnc
Markus Zoeller14728c72017-05-29 15:39:21 +0200803
804 [[post-config|$NOVA_CONF]]
805
806 [serial_console]
807 base_url=ws://$HOST_IP:6083/ # optional
808
809Reasoning:
810
811* The default image of Devstack is x86 only, so we deactivate the download
812 with ``DOWNLOAD_DEFAULT_IMAGES``. The referenced guest image
813 in the code above (``IMAGE_URLS``) serves as an example. The list of
814 possible s390x guest images is not limited to that.
815
816* This platform doesn't support a graphical console like VNC or SPICE.
817 The technical reason is the missing framebuffer on the platform. This
818 means we rely on the substitute feature *serial console* which needs the
819 proxy service ``n-sproxy``. We also disable VNC's proxy ``n-novnc`` for
820 that reason . The configuration in the ``post-config`` section is only
821 needed if you want to use the *serial console* outside of the all-in-one
822 setup.
823
Andreas Scheuring941940a2017-09-13 00:24:02 +0200824* A link to an etcd3 binary and its sha256 needs to be provided as the
825 binary for s390x is not hosted on github like it is for other
826 architectures. For more details see
827 https://bugs.launchpad.net/devstack/+bug/1693192. Etcd3 can easily be
828 built along https://github.com/linux-on-ibm-z/docs/wiki/Building-etcd.
Markus Zoeller14728c72017-05-29 15:39:21 +0200829
830.. note:: To run *Tempest* against this *Devstack* all-in-one, you'll need
831 to use a guest image which is smaller than 1GB when uncompressed.
832 The example image from above is bigger than that!