blob: 8214de0f6ac7345c8ade9346daa9219180dd59b9 [file] [log] [blame]
Dean Troyer0986a7b2014-10-29 22:08:13 -05001===
2FAQ
3===
Sean M. Collins09e550c2014-10-21 11:40:08 -04004
Ian Wienand2f27add2015-06-02 10:18:49 +10005.. contents::
6 :local:
Sean M. Collins09e550c2014-10-21 11:40:08 -04007
8General Questions
Sean Dague32930462014-11-18 06:51:16 -05009=================
Sean M. Collins09e550c2014-10-21 11:40:08 -040010
Ian Wienand2f27add2015-06-02 10:18:49 +100011Can I use DevStack for production?
12~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +100013
Ian Wienand2f27add2015-06-02 10:18:49 +100014DevStack is targeted at developers and CI systems to use the raw
15upstream code. It makes many choices that are not appropriate for
16production systems.
Ian Wienanda16e4612015-06-02 10:08:04 +100017
Ian Wienand2f27add2015-06-02 10:18:49 +100018Your best choice is probably to choose a `distribution of OpenStack
Isao Yamagata7aaaf902015-07-11 16:07:22 +000019<https://www.openstack.org/marketplace/distros/>`__.
Ian Wienanda16e4612015-06-02 10:08:04 +100020
Sylvain Bauzab75a4922015-10-16 15:57:50 +020021Can I use DevStack as a development environment?
22~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
24Sure, you can. That said, there are a couple of things you should note before
25doing so:
26
27- DevStack makes a lot of configuration changes to your system and should not
28 be run in your main development environment.
29
30- All the repositories that DevStack clones when deploying are considered
31 volatile by default and thus are subject to hard resets. This is necessary to
32 keep you in sync with the latest upstream, which is what you want in a CI
33 situation, but it can result in branches being overwritten and files being
34 removed.
35
36 The corollary of this is that if you are working on a specific project, using
37 the DevStack project repository (defaulted to ``/opt/stack/<project>``) as
38 the single master repository for storing all your work is not recommended.
39 This behavior can be overridden by setting the ``RECLONE`` config option to
40 ``no``. Alternatively, you can avoid running ``stack.sh`` to redeploy by
41 restarting services manually. In any case, you should generally ensure work
42 in progress is pushed to Gerrit or otherwise backed up before running
43 ``stack.sh``.
44
45- If you use DevStack within a VM, you may wish to mount a local OpenStack
46 directory, such as ``~/src/openstack``, inside the VM and configure DevStack
47 to use this as the clone location using the ``{PROJECT}_REPO`` config
48 variables. For example, assuming you're using Vagrant and sharing your home
49 directory, you should place the following in ``local.conf``:
50
51 .. code-block:: shell
52
53 NEUTRON_REPO=/home/vagrant/src/neutron
54 NOVA_REPO=/home/vagrant/src/nova
55 KEYSTONE_REPO=/home/vagrant/src/keystone
56 GLANCE_REPO=/home/vagrant/src/glance
57 SWIFT_REPO=/home/vagrant/src/swift
58 HORIZON_REPO=/home/vagrant/src/horizon
59 CINDER_REPO=/home/vagrant/src/cinder
60 HEAT_REPO=/home/vagrant/src/heat
61 TEMPEST_REPO=/home/vagrant/src/tempest
62 HEATCLIENT_REPO=/home/vagrant/src/python-heatclient
63 GLANCECLIENT_REPO=/home/vagrant/src/python-glanceclient
64 NOVACLIENT_REPO=/home/vagrant/src/python-novaclient
65 NEUTRONCLIENT_REPO=/home/vagrant/src/python-neutronclient
66 OPENSTACKCLIENT_REPO=/home/vagrant/src/python-openstackclient
67 HEAT_CFNTOOLS_REPO=/home/vagrant/src/heat-cfntools
68 HEAT_TEMPLATES_REPO=/home/vagrant/src/heat-templates
69 NEUTRON_FWAAS_REPO=/home/vagrant/src/neutron-fwaas
70 # ...
71
Ian Wienand2f27add2015-06-02 10:18:49 +100072Why a shell script, why not chef/puppet/...
73~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +100074
Ian Wienand2f27add2015-06-02 10:18:49 +100075The script is meant to be read by humans (as well as ran by
76computers); it is the primary documentation after all. Using a recipe
77system requires everyone to agree and understand chef or puppet.
Ian Wienanda16e4612015-06-02 10:08:04 +100078
Ian Wienand2f27add2015-06-02 10:18:49 +100079I'd like to help!
80~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +100081
Ian Wienand2f27add2015-06-02 10:18:49 +100082That isn't a question, but please do! The source for DevStack is at
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040083`opendev.org <https://opendev.org/openstack/devstack>`__ and bug
Ian Wienand2f27add2015-06-02 10:18:49 +100084reports go to `LaunchPad
zhangbailinc63d9332017-09-01 19:46:16 -070085<https://bugs.launchpad.net/devstack/>`__. Contributions follow the
Ian Wienand2f27add2015-06-02 10:18:49 +100086usual process as described in the `developer guide
zhangbailinc63d9332017-09-01 19:46:16 -070087<https://docs.openstack.org/infra/manual/developers.html>`__. This
Ian Wienand2f27add2015-06-02 10:18:49 +100088Sphinx documentation is housed in the doc directory.
Ian Wienanda16e4612015-06-02 10:08:04 +100089
Ian Wienand2f27add2015-06-02 10:18:49 +100090Why not use packages?
91~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +100092
Ian Wienand2f27add2015-06-02 10:18:49 +100093Unlike packages, DevStack leaves your cloud ready to develop -
Sean Dague8b8441f2017-05-02 06:14:11 -040094checkouts of the code and services running locally under systemd,
95making it easy to hack on and test new patches. However, many people
96are doing the hard work of packaging and recipes for production
Ian Wienand2f27add2015-06-02 10:18:49 +100097deployments.
Ian Wienanda16e4612015-06-02 10:08:04 +100098
Ian Wienand2f27add2015-06-02 10:18:49 +100099Why isn't $MY\_FAVORITE\_DISTRO supported?
100~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101
102DevStack is meant for developers and those who want to see how
103OpenStack really works. DevStack is known to run on the distro/release
104combinations listed in ``README.md``. DevStack is only supported on
105releases other than those documented in ``README.md`` on a best-effort
106basis.
107
Atsushi SAKAIe3c26732015-11-06 13:23:47 +0900108Are there any differences between Ubuntu and CentOS/Fedora support?
Ian Wienand2f27add2015-06-02 10:18:49 +1000109~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
111Both should work well and are tested by DevStack CI.
112
113Why can't I use another shell?
114~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115
116DevStack now uses some specific bash-ism that require Bash 4, such as
117associative arrays. Simple compatibility patches have been accepted in
118the past when they are not complex, at this point no additional
119compatibility patches will be considered except for shells matching
120the array functionality as it is very ingrained in the repo and
121project management.
122
123Can I test on OS/X?
124~~~~~~~~~~~~~~~~~~~
125
126Some people have success with bash 4 installed via homebrew to keep
127running tests on OS/X.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400128
Ian Wienand64cf2042015-06-02 10:28:55 +1000129Can I at least source ``openrc`` with ``zsh``?
130~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131
132People have reported success with a special function to run ``openrc``
133through bash for this
134
135.. code-block:: bash
136
137 function sourceopenrc {
138 pushd ~/devstack >/dev/null
Ethan Lynne2561742016-03-30 23:40:56 +0800139 eval $(bash -c ". openrc $1 $2 >/dev/null;env|sed -n '/OS_/ { s/^/export /;p}'")
Ian Wienand64cf2042015-06-02 10:28:55 +1000140 popd >/dev/null
141 }
142
143
Sean M. Collins09e550c2014-10-21 11:40:08 -0400144Operation and Configuration
Sean Dague32930462014-11-18 06:51:16 -0500145===========================
Sean M. Collins09e550c2014-10-21 11:40:08 -0400146
Ian Wienand2f27add2015-06-02 10:18:49 +1000147Can DevStack handle a multi-node installation?
148~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +1000149
Ian Wienand2f27add2015-06-02 10:18:49 +1000150Yes, see :doc:`multinode lab guide <guides/multinode-lab>`
Ian Wienanda16e4612015-06-02 10:08:04 +1000151
Ian Wienand2f27add2015-06-02 10:18:49 +1000152How can I document the environment that DevStack is using?
153~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154
155DevStack includes a script (``tools/info.sh``) that gathers the
156versions of the relevant installed apt packages, pip packages and git
157repos. This is a good way to verify what Python modules are
158installed.
159
160How do I turn off a service that is enabled by default?
161~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162
163Services can be turned off by adding ``disable_service xxx`` to
Jordan Pittier326e4802016-02-12 15:23:43 +0100164``local.conf`` (using ``c-vol`` in this example):
Sean M. Collins09e550c2014-10-21 11:40:08 -0400165
166 ::
167
Jordan Pittier326e4802016-02-12 15:23:43 +0100168 disable_service c-vol
Sean M. Collins09e550c2014-10-21 11:40:08 -0400169
Ian Wienand2f27add2015-06-02 10:18:49 +1000170Is enabling a service that defaults to off done with the reverse of the above?
171~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172Of course!
Sean M. Collins09e550c2014-10-21 11:40:08 -0400173
174 ::
175
Sean Dague37eca482015-06-16 07:19:22 -0400176 enable_service q-svc
Sean M. Collins09e550c2014-10-21 11:40:08 -0400177
Sean Dague17596182015-10-05 15:26:43 -0400178How do I run a specific OpenStack release?
Ian Wienand2f27add2015-06-02 10:18:49 +1000179~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180
Sean Dague17596182015-10-05 15:26:43 -0400181DevStack master tracks the upstream master of all the projects. If you
182would like to run a stable branch of OpenStack, you should use the
183corresponding stable branch of DevStack as well. For instance the
Jordan Pittier99d5d1c2017-03-15 13:42:25 +0100184``stable/ocata`` version of DevStack will already default to all the
185projects running at ``stable/ocata`` levels.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400186
Sean Dague17596182015-10-05 15:26:43 -0400187Note: it's also possible to manually adjust the ``*_BRANCH`` variables
188further if you would like to test specific milestones, or even custom
189out of tree branches. This is done with entries like the following in
190your ``local.conf``
191
192::
Sean M. Collins09e550c2014-10-21 11:40:08 -0400193
194 [[local|localrc]]
Sean Dague17596182015-10-05 15:26:43 -0400195 GLANCE_BRANCH=11.0.0.0rc1
196 NOVA_BRANCH=12.0.0.0.rc1
197
198
199Upstream DevStack is only tested with master and stable
Atsushi SAKAIe3c26732015-11-06 13:23:47 +0900200branches. Setting custom BRANCH definitions is not guaranteed to
Sean Dague17596182015-10-05 15:26:43 -0400201produce working results.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400202
Ian Wienand2f27add2015-06-02 10:18:49 +1000203What can I do about RabbitMQ not wanting to start on my fresh new VM?
204~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +1000205
Ian Wienand2f27add2015-06-02 10:18:49 +1000206This is often caused by ``erlang`` not being happy with the hostname
207resolving to a reachable IP address. Make sure your hostname resolves
208to a working IP address; setting it to 127.0.0.1 in ``/etc/hosts`` is
209often good enough for a single-node installation. And in an extreme
210case, use ``clean.sh`` to eradicate it and try again.
211
Ian Wienand2f27add2015-06-02 10:18:49 +1000212Why are my configuration changes ignored?
213~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214
215You may have run into the package prerequisite installation
216timeout. ``tools/install_prereqs.sh`` has a timer that skips the
217package installation checks if it was run within the last
218``PREREQ_RERUN_HOURS`` hours (default is 2). To override this, set
219``FORCE_PREREQ=1`` and the package checks will never be skipped.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400220
221Miscellaneous
Sean Dague32930462014-11-18 06:51:16 -0500222=============
Sean M. Collins09e550c2014-10-21 11:40:08 -0400223
Ian Wienand2f27add2015-06-02 10:18:49 +1000224``tools/fixup_stuff.sh`` is broken and shouldn't 'fix' just one version of packages.
225~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
226
227Stuff in there is to correct problems in an environment that need to
228be fixed elsewhere or may/will be fixed in a future release. In the
229case of ``httplib2`` and ``prettytable`` specific problems with
230specific versions are being worked around. If later releases have
231those problems than we'll add them to the script. Knowing about the
232broken future releases is valuable rather than polling to see if it
233has been fixed.