blob: 384ceee41a55204aaa280f15b037eed752597a7a [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
39- **pre-install** - runs after the system packages are installed but
40 before any of the source repositories are installed
41- **install** - runs immediately after the repo installations are
42 complete
43- **post-config** - runs after the layer 2 services are configured and
44 before they are started
45- **extra** - runs after services are started and before any files in
46 ``extra.d`` are executed
YAMAMOTO Takashi961643e2015-07-31 13:45:27 +090047- **post-extra** - runs after files in ``extra.d`` are executed
Sean M. Collins09e550c2014-10-21 11:40:08 -040048
49The file is processed strictly in sequence; meta-sections may be
50specified more than once but if any settings are duplicated the last to
51appear in the file will be used.
52
53::
54
55 [[post-config|$NOVA_CONF]]
56 [DEFAULT]
57 use_syslog = True
58
59 [osapi_v3]
60 enabled = False
61
62A specific meta-section ``local|localrc`` is used to provide a default
63``localrc`` file (actually ``.localrc.auto``). This allows all custom
64settings for DevStack to be contained in a single file. If ``localrc``
Ian Wienand7cd16ce2016-04-08 09:40:56 +100065exists it will be used instead to preserve backward-compatibility.
Sean M. Collins09e550c2014-10-21 11:40:08 -040066
67::
68
69 [[local|localrc]]
70 FIXED_RANGE=10.254.1.0/24
71 ADMIN_PASSWORD=speciale
72 LOGFILE=$DEST/logs/stack.sh.log
73
74Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to
75*NOT* start with a ``/`` (slash) character. A slash will need to be
76added:
77
78::
79
80 [[post-config|/$Q_PLUGIN_CONF_FILE]]
81
82Also note that the ``localrc`` section is sourced as a shell script
Juan Antonio Osorio Roblesfe6dccb2014-11-28 13:12:14 +020083fragment and MUST conform to the shell requirements, specifically no
Sean M. Collins09e550c2014-10-21 11:40:08 -040084whitespace around ``=`` (equals).
85
Ian Wienand7cd16ce2016-04-08 09:40:56 +100086openrc
87======
88
89``openrc`` configures login credentials suitable for use with the
90OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the
91beginning (which in turn sources the ``localrc`` section of
92``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST``
93to use in the endpoints. The values shown below are the default values.
94
95OS\_PROJECT\_NAME (OS\_TENANT\_NAME)
96 Keystone has
97 standardized the term *project* as the entity that owns resources. In
98 some places references still exist to the previous term
99 *tenant* for this use. Also, *project\_name* is preferred to
100 *project\_id*. OS\_TENANT\_NAME remains supported for compatibility
101 with older tools.
102
103 ::
104
105 OS_PROJECT_NAME=demo
106
107OS\_USERNAME
108 In addition to the owning entity (project), OpenStack calls the entity
109 performing the action *user*.
110
111 ::
112
113 OS_USERNAME=demo
114
115OS\_PASSWORD
116 Keystone's default authentication requires a password be provided.
117 The usual cautions about putting passwords in environment variables
118 apply, for most DevStack uses this may be an acceptable tradeoff.
119
120 ::
121
122 OS_PASSWORD=secret
123
124HOST\_IP, SERVICE\_HOST
125 Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also
126 be used to specify the endpoint, which is convenient for some
127 ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the
128 ``localrc`` section.
129
130 ::
131
132 HOST_IP=127.0.0.1
133 SERVICE_HOST=$HOST_IP
134
135OS\_AUTH\_URL
136 Authenticating against an OpenStack cloud using Keystone returns a
137 *Token* and *Service Catalog*. The catalog contains the endpoints
138 for all services the user/tenant has access to - including Nova,
139 Glance, Keystone and Swift.
140
141 ::
142
143 OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0
144
145KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG
146 Set command-line client log level to ``DEBUG``. These are commented
147 out by default.
148
149 ::
150
151 # export KEYSTONECLIENT_DEBUG=1
152 # export NOVACLIENT_DEBUG=1
153
154
155
James Polley5f2eb6d2015-03-30 17:36:26 +1100156.. _minimal-configuration:
157
Sean M. Collins09e550c2014-10-21 11:40:08 -0400158Minimal Configuration
Sean Dague07d7e5b2014-11-17 07:10:14 -0500159=====================
Sean M. Collins09e550c2014-10-21 11:40:08 -0400160
161While ``stack.sh`` is happy to run without a ``localrc`` section in
162``local.conf``, devlife is better when there are a few minimal variables
163set. This is an example of a minimal configuration that touches the
164values that most often need to be set.
165
166- no logging
167- pre-set the passwords to prevent interactive prompts
168- move network ranges away from the local network (``FIXED_RANGE`` and
169 ``FLOATING_RANGE``, commented out below)
170- set the host IP if detection is unreliable (``HOST_IP``, commented
171 out below)
172
173::
174
175 [[local|localrc]]
Balagopal7ed812c2016-03-01 04:43:31 +0000176 ADMIN_PASSWORD=secret
Sean M. Collins09e550c2014-10-21 11:40:08 -0400177 DATABASE_PASSWORD=$ADMIN_PASSWORD
178 RABBIT_PASSWORD=$ADMIN_PASSWORD
179 SERVICE_PASSWORD=$ADMIN_PASSWORD
Sean M. Collins09e550c2014-10-21 11:40:08 -0400180 #FIXED_RANGE=172.31.1.0/24
181 #FLOATING_RANGE=192.168.20.0/25
182 #HOST_IP=10.3.4.5
183
184If the ``*_PASSWORD`` variables are not set here you will be prompted to
185enter values for them by ``stack.sh``.
186
187The network ranges must not overlap with any networks in use on the
188host. Overlap is not uncommon as RFC-1918 'private' ranges are commonly
189used for both the local networking and Nova's fixed and floating ranges.
190
191``HOST_IP`` is normally detected on the first run of ``stack.sh`` but
192often is indeterminate on later runs due to the IP being moved from an
Juan Antonio Osorio Roblesfe6dccb2014-11-28 13:12:14 +0200193Ethernet interface to a bridge on the host. Setting it here also makes it
Sean M. Collins09e550c2014-10-21 11:40:08 -0400194available for ``openrc`` to set ``OS_AUTH_URL``. ``HOST_IP`` is not set
195by default.
196
Brian Haley180f5eb2015-06-16 13:14:31 -0400197``HOST_IPV6`` is normally detected on the first run of ``stack.sh`` but
198will not be set if there is no IPv6 address on the default Ethernet interface.
199Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``.
200``HOST_IPV6`` is not set by default.
201
Ian Wienanda35391e2015-08-10 13:53:40 +1000202Historical Notes
203================
Ian Wienand7d5be292015-08-10 13:39:17 +1000204
Ian Wienanda35391e2015-08-10 13:53:40 +1000205Historically DevStack obtained all local configuration and
206customizations from a ``localrc`` file. In Oct 2013 the
207``local.conf`` configuration method was introduced (in `review 46768
208<https://review.openstack.org/#/c/46768/>`__) to simplify this
209process.
Ian Wienand7d5be292015-08-10 13:39:17 +1000210
Ian Wienand815db162015-08-06 10:25:45 +1000211Configuration Notes
212===================
213
214.. contents::
215 :local:
Sean M. Collins09e550c2014-10-21 11:40:08 -0400216
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000217Service Repos
218-------------
219
220The Git repositories used to check out the source for each service are
221controlled by a pair of variables set for each service. ``*_REPO``
222points to the repository and ``*_BRANCH`` selects which branch to
223check out. These may be overridden in ``local.conf`` to pull source
224from a different repo for testing, such as a Gerrit branch
225proposal. ``GIT_BASE`` points to the primary repository server.
226
227 ::
228
229 NOVA_REPO=$GIT_BASE/openstack/nova.git
230 NOVA_BRANCH=master
231
232To pull a branch directly from Gerrit, get the repo and branch from
233the Gerrit review page:
234
235 ::
236
237 git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD
238
239 The repo is the stanza following ``fetch`` and the branch is the
240 stanza following that:
241
242 ::
243
244 NOVA_REPO=https://review.openstack.org/p/openstack/nova
245 NOVA_BRANCH=refs/changes/50/5050/1
246
247
Sean Dague07d7e5b2014-11-17 07:10:14 -0500248Installation Directory
249----------------------
250
Ian Wienand815db162015-08-06 10:25:45 +1000251The DevStack install directory is set by the ``DEST`` variable. By
252default it is ``/opt/stack``.
253
254By setting it early in the ``localrc`` section you can reference it in
255later variables. It can be useful to set it even though it is not
256changed from the default value.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400257
258 ::
259
260 DEST=/opt/stack
261
Ian Wienand815db162015-08-06 10:25:45 +1000262Logging
263-------
264
265Enable Logging
266~~~~~~~~~~~~~~
267
268By default ``stack.sh`` output is only written to the console where it
269runs. It can be sent to a file in addition to the console by setting
270``LOGFILE`` to the fully-qualified name of the destination log file. A
271timestamp will be appended to the given filename for each run of
272``stack.sh``.
273
274 ::
275
276 LOGFILE=$DEST/logs/stack.sh.log
277
278Old log files are cleaned automatically if ``LOGDAYS`` is set to the
279number of days of old log files to keep.
280
281 ::
282
283 LOGDAYS=1
284
285The some of the project logs (Nova, Cinder, etc) will be colorized by
286default (if ``SYSLOG`` is not set below); this can be turned off by
287setting ``LOG_COLOR`` to ``False``.
288
289 ::
290
291 LOG_COLOR=False
292
293Logging the Service Output
294~~~~~~~~~~~~~~~~~~~~~~~~~~
295
296DevStack will log the ``stdout`` output of the services it starts.
297When using ``screen`` this logs the output in the screen windows to a
298file. Without ``screen`` this simply redirects stdout of the service
299process to a file in ``LOGDIR``.
300
301 ::
302
303 LOGDIR=$DEST/logs
304
Markus Zoellerc30657d2015-11-02 11:27:46 +0100305Note the use of ``DEST`` to locate the main install directory; this
306is why we suggest setting it in ``local.conf``.
Ian Wienand815db162015-08-06 10:25:45 +1000307
308Enabling Syslog
309~~~~~~~~~~~~~~~
310
311Logging all services to a single syslog can be convenient. Enable
312syslogging by setting ``SYSLOG`` to ``True``. If the destination log
313host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be used
yangyapeng01cf55a2015-10-29 13:21:29 -0400314to direct the message stream to the log host.
Ian Wienand815db162015-08-06 10:25:45 +1000315
316 ::
317
318 SYSLOG=True
319 SYSLOG_HOST=$HOST_IP
320 SYSLOG_PORT=516
321
Ian Wienand7d5be292015-08-10 13:39:17 +1000322
Ian Wienanda35391e2015-08-10 13:53:40 +1000323Example Logging Configuration
324~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325
326For example, non-interactive installs probably wish to save output to
327a file, keep service logs and disable color in the stored files.
328
329 ::
330
331 [[local|localrc]]
332 DEST=/opt/stack/
333 LOGDIR=$DEST/logs
334 LOGFILE=$LOGDIR/stack.sh.log
335 LOG_COLOR=False
336
Ian Wienand7d5be292015-08-10 13:39:17 +1000337Database Backend
338----------------
339
340Multiple database backends are available. The available databases are defined
341in the lib/databases directory.
Markus Zoellerc30657d2015-11-02 11:27:46 +0100342``mysql`` is the default database, choose a different one by putting the
343following in the ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000344
345 ::
346
347 disable_service mysql
348 enable_service postgresql
349
Markus Zoellerc30657d2015-11-02 11:27:46 +0100350``mysql`` is the default database.
Ian Wienand7d5be292015-08-10 13:39:17 +1000351
352RPC Backend
353-----------
354
355Support for a RabbitMQ RPC backend is included. Additional RPC
356backends may be available via external plugins. Enabling or disabling
357RabbitMQ is handled via the usual service functions and
358``ENABLED_SERVICES``.
359
360Example disabling RabbitMQ in ``local.conf``:
361
362::
Markus Zoellerc30657d2015-11-02 11:27:46 +0100363
Ian Wienand7d5be292015-08-10 13:39:17 +1000364 disable_service rabbit
365
366
367Apache Frontend
368---------------
369
370The Apache web server can be enabled for wsgi services that support
371being deployed under HTTPD + mod_wsgi. By default, services that
372recommend running under HTTPD + mod_wsgi are deployed under Apache. To
373use an alternative deployment strategy (e.g. eventlet) for services
374that support an alternative to HTTPD + mod_wsgi set
375``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your
376``local.conf``.
377
378Each service that can be run under HTTPD + mod_wsgi also has an
379override toggle available that can be set in your ``local.conf``.
380
381Keystone is run under Apache with ``mod_wsgi`` by default.
382
383Example (Keystone)
384
385::
386
387 KEYSTONE_USE_MOD_WSGI="True"
388
389Example (Nova):
390
391::
392
393 NOVA_USE_MOD_WSGI="True"
394
395Example (Swift):
396
397::
398
399 SWIFT_USE_MOD_WSGI="True"
400
Oleksii Chuprykova6928102015-06-11 08:56:58 -0400401Example (Heat):
402
403::
404
405 HEAT_USE_MOD_WSGI="True"
406
Ian Wienand7d5be292015-08-10 13:39:17 +1000407
Anton Arefiev651cb1a2015-09-01 10:55:20 +0300408Example (Cinder):
409
410::
411
412 CINDER_USE_MOD_WSGI="True"
413
Ian Wienand7d5be292015-08-10 13:39:17 +1000414
Sean Dague07d7e5b2014-11-17 07:10:14 -0500415Libraries from Git
416------------------
417
Ian Wienand815db162015-08-06 10:25:45 +1000418By default devstack installs OpenStack server components from git,
419however it installs client libraries from released versions on pypi.
420This is appropriate if you are working on server development, but if
421you want to see how an unreleased version of the client affects the
422system you can have devstack install it from upstream, or from local
423git trees by specifying it in ``LIBS_FROM_GIT``. Multiple libraries
424can be specified as a comma separated list.
Sean Dague07d7e5b2014-11-17 07:10:14 -0500425
426 ::
427
428 LIBS_FROM_GIT=python-keystoneclient,oslo.config
429
Marc Koderer46f8cb72016-05-13 09:08:16 +0200430Setting the variable to ``ALL`` will activate the download for all
431libraries.
432
Dean Troyer5686dbc2015-03-09 14:27:51 -0500433Virtual Environments
434--------------------
435
Ian Wienand815db162015-08-06 10:25:45 +1000436Enable the use of Python virtual environments by setting ``USE_VENV``
437to ``True``. This will enable the creation of venvs for each project
438that is defined in the ``PROJECT_VENV`` array.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500439
Ian Wienand815db162015-08-06 10:25:45 +1000440Each entry in the ``PROJECT_VENV`` array contains the directory name
441of a venv to be used for the project. The array index is the project
442name. Multiple projects can use the same venv if desired.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500443
444 ::
445
446 PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
447
Ian Wienand815db162015-08-06 10:25:45 +1000448``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional
449packages to be installed into each venv. Often projects will not have
450certain packages listed in its ``requirements.txt`` file because they
451are 'optional' requirements, i.e. only needed for certain
452configurations. By default, the enabled databases will have their
453Python bindings added when they are enabled.
Dean Troyer5686dbc2015-03-09 14:27:51 -0500454
Ian Wienand815db162015-08-06 10:25:45 +1000455 ::
Sean Dague07d7e5b2014-11-17 07:10:14 -0500456
Ian Wienand815db162015-08-06 10:25:45 +1000457 ADDITIONAL_VENV_PACKAGES="python-foo, python-bar"
Sean M. Collins09e550c2014-10-21 11:40:08 -0400458
Sean M. Collins09e550c2014-10-21 11:40:08 -0400459
460A clean install every time
Sean Dague07d7e5b2014-11-17 07:10:14 -0500461--------------------------
462
Ian Wienand815db162015-08-06 10:25:45 +1000463By default ``stack.sh`` only clones the project repos if they do not
464exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if
465``RECLONE`` is set to ``yes``. This avoids having to manually remove
466repos in order to get the current branch from ``$GIT_BASE``.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400467
468 ::
469
470 RECLONE=yes
471
Chris Dentebdd9ac2015-03-04 12:35:14 +0000472Upgrade packages installed by pip
473---------------------------------
474
Ian Wienand815db162015-08-06 10:25:45 +1000475By default ``stack.sh`` only installs Python packages if no version is
476currently installed or the current version does not match a specified
477requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing
478required Python packages will be upgraded to the most recent version
479that matches requirements.
Chris Dentebdd9ac2015-03-04 12:35:14 +0000480
481 ::
482
483 PIP_UPGRADE=True
484
John Huaa4693b52015-08-06 13:53:35 +0100485Guest Images
486------------
487
488Images provided in URLS via the comma-separated ``IMAGE_URLS``
489variable will be downloaded and uploaded to glance by DevStack.
490
491Default guest-images are predefined for each type of hypervisor and
492their testing-requirements in ``stack.sh``. Setting
493``DOWNLOAD_DEFAULT_IMAGES=False`` will prevent DevStack downloading
494these default images; in that case, you will want to populate
495``IMAGE_URLS`` with sufficient images to satisfy testing-requirements.
496
497 ::
498
499 DOWNLOAD_DEFAULT_IMAGES=False
500 IMAGE_URLS="http://foo.bar.com/image.qcow,"
501 IMAGE_URLS+="http://foo.bar.com/image2.qcow"
502
Rafael Folcof0131e12015-09-23 12:55:02 -0500503
504Instance Type
505-------------
506
507``DEFAULT_INSTANCE_TYPE`` can be used to configure the default instance
508type. When this parameter is not specified, Devstack creates additional
509micro & nano flavors for really small instances to run Tempest tests.
510
511For guests with larger memory requirements, ``DEFAULT_INSTANCE_TYPE``
512should be specified in the configuration file so Tempest selects the
513default flavors instead.
514
515KVM on Power with QEMU 2.4 requires 512 MB to load the firmware -
516`QEMU 2.4 - PowerPC <http://wiki.qemu.org/ChangeLog/2.4>`__ so users
517running instances on ppc64/ppc64le can choose one of the default
518created flavors as follows:
519
520 ::
521
522 DEFAULT_INSTANCE_TYPE=m1.tiny
523
524
John Davidge21529a52014-06-30 09:55:11 -0400525IP Version
Brian Haley180f5eb2015-06-16 13:14:31 -0400526----------
527
Ian Wienand815db162015-08-06 10:25:45 +1000528``IP_VERSION`` can be used to configure DevStack to create either an
Sean Daguedb48db12016-04-06 08:09:31 -0400529IPv4, IPv6, or dual-stack self service project data-network by with
530either ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6``
Ian Wienand815db162015-08-06 10:25:45 +1000531respectively. This functionality requires that the Neutron networking
532service is enabled by setting the following options:
John Davidge21529a52014-06-30 09:55:11 -0400533
534 ::
535
536 disable_service n-net
537 enable_service q-svc q-agt q-dhcp q-l3
538
Ian Wienand815db162015-08-06 10:25:45 +1000539The following optional variables can be used to alter the default IPv6
540behavior:
John Davidge21529a52014-06-30 09:55:11 -0400541
542 ::
543
544 IPV6_RA_MODE=slaac
545 IPV6_ADDRESS_MODE=slaac
546 FIXED_RANGE_V6=fd$IPV6_GLOBAL_ID::/64
547 IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1
548
Ian Wienand815db162015-08-06 10:25:45 +1000549*Note*: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` can be
550configured with any valid IPv6 prefix. The default values make use of
551an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193.
Brian Haley180f5eb2015-06-16 13:14:31 -0400552
Ian Wienand815db162015-08-06 10:25:45 +1000553Service Version
554~~~~~~~~~~~~~~~
555
556DevStack can enable service operation over either IPv4 or IPv6 by
557setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or
558``SERVICE_IP_VERSION=6`` respectively.
559
560When set to ``4`` devstack services will open listen sockets on
561``0.0.0.0`` and service endpoints will be registered using ``HOST_IP``
562as the address.
563
564When set to ``6`` devstack services will open listen sockets on ``::``
565and service endpoints will be registered using ``HOST_IPV6`` as the
566address.
567
568The default value for this setting is ``4``. Dual-mode support, for
569example ``4+6`` is not currently supported. ``HOST_IPV6`` can
570optionally be used to alter the default IPv6 address
Brian Haley180f5eb2015-06-16 13:14:31 -0400571
572 ::
573
574 HOST_IPV6=${some_local_ipv6_address}
John Davidge21529a52014-06-30 09:55:11 -0400575
Ian Wienand7d5be292015-08-10 13:39:17 +1000576Multi-node setup
577~~~~~~~~~~~~~~~~
Sean M. Collins09e550c2014-10-21 11:40:08 -0400578
Ian Wienand7d5be292015-08-10 13:39:17 +1000579See the :doc:`multi-node lab guide<guides/multinode-lab>`
Sean M. Collins09e550c2014-10-21 11:40:08 -0400580
Ian Wienand7d5be292015-08-10 13:39:17 +1000581Projects
582--------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400583
Ian Wienand7d5be292015-08-10 13:39:17 +1000584Neutron
585~~~~~~~
Sean M. Collins09e550c2014-10-21 11:40:08 -0400586
Ian Wienand7d5be292015-08-10 13:39:17 +1000587See the :doc:`neutron configuration guide<guides/neutron>` for
588details on configuration of Neutron
Sean M. Collins09e550c2014-10-21 11:40:08 -0400589
Sean M. Collins09e550c2014-10-21 11:40:08 -0400590
Ian Wienand7d5be292015-08-10 13:39:17 +1000591Swift
592~~~~~
593
594Swift is disabled by default. When enabled, it is configured with
595only one replica to avoid being IO/memory intensive on a small
596VM. When running with only one replica the account, container and
597object services will run directly in screen. The others services like
598replicator, updaters or auditor runs in background.
599
Markus Zoellerc30657d2015-11-02 11:27:46 +0100600If you would like to enable Swift you can add this to your ``localrc``
Ian Wienand7d5be292015-08-10 13:39:17 +1000601section:
602
603::
604
605 enable_service s-proxy s-object s-container s-account
606
607If you want a minimal Swift install with only Swift and Keystone you
Markus Zoellerc30657d2015-11-02 11:27:46 +0100608can have this instead in your ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000609
610::
611
612 disable_all_services
613 enable_service key mysql s-proxy s-object s-container s-account
614
615If you only want to do some testing of a real normal swift cluster
616with multiple replicas you can do so by customizing the variable
Markus Zoellerc30657d2015-11-02 11:27:46 +0100617``SWIFT_REPLICAS`` in your ``localrc`` section (usually to 3).
Ian Wienand7d5be292015-08-10 13:39:17 +1000618
Christian Schwede91d22452016-04-12 10:53:46 +0200619You can manually override the ring building to use specific storage
620nodes, for example when you want to test a multinode environment. In
621this case you have to set a space-separated list of IPs in
622``SWIFT_STORAGE_IPS`` in your ``localrc`` section that should be used
623as Swift storage nodes.
624Please note that this does not create a multinode setup, it is only
625used when adding nodes to the Swift rings.
626
627::
628
629 SWIFT_STORAGE_IPS="192.168.1.10 192.168.1.11 192.168.1.12"
630
Ian Wienand7d5be292015-08-10 13:39:17 +1000631Swift S3
632++++++++
633
Markus Zoellerc30657d2015-11-02 11:27:46 +0100634If you are enabling ``swift3`` in ``ENABLED_SERVICES`` DevStack will
Ian Wienand7d5be292015-08-10 13:39:17 +1000635install the swift3 middleware emulation. Swift will be configured to
636act as a S3 endpoint for Keystone so effectively replacing the
Markus Zoellerc30657d2015-11-02 11:27:46 +0100637``nova-objectstore``.
Ian Wienand7d5be292015-08-10 13:39:17 +1000638
639Only Swift proxy server is launched in the screen session all other
Markus Zoellerc30657d2015-11-02 11:27:46 +0100640services are started in background and managed by ``swift-init`` tool.
Ian Wienand7d5be292015-08-10 13:39:17 +1000641
642Heat
643~~~~
644
Markus Zoellerc30657d2015-11-02 11:27:46 +0100645Heat is disabled by default (see ``stackrc`` file). To enable it
646explicitly you'll need the following settings in your ``localrc``
Ian Wienand7d5be292015-08-10 13:39:17 +1000647section
648
649::
650
651 enable_service heat h-api h-api-cfn h-api-cw h-eng
652
653Heat can also run in standalone mode, and be configured to orchestrate
654on an external OpenStack cloud. To launch only Heat in standalone mode
Markus Zoellerc30657d2015-11-02 11:27:46 +0100655you'll need the following settings in your ``localrc`` section
Ian Wienand7d5be292015-08-10 13:39:17 +1000656
657::
658
659 disable_all_services
660 enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng
661 HEAT_STANDALONE=True
662 KEYSTONE_SERVICE_HOST=...
663 KEYSTONE_AUTH_HOST=...
664
665Tempest
666~~~~~~~
667
668If tempest has been successfully configured, a basic set of smoke
669tests can be run as follows:
670
671::
672
673 $ cd /opt/stack/tempest
674 $ tox -efull tempest.scenario.test_network_basic_ops
675
676By default tempest is downloaded and the config file is generated, but the
677tempest package is not installed in the system's global site-packages (the
678package install includes installing dependences). So tempest won't run
679outside of tox. If you would like to install it add the following to your
680``localrc`` section:
681
682::
683
684 INSTALL_TEMPEST=True
685
686
687Xenserver
688~~~~~~~~~
689
690If you would like to use Xenserver as the hypervisor, please refer to
Markus Zoellerc30657d2015-11-02 11:27:46 +0100691the instructions in ``./tools/xen/README.md``.
Ian Wienand7d5be292015-08-10 13:39:17 +1000692
693Cells
694~~~~~
695
696`Cells <http://wiki.openstack.org/blueprint-nova-compute-cells>`__ is
697an alternative scaling option. To setup a cells environment add the
Markus Zoellerc30657d2015-11-02 11:27:46 +0100698following to your ``localrc`` section:
Ian Wienand7d5be292015-08-10 13:39:17 +1000699
700::
701
702 enable_service n-cell
703
704Be aware that there are some features currently missing in cells, one
705notable one being security groups. The exercises have been patched to
706disable functionality not supported by cells.
707
708Cinder
709~~~~~~
710
711The logical volume group used to hold the Cinder-managed volumes is
712set by ``VOLUME_GROUP``, the logical volume name prefix is set with
713``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
714with ``VOLUME_BACKING_FILE_SIZE``.
715
716 ::
717
718 VOLUME_GROUP="stack-volumes"
719 VOLUME_NAME_PREFIX="volume-"
720 VOLUME_BACKING_FILE_SIZE=10250M
721
722
723Keystone
724~~~~~~~~
725
726Multi-Region Setup
727++++++++++++++++++
728
729We want to setup two devstack (RegionOne and RegionTwo) with shared
730keystone (same users and services) and horizon. Keystone and Horizon
731will be located in RegionOne. Full spec is available at:
732`<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__.
733
734In RegionOne:
735
736::
737
738 REGION_NAME=RegionOne
739
740In RegionTwo:
741
742::
henriquetrutaf2126222016-01-05 13:43:18 -0300743
Ian Wienand7d5be292015-08-10 13:39:17 +1000744 disable_service horizon
745 KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
746 KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
747 REGION_NAME=RegionTwo
zhiyuan_cai6f1781f2016-04-07 18:36:46 +0800748 KEYSTONE_REGION_NAME=RegionOne
749
750In the devstack for RegionOne, we set REGION_NAME as RegionOne, so region of
751the services started in this devstack are registered as RegionOne. In devstack
752for RegionTwo, similarly, we set REGION_NAME as RegionTwo since we want
753services started in this devstack to be registered in RegionTwo. But Keystone
754service is started and registered in RegionOne, not RegionTwo, so we use
755KEYSTONE_REGION_NAME to specify the region of Keystone service.
756KEYSTONE_REGION_NAME has a default value the same as REGION_NAME thus we omit
757it in the configuration of RegionOne.
henriquetrutaf2126222016-01-05 13:43:18 -0300758
759Disabling Identity API v2
760+++++++++++++++++++++++++
761
762The Identity API v2 is deprecated as of Mitaka and it is recommended to only
763use the v3 API. It is possible to setup keystone without v2 API, by doing:
764
765::
766
767 ENABLE_IDENTITY_V2=False
Ian Wienand7cd16ce2016-04-08 09:40:56 +1000768
769Exercises
770~~~~~~~~~
771
772``exerciserc`` is used to configure settings for the exercise scripts.
773The values shown below are the default values. These can all be
774overridden by setting them in the ``localrc`` section.
775
776* Max time to wait while vm goes from build to active state
777
778 ::
779
780 ACTIVE_TIMEOUT==30
781
782* Max time to wait for proper IP association and dis-association.
783
784 ::
785
786 ASSOCIATE_TIMEOUT=15
787
788* Max time till the vm is bootable
789
790 ::
791
792 BOOT_TIMEOUT=30
793
794* Max time from run instance command until it is running
795
796 ::
797
798 RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))
799
800* Max time to wait for a vm to terminate
801
802 ::
803
804 TERMINATE_TIMEOUT=30