blob: b4240bdc91d868194d9f4a81812c1cc239cd603a [file] [log] [blame]
Dean Troyere9819d52012-03-21 11:25:06 -05001DevStack is a set of scripts and utilities to quickly deploy an OpenStack cloud.
Anthony Young63987872011-09-30 11:34:43 -07002
Sean Dague29c1f982017-05-02 08:40:26 -04003Goals
4=====
Anthony Young63987872011-09-30 11:34:43 -07005
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +01006* To quickly build dev OpenStack environments in a clean Ubuntu or Fedora
7 environment
8* To describe working configurations of OpenStack (which code branches
9 work together? what do config files look like for those branches?)
10* To make it easier for developers to dive into OpenStack so that they can
11 productively contribute without having to understand every part of the
12 system at once
Anthony Young63987872011-09-30 11:34:43 -070013* To make it easy to prototype cross-project features
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010014* To provide an environment for the OpenStack CI testing on every commit
15 to the projects
Jesse Andrewsba23cc72011-09-11 03:22:13 -070016
venkatamahesh3c685012015-09-26 18:05:34 +053017Read more at http://docs.openstack.org/developer/devstack
Jesse Andrewsb69d6ce2011-10-13 10:36:00 -070018
Dean Troyerb8dd27b2013-10-17 12:03:55 -050019IMPORTANT: Be sure to carefully read `stack.sh` and any other scripts you
20execute before you run them, as they install software and will alter your
21networking configuration. We strongly recommend that you run `stack.sh`
22in a clean and disposable vm when you are first getting started.
Dean Troyer2aa2a892013-08-04 19:53:19 -050023
Sean Dague29c1f982017-05-02 08:40:26 -040024Versions
25========
Anthony Young073d17d2011-11-23 12:50:46 -080026
Dean Troyerb8dd27b2013-10-17 12:03:55 -050027The DevStack master branch generally points to trunk versions of OpenStack
28components. For older, stable versions, look for branches named
29stable/[release] in the DevStack repo. For example, you can do the
Sean Dague29c1f982017-05-02 08:40:26 -040030following to create a Newton OpenStack cloud::
Anthony Young073d17d2011-11-23 12:50:46 -080031
Pierre Riteau62f29a92016-11-03 10:10:03 +000032 git checkout stable/newton
Anthony Young073d17d2011-11-23 12:50:46 -080033 ./stack.sh
34
Dean Troyerb8dd27b2013-10-17 12:03:55 -050035You can also pick specific OpenStack project releases by setting the appropriate
36`*_BRANCH` variables in the ``localrc`` section of `local.conf` (look in
37`stackrc` for the default set). Usually just before a release there will be
38milestone-proposed branches that need to be tested::
Dean Troyerce043c42012-02-03 22:56:38 -060039
Steve Kowalik047cac52013-11-07 22:36:10 +110040 GLANCE_REPO=git://git.openstack.org/openstack/glance.git
Dean Troyere9819d52012-03-21 11:25:06 -050041 GLANCE_BRANCH=milestone-proposed
Dean Troyerce043c42012-02-03 22:56:38 -060042
Sean Dague29c1f982017-05-02 08:40:26 -040043Start A Dev Cloud
44=================
Dean Troyerce043c42012-02-03 22:56:38 -060045
Dean Troyerb8dd27b2013-10-17 12:03:55 -050046Installing in a dedicated disposable VM is safer than installing on your
47dev machine! Plus you can pick one of the supported Linux distros for
48your VM. To start a dev cloud run the following NOT AS ROOT (see
49**DevStack Execution Environment** below for more on user accounts):
Anthony Young0e65abf2011-09-30 09:24:00 -070050
51 ./stack.sh
52
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010053When the script finishes executing, you should be able to access OpenStack
54endpoints, like so:
Anthony Young63987872011-09-30 11:34:43 -070055
Tres Henryca85b792011-10-28 14:00:21 -070056* Horizon: http://myhost/
Anthony Young63987872011-09-30 11:34:43 -070057* Keystone: http://myhost:5000/v2.0/
58
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010059We also provide an environment file that you can use to interact with your
Sean Dague29c1f982017-05-02 08:40:26 -040060cloud via CLI::
Anthony Young073d17d2011-11-23 12:50:46 -080061
Dean Troyerb8dd27b2013-10-17 12:03:55 -050062 # source openrc file to load your environment with OpenStack CLI creds
Anthony Young073d17d2011-11-23 12:50:46 -080063 . openrc
64 # list instances
Sean Dague29c1f982017-05-02 08:40:26 -040065 openstack server list
Dean Troyer0bd24102012-03-08 00:33:54 -060066
Sean Dague29c1f982017-05-02 08:40:26 -040067DevStack Execution Environment
68==============================
Dean Troyer23f69d82013-10-04 12:35:24 -050069
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010070DevStack runs rampant over the system it runs on, installing things and
71uninstalling other things. Running this on a system you care about is a recipe
72for disappointment, or worse. Alas, we're all in the virtualization business
73here, so run it in a VM. And take advantage of the snapshot capabilities
74of your hypervisor of choice to reduce testing cycle times. You might even save
75enough time to write one more feature before the next feature freeze...
Dean Troyer23f69d82013-10-04 12:35:24 -050076
Ian Wienanda35391e2015-08-10 13:53:40 +100077``stack.sh`` needs to have root access for a lot of tasks, but uses
78``sudo`` for all of those tasks. However, it needs to be not-root for
79most of its work and for all of the OpenStack services. ``stack.sh``
80specifically does not run if started as root.
Dean Troyerb8dd27b2013-10-17 12:03:55 -050081
Ian Wienanda35391e2015-08-10 13:53:40 +100082DevStack will not automatically create the user, but provides a helper
83script in ``tools/create-stack-user.sh``. Run that (as root!) or just
84check it out to see what DevStack's expectations are for the account
85it runs under. Many people simply use their usual login (the default
86'ubuntu' login on a UEC image for example).
Dean Troyer23f69d82013-10-04 12:35:24 -050087
Sean Dague29c1f982017-05-02 08:40:26 -040088Customizing
89===========
Anthony Young63987872011-09-30 11:34:43 -070090
Ian Wienanda35391e2015-08-10 13:53:40 +100091DevStack can be extensively configured via the configuration file
92`local.conf`. It is likely that you will need to provide and modify
93this file if you want anything other than the most basic setup. Start
Sean Dague29c1f982017-05-02 08:40:26 -040094by reading the `configuration guide
rootfabc9762017-05-27 15:01:16 +080095<https://docs.openstack.org/developer/devstack/configuration.html>`_
Sean Dague29c1f982017-05-02 08:40:26 -040096for details of the configuration file and the many available options.