blob: efb315cbee7517b421bd1c3929d7264035428e9f [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
83`git.openstack.org
84<https://git.openstack.org/cgit/openstack-dev/devstack>`__ and bug
85reports go to `LaunchPad
zhangbailinc63d9332017-09-01 19:46:16 -070086<https://bugs.launchpad.net/devstack/>`__. Contributions follow the
Ian Wienand2f27add2015-06-02 10:18:49 +100087usual process as described in the `developer guide
zhangbailinc63d9332017-09-01 19:46:16 -070088<https://docs.openstack.org/infra/manual/developers.html>`__. This
Ian Wienand2f27add2015-06-02 10:18:49 +100089Sphinx documentation is housed in the doc directory.
Ian Wienanda16e4612015-06-02 10:08:04 +100090
Ian Wienand2f27add2015-06-02 10:18:49 +100091Why not use packages?
92~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +100093
Ian Wienand2f27add2015-06-02 10:18:49 +100094Unlike packages, DevStack leaves your cloud ready to develop -
Sean Dague8b8441f2017-05-02 06:14:11 -040095checkouts of the code and services running locally under systemd,
96making it easy to hack on and test new patches. However, many people
97are doing the hard work of packaging and recipes for production
Ian Wienand2f27add2015-06-02 10:18:49 +100098deployments.
Ian Wienanda16e4612015-06-02 10:08:04 +100099
Ian Wienand2f27add2015-06-02 10:18:49 +1000100Why isn't $MY\_FAVORITE\_DISTRO supported?
101~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
103DevStack is meant for developers and those who want to see how
104OpenStack really works. DevStack is known to run on the distro/release
105combinations listed in ``README.md``. DevStack is only supported on
106releases other than those documented in ``README.md`` on a best-effort
107basis.
108
Atsushi SAKAIe3c26732015-11-06 13:23:47 +0900109Are there any differences between Ubuntu and CentOS/Fedora support?
Ian Wienand2f27add2015-06-02 10:18:49 +1000110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111
112Both should work well and are tested by DevStack CI.
113
114Why can't I use another shell?
115~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116
117DevStack now uses some specific bash-ism that require Bash 4, such as
118associative arrays. Simple compatibility patches have been accepted in
119the past when they are not complex, at this point no additional
120compatibility patches will be considered except for shells matching
121the array functionality as it is very ingrained in the repo and
122project management.
123
124Can I test on OS/X?
125~~~~~~~~~~~~~~~~~~~
126
127Some people have success with bash 4 installed via homebrew to keep
128running tests on OS/X.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400129
Ian Wienand64cf2042015-06-02 10:28:55 +1000130Can I at least source ``openrc`` with ``zsh``?
131~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132
133People have reported success with a special function to run ``openrc``
134through bash for this
135
136.. code-block:: bash
137
138 function sourceopenrc {
139 pushd ~/devstack >/dev/null
Ethan Lynne2561742016-03-30 23:40:56 +0800140 eval $(bash -c ". openrc $1 $2 >/dev/null;env|sed -n '/OS_/ { s/^/export /;p}'")
Ian Wienand64cf2042015-06-02 10:28:55 +1000141 popd >/dev/null
142 }
143
144
Sean M. Collins09e550c2014-10-21 11:40:08 -0400145Operation and Configuration
Sean Dague32930462014-11-18 06:51:16 -0500146===========================
Sean M. Collins09e550c2014-10-21 11:40:08 -0400147
Ian Wienand2f27add2015-06-02 10:18:49 +1000148Can DevStack handle a multi-node installation?
149~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +1000150
Ian Wienand2f27add2015-06-02 10:18:49 +1000151Yes, see :doc:`multinode lab guide <guides/multinode-lab>`
Ian Wienanda16e4612015-06-02 10:08:04 +1000152
Ian Wienand2f27add2015-06-02 10:18:49 +1000153How can I document the environment that DevStack is using?
154~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155
156DevStack includes a script (``tools/info.sh``) that gathers the
157versions of the relevant installed apt packages, pip packages and git
158repos. This is a good way to verify what Python modules are
159installed.
160
161How do I turn off a service that is enabled by default?
162~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163
164Services can be turned off by adding ``disable_service xxx`` to
Jordan Pittier326e4802016-02-12 15:23:43 +0100165``local.conf`` (using ``c-vol`` in this example):
Sean M. Collins09e550c2014-10-21 11:40:08 -0400166
167 ::
168
Jordan Pittier326e4802016-02-12 15:23:43 +0100169 disable_service c-vol
Sean M. Collins09e550c2014-10-21 11:40:08 -0400170
Ian Wienand2f27add2015-06-02 10:18:49 +1000171Is enabling a service that defaults to off done with the reverse of the above?
172~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173Of course!
Sean M. Collins09e550c2014-10-21 11:40:08 -0400174
175 ::
176
Sean Dague37eca482015-06-16 07:19:22 -0400177 enable_service q-svc
Sean M. Collins09e550c2014-10-21 11:40:08 -0400178
Sean Dague17596182015-10-05 15:26:43 -0400179How do I run a specific OpenStack release?
Ian Wienand2f27add2015-06-02 10:18:49 +1000180~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181
Sean Dague17596182015-10-05 15:26:43 -0400182DevStack master tracks the upstream master of all the projects. If you
183would like to run a stable branch of OpenStack, you should use the
184corresponding stable branch of DevStack as well. For instance the
Jordan Pittier99d5d1c2017-03-15 13:42:25 +0100185``stable/ocata`` version of DevStack will already default to all the
186projects running at ``stable/ocata`` levels.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400187
Sean Dague17596182015-10-05 15:26:43 -0400188Note: it's also possible to manually adjust the ``*_BRANCH`` variables
189further if you would like to test specific milestones, or even custom
190out of tree branches. This is done with entries like the following in
191your ``local.conf``
192
193::
Sean M. Collins09e550c2014-10-21 11:40:08 -0400194
195 [[local|localrc]]
Sean Dague17596182015-10-05 15:26:43 -0400196 GLANCE_BRANCH=11.0.0.0rc1
197 NOVA_BRANCH=12.0.0.0.rc1
198
199
200Upstream DevStack is only tested with master and stable
Atsushi SAKAIe3c26732015-11-06 13:23:47 +0900201branches. Setting custom BRANCH definitions is not guaranteed to
Sean Dague17596182015-10-05 15:26:43 -0400202produce working results.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400203
Ian Wienand2f27add2015-06-02 10:18:49 +1000204What can I do about RabbitMQ not wanting to start on my fresh new VM?
205~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Wienanda16e4612015-06-02 10:08:04 +1000206
Ian Wienand2f27add2015-06-02 10:18:49 +1000207This is often caused by ``erlang`` not being happy with the hostname
208resolving to a reachable IP address. Make sure your hostname resolves
209to a working IP address; setting it to 127.0.0.1 in ``/etc/hosts`` is
210often good enough for a single-node installation. And in an extreme
211case, use ``clean.sh`` to eradicate it and try again.
212
Ian Wienand2f27add2015-06-02 10:18:49 +1000213Why are my configuration changes ignored?
214~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215
216You may have run into the package prerequisite installation
217timeout. ``tools/install_prereqs.sh`` has a timer that skips the
218package installation checks if it was run within the last
219``PREREQ_RERUN_HOURS`` hours (default is 2). To override this, set
220``FORCE_PREREQ=1`` and the package checks will never be skipped.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400221
222Miscellaneous
Sean Dague32930462014-11-18 06:51:16 -0500223=============
Sean M. Collins09e550c2014-10-21 11:40:08 -0400224
Ian Wienand2f27add2015-06-02 10:18:49 +1000225``tools/fixup_stuff.sh`` is broken and shouldn't 'fix' just one version of packages.
226~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227
228Stuff in there is to correct problems in an environment that need to
229be fixed elsewhere or may/will be fixed in a future release. In the
230case of ``httplib2`` and ``prettytable`` specific problems with
231specific versions are being worked around. If later releases have
232those problems than we'll add them to the script. Knowing about the
233broken future releases is valuable rather than polling to see if it
234has been fixed.