blob: ff5598b0c5b28c926dcdfe11cdc6a731e5f6d201 [file] [log] [blame] [view]
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
3# Goals
4
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +01005* To quickly build dev OpenStack environments in a clean Ubuntu or Fedora
6 environment
7* To describe working configurations of OpenStack (which code branches
8 work together? what do config files look like for those branches?)
9* To make it easier for developers to dive into OpenStack so that they can
10 productively contribute without having to understand every part of the
11 system at once
Anthony Young63987872011-09-30 11:34:43 -070012* To make it easy to prototype cross-project features
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010013* To provide an environment for the OpenStack CI testing on every commit
14 to the projects
Jesse Andrewsba23cc72011-09-11 03:22:13 -070015
venkatamahesh3c685012015-09-26 18:05:34 +053016Read more at http://docs.openstack.org/developer/devstack
Jesse Andrewsb69d6ce2011-10-13 10:36:00 -070017
Dean Troyerb8dd27b2013-10-17 12:03:55 -050018IMPORTANT: Be sure to carefully read `stack.sh` and any other scripts you
19execute before you run them, as they install software and will alter your
20networking configuration. We strongly recommend that you run `stack.sh`
21in a clean and disposable vm when you are first getting started.
Dean Troyer2aa2a892013-08-04 19:53:19 -050022
Anthony Young073d17d2011-11-23 12:50:46 -080023# Versions
24
Dean Troyerb8dd27b2013-10-17 12:03:55 -050025The DevStack master branch generally points to trunk versions of OpenStack
26components. For older, stable versions, look for branches named
27stable/[release] in the DevStack repo. For example, you can do the
Pierre Riteau62f29a92016-11-03 10:10:03 +000028following to create a Newton OpenStack cloud:
Anthony Young073d17d2011-11-23 12:50:46 -080029
Pierre Riteau62f29a92016-11-03 10:10:03 +000030 git checkout stable/newton
Anthony Young073d17d2011-11-23 12:50:46 -080031 ./stack.sh
32
Dean Troyerb8dd27b2013-10-17 12:03:55 -050033You can also pick specific OpenStack project releases by setting the appropriate
34`*_BRANCH` variables in the ``localrc`` section of `local.conf` (look in
35`stackrc` for the default set). Usually just before a release there will be
36milestone-proposed branches that need to be tested::
Dean Troyerce043c42012-02-03 22:56:38 -060037
Steve Kowalik047cac52013-11-07 22:36:10 +110038 GLANCE_REPO=git://git.openstack.org/openstack/glance.git
Dean Troyere9819d52012-03-21 11:25:06 -050039 GLANCE_BRANCH=milestone-proposed
Dean Troyerce043c42012-02-03 22:56:38 -060040
41# Start A Dev Cloud
42
Dean Troyerb8dd27b2013-10-17 12:03:55 -050043Installing in a dedicated disposable VM is safer than installing on your
44dev machine! Plus you can pick one of the supported Linux distros for
45your VM. To start a dev cloud run the following NOT AS ROOT (see
46**DevStack Execution Environment** below for more on user accounts):
Anthony Young0e65abf2011-09-30 09:24:00 -070047
48 ./stack.sh
49
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010050When the script finishes executing, you should be able to access OpenStack
51endpoints, like so:
Anthony Young63987872011-09-30 11:34:43 -070052
Tres Henryca85b792011-10-28 14:00:21 -070053* Horizon: http://myhost/
Anthony Young63987872011-09-30 11:34:43 -070054* Keystone: http://myhost:5000/v2.0/
55
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010056We also provide an environment file that you can use to interact with your
57cloud via CLI:
Anthony Young073d17d2011-11-23 12:50:46 -080058
Dean Troyerb8dd27b2013-10-17 12:03:55 -050059 # source openrc file to load your environment with OpenStack CLI creds
Anthony Young073d17d2011-11-23 12:50:46 -080060 . openrc
61 # list instances
62 nova list
Dean Troyer0bd24102012-03-08 00:33:54 -060063
Dean Troyer23f69d82013-10-04 12:35:24 -050064# DevStack Execution Environment
65
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010066DevStack runs rampant over the system it runs on, installing things and
67uninstalling other things. Running this on a system you care about is a recipe
68for disappointment, or worse. Alas, we're all in the virtualization business
69here, so run it in a VM. And take advantage of the snapshot capabilities
70of your hypervisor of choice to reduce testing cycle times. You might even save
71enough time to write one more feature before the next feature freeze...
Dean Troyer23f69d82013-10-04 12:35:24 -050072
Ian Wienanda35391e2015-08-10 13:53:40 +100073``stack.sh`` needs to have root access for a lot of tasks, but uses
74``sudo`` for all of those tasks. However, it needs to be not-root for
75most of its work and for all of the OpenStack services. ``stack.sh``
76specifically does not run if started as root.
Dean Troyerb8dd27b2013-10-17 12:03:55 -050077
Ian Wienanda35391e2015-08-10 13:53:40 +100078DevStack will not automatically create the user, but provides a helper
79script in ``tools/create-stack-user.sh``. Run that (as root!) or just
80check it out to see what DevStack's expectations are for the account
81it runs under. Many people simply use their usual login (the default
82'ubuntu' login on a UEC image for example).
Dean Troyer23f69d82013-10-04 12:35:24 -050083
Anthony Young63987872011-09-30 11:34:43 -070084# Customizing
85
Ian Wienanda35391e2015-08-10 13:53:40 +100086DevStack can be extensively configured via the configuration file
87`local.conf`. It is likely that you will need to provide and modify
88this file if you want anything other than the most basic setup. Start
89by reading the [configuration guide](doc/source/configuration.rst) for
venkatamahesh3c685012015-09-26 18:05:34 +053090details of the configuration file and the many available options.