Skip to content

Commit 7d5be29

Browse files
committed
Move configuration notes into configuration guide
We have configuration information split between the README.md and configuration documentation. A lot of it is duplicated and it shows little organisation. This clears the README.md of detailed configuration options and consolidates it into the existing configuration guide. When someone first hits the README they don't need details on changing the RPC back-end; but more importantly this indicates clearly where we should be adding or clarifying details. Firstly, the detailed overview of local.conf is removed; it was duplicated in the configuration guide. This is left as a first-level section of that guide. The configuration notes are divided into generic devstack things (logging, database-backend, etc) and then the rest of the notes on various projects' configuration options have been moved into a dedicated sub-section "Projects". Each project gets its own sub-sub-section. Duplicated swift guides is consolidated into the single "Swift section". The neutron and multi-node nodes, which were all duplicated in their more specific dedicated guides are removed and replaced with links to those. Other sections are moved directly. Change-Id: Ib0bac56d82be870fe99c47c53fda674d8668b968
1 parent 4ebfea9 commit 7d5be29

2 files changed

Lines changed: 255 additions & 441 deletions

File tree

README.md

Lines changed: 7 additions & 338 deletions
Original file line numberDiff line numberDiff line change
@@ -93,345 +93,14 @@ for example).
9393

9494
# Customizing
9595

96-
You can override environment variables used in `stack.sh` by creating file
97-
name `local.conf` with a ``localrc`` section as shown below. It is likely
98-
that you will need to do this to tweak your networking configuration should
99-
you need to access your cloud from a different host.
96+
You can override environment variables used in `stack.sh` by creating
97+
file name `local.conf` with a ``localrc`` section as shown below. It
98+
is likely that you will need to do this to tweak several settings for
99+
your environment.
100100

101101
[[local|localrc]]
102102
VARIABLE=value
103103

104-
See the **Local Configuration** section below for more details.
105-
106-
# Database Backend
107-
108-
Multiple database backends are available. The available databases are defined
109-
in the lib/databases directory.
110-
`mysql` is the default database, choose a different one by putting the
111-
following in the `localrc` section:
112-
113-
disable_service mysql
114-
enable_service postgresql
115-
116-
`mysql` is the default database.
117-
118-
# RPC Backend
119-
120-
Support for a RabbitMQ RPC backend is included. Additional RPC backends may
121-
be available via external plugins. Enabling or disabling RabbitMQ is handled
122-
via the usual service functions and ``ENABLED_SERVICES``.
123-
124-
Example disabling RabbitMQ in ``local.conf``:
125-
126-
disable_service rabbit
127-
128-
# Apache Frontend
129-
130-
Apache web server can be enabled for wsgi services that support being deployed
131-
under HTTPD + mod_wsgi. By default, services that recommend running under
132-
HTTPD + mod_wsgi are deployed under Apache. To use an alternative deployment
133-
strategy (e.g. eventlet) for services that support an alternative to HTTPD +
134-
mod_wsgi set ``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your
135-
``local.conf``.
136-
137-
Each service that can be run under HTTPD + mod_wsgi also has an override
138-
toggle available that can be set in your ``local.conf``.
139-
140-
Keystone is run under HTTPD + mod_wsgi by default.
141-
142-
Example (Keystone):
143-
144-
KEYSTONE_USE_MOD_WSGI="True"
145-
146-
Example (Nova):
147-
148-
NOVA_USE_MOD_WSGI="True"
149-
150-
Example (Swift):
151-
152-
SWIFT_USE_MOD_WSGI="True"
153-
154-
# Swift
155-
156-
Swift is disabled by default. When enabled, it is configured with
157-
only one replica to avoid being IO/memory intensive on a small
158-
vm. When running with only one replica the account, container and
159-
object services will run directly in screen. The others services like
160-
replicator, updaters or auditor runs in background.
161-
162-
If you would like to enable Swift you can add this to your `localrc` section:
163-
164-
enable_service s-proxy s-object s-container s-account
165-
166-
If you want a minimal Swift install with only Swift and Keystone you
167-
can have this instead in your `localrc` section:
168-
169-
disable_all_services
170-
enable_service key mysql s-proxy s-object s-container s-account
171-
172-
If you only want to do some testing of a real normal swift cluster
173-
with multiple replicas you can do so by customizing the variable
174-
`SWIFT_REPLICAS` in your `localrc` section (usually to 3).
175-
176-
# Swift S3
177-
178-
If you are enabling `swift3` in `ENABLED_SERVICES` DevStack will
179-
install the swift3 middleware emulation. Swift will be configured to
180-
act as a S3 endpoint for Keystone so effectively replacing the
181-
`nova-objectstore`.
182-
183-
Only Swift proxy server is launched in the screen session all other
184-
services are started in background and managed by `swift-init` tool.
185-
186-
# Neutron
187-
188-
Basic Setup
189-
190-
In order to enable Neutron in a single node setup, you'll need the
191-
following settings in your `local.conf`:
192-
193-
disable_service n-net
194-
enable_service q-svc
195-
enable_service q-agt
196-
enable_service q-dhcp
197-
enable_service q-l3
198-
enable_service q-meta
199-
enable_service q-metering
200-
201-
Then run `stack.sh` as normal.
202-
203-
DevStack supports setting specific Neutron configuration flags to the
204-
service, ML2 plugin, DHCP and L3 configuration files:
205-
206-
[[post-config|/$Q_PLUGIN_CONF_FILE]]
207-
[ml2]
208-
mechanism_drivers=openvswitch,l2population
209-
210-
[[post-config|$NEUTRON_CONF]]
211-
[DEFAULT]
212-
quota_port=42
213-
214-
[[post-config|$Q_L3_CONF_FILE]]
215-
[DEFAULT]
216-
agent_mode=legacy
217-
218-
[[post-config|$Q_DHCP_CONF_FILE]]
219-
[DEFAULT]
220-
dnsmasq_dns_servers = 8.8.8.8,8.8.4.4
221-
222-
The ML2 plugin can run with the OVS, LinuxBridge, or Hyper-V agents on compute
223-
hosts. This is a simple way to configure the ml2 plugin:
224-
225-
# VLAN configuration
226-
ENABLE_TENANT_VLANS=True
227-
228-
# GRE tunnel configuration
229-
ENABLE_TENANT_TUNNELS=True
230-
231-
# VXLAN tunnel configuration
232-
Q_ML2_TENANT_NETWORK_TYPE=vxlan
233-
234-
The above will default in DevStack to using the OVS on each compute host.
235-
To change this, set the `Q_AGENT` variable to the agent you want to run
236-
(e.g. linuxbridge).
237-
238-
Variable Name Notes
239-
----------------------------------------------------------------------------
240-
Q_AGENT This specifies which agent to run with the
241-
ML2 Plugin (Typically either `openvswitch`
242-
or `linuxbridge`).
243-
Defaults to `openvswitch`.
244-
Q_ML2_PLUGIN_MECHANISM_DRIVERS The ML2 MechanismDrivers to load. The default
245-
is `openvswitch,linuxbridge`.
246-
Q_ML2_PLUGIN_TYPE_DRIVERS The ML2 TypeDrivers to load. Defaults to
247-
all available TypeDrivers.
248-
Q_ML2_PLUGIN_GRE_TYPE_OPTIONS GRE TypeDriver options. Defaults to
249-
`tunnel_id_ranges=1:1000'.
250-
Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS VXLAN TypeDriver options. Defaults to
251-
`vni_ranges=1001:2000`
252-
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS VLAN TypeDriver options. Defaults to none.
253-
254-
# Heat
255-
256-
Heat is disabled by default (see `stackrc` file). To enable it explicitly
257-
you'll need the following settings in your `localrc` section:
258-
259-
enable_service heat h-api h-api-cfn h-api-cw h-eng
260-
261-
Heat can also run in standalone mode, and be configured to orchestrate
262-
on an external OpenStack cloud. To launch only Heat in standalone mode
263-
you'll need the following settings in your `localrc` section:
264-
265-
disable_all_services
266-
enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng
267-
HEAT_STANDALONE=True
268-
KEYSTONE_SERVICE_HOST=...
269-
KEYSTONE_AUTH_HOST=...
270-
271-
# Tempest
272-
273-
If tempest has been successfully configured, a basic set of smoke
274-
tests can be run as follows:
275-
276-
$ cd /opt/stack/tempest
277-
$ tox -efull tempest.scenario.test_network_basic_ops
278-
279-
By default tempest is downloaded and the config file is generated, but the
280-
tempest package is not installed in the system's global site-packages (the
281-
package install includes installing dependences). So tempest won't run
282-
outside of tox. If you would like to install it add the following to your
283-
``localrc`` section:
284-
285-
INSTALL_TEMPEST=True
286-
287-
# DevStack on Xenserver
288-
289-
If you would like to use Xenserver as the hypervisor, please refer
290-
to the instructions in `./tools/xen/README.md`.
291-
292-
# Additional Projects
293-
294-
DevStack has a hook mechanism to call out to a dispatch script at specific
295-
points in the execution of `stack.sh`, `unstack.sh` and `clean.sh`. This
296-
allows upper-layer projects, especially those that the lower layer projects
297-
have no dependency on, to be added to DevStack without modifying the core
298-
scripts. Tempest is built this way as an example of how to structure the
299-
dispatch script, see `extras.d/80-tempest.sh`. See `extras.d/README.md`
300-
for more information.
301-
302-
# Multi-Node Setup
303-
304-
A more interesting setup involves running multiple compute nodes, with Neutron
305-
networks connecting VMs on different compute nodes.
306-
You should run at least one "controller node", which should have a `stackrc`
307-
that includes at least:
308-
309-
disable_service n-net
310-
enable_service q-svc
311-
enable_service q-agt
312-
enable_service q-dhcp
313-
enable_service q-l3
314-
enable_service q-meta
315-
enable_service neutron
316-
317-
You likely want to change your `localrc` section to run a scheduler that
318-
will balance VMs across hosts:
319-
320-
SCHEDULER=nova.scheduler.filter_scheduler.FilterScheduler
321-
322-
You can then run many compute nodes, each of which should have a `stackrc`
323-
which includes the following, with the IP address of the above controller node:
324-
325-
ENABLED_SERVICES=n-cpu,rabbit,neutron,q-agt
326-
SERVICE_HOST=[IP of controller node]
327-
MYSQL_HOST=$SERVICE_HOST
328-
RABBIT_HOST=$SERVICE_HOST
329-
Q_HOST=$SERVICE_HOST
330-
MATCHMAKER_REDIS_HOST=$SERVICE_HOST
331-
332-
# Multi-Region Setup
333-
334-
We want to setup two devstack (RegionOne and RegionTwo) with shared keystone
335-
(same users and services) and horizon.
336-
Keystone and Horizon will be located in RegionOne.
337-
Full spec is available at:
338-
https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat.
339-
340-
In RegionOne:
341-
342-
REGION_NAME=RegionOne
343-
344-
In RegionTwo:
345-
346-
disable_service horizon
347-
KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
348-
KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
349-
REGION_NAME=RegionTwo
350-
351-
# Cells
352-
353-
Cells is a new scaling option with a full spec at:
354-
http://wiki.openstack.org/blueprint-nova-compute-cells.
355-
356-
To setup a cells environment add the following to your `localrc` section:
357-
358-
enable_service n-cell
359-
360-
Be aware that there are some features currently missing in cells, one notable
361-
one being security groups. The exercises have been patched to disable
362-
functionality not supported by cells.
363-
364-
# IPv6
365-
366-
By default, most Openstack services are bound to 0.0.0.0
367-
and service endpoints are registered as IPv4 addresses.
368-
A new variable was created to control this behavior, and to
369-
allow for operation over IPv6 instead of IPv4.
370-
371-
For this, add the following to `local.conf`:
372-
373-
SERVICE_IP_VERSION=6
374-
375-
When set to "6" devstack services will open listen sockets on ::
376-
and service endpoints will be registered using HOST_IPV6 as the
377-
address. The default value for this setting is `4`. Dual-mode
378-
support, for example `4+6` is not currently supported.
379-
380-
381-
# Local Configuration
382-
383-
Historically DevStack has used ``localrc`` to contain all local configuration
384-
and customizations. More and more of the configuration variables available for
385-
DevStack are passed-through to the individual project configuration files.
386-
The old mechanism for this required specific code for each file and did not
387-
scale well. This is handled now by a master local configuration file.
388-
389-
# local.conf
390-
391-
The new config file ``local.conf`` is an extended-INI format that introduces
392-
a new meta-section header that provides some additional information such
393-
as a phase name and destination config filename:
394-
395-
[[ <phase> | <config-file-name> ]]
396-
397-
where ``<phase>`` is one of a set of phase names defined by ``stack.sh``
398-
and ``<config-file-name>`` is the configuration filename. The filename is
399-
eval'ed in the ``stack.sh`` context so all environment variables are
400-
available and may be used. Using the project config file variables in
401-
the header is strongly suggested (see the ``NOVA_CONF`` example below).
402-
If the path of the config file does not exist it is skipped.
403-
404-
The defined phases are:
405-
406-
* **local** - extracts ``localrc`` from ``local.conf`` before ``stackrc`` is sourced
407-
* **post-config** - runs after the layer 2 services are configured
408-
and before they are started
409-
* **extra** - runs after services are started and before any files
410-
in ``extra.d`` are executed
411-
* **post-extra** - runs after files in ``extra.d`` are executed
412-
413-
The file is processed strictly in sequence; meta-sections may be specified more
414-
than once but if any settings are duplicated the last to appear in the file
415-
will be used.
416-
417-
[[post-config|$NOVA_CONF]]
418-
[DEFAULT]
419-
use_syslog = True
420-
421-
[osapi_v3]
422-
enabled = False
423-
424-
A specific meta-section ``local|localrc`` is used to provide a default
425-
``localrc`` file (actually ``.localrc.auto``). This allows all custom
426-
settings for DevStack to be contained in a single file. If ``localrc``
427-
exists it will be used instead to preserve backward-compatibility.
428-
429-
[[local|localrc]]
430-
FIXED_RANGE=10.254.1.0/24
431-
ADMIN_PASSWORD=speciale
432-
LOGFILE=$DEST/logs/stack.sh.log
433-
434-
Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to *NOT*
435-
start with a ``/`` (slash) character. A slash will need to be added:
436-
437-
[[post-config|/$Q_PLUGIN_CONF_FILE]]
104+
Start by reading the [configuration
105+
guide](doc/source/configuration.rst) for details of the many available
106+
options.

0 commit comments

Comments
 (0)