blob: ee7f0e7809eb22a04f4e7b2427e418cb8c9c2136 [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
Dean Troyerb8dd27b2013-10-17 12:03:55 -050016Read more at http://devstack.org.
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
Joe Gordon6b9deba2015-02-18 11:24:31 -080028following to create a juno OpenStack cloud:
Anthony Young073d17d2011-11-23 12:50:46 -080029
Joe Gordon6b9deba2015-02-18 11:24:31 -080030 git checkout stable/juno
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
64If the EC2 API is your cup-o-tea, you can create credentials and use euca2ools:
65
66 # source eucarc to generate EC2 credentials and set up the environment
67 . eucarc
Anthony Young073d17d2011-11-23 12:50:46 -080068 # list instances using ec2 api
69 euca-describe-instances
70
Dean Troyer23f69d82013-10-04 12:35:24 -050071# DevStack Execution Environment
72
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010073DevStack runs rampant over the system it runs on, installing things and
74uninstalling other things. Running this on a system you care about is a recipe
75for disappointment, or worse. Alas, we're all in the virtualization business
76here, so run it in a VM. And take advantage of the snapshot capabilities
77of your hypervisor of choice to reduce testing cycle times. You might even save
78enough time to write one more feature before the next feature freeze...
Dean Troyer23f69d82013-10-04 12:35:24 -050079
Ian Wienanda35391e2015-08-10 13:53:40 +100080``stack.sh`` needs to have root access for a lot of tasks, but uses
81``sudo`` for all of those tasks. However, it needs to be not-root for
82most of its work and for all of the OpenStack services. ``stack.sh``
83specifically does not run if started as root.
Dean Troyerb8dd27b2013-10-17 12:03:55 -050084
Ian Wienanda35391e2015-08-10 13:53:40 +100085DevStack will not automatically create the user, but provides a helper
86script in ``tools/create-stack-user.sh``. Run that (as root!) or just
87check it out to see what DevStack's expectations are for the account
88it runs under. Many people simply use their usual login (the default
89'ubuntu' login on a UEC image for example).
Dean Troyer23f69d82013-10-04 12:35:24 -050090
Anthony Young63987872011-09-30 11:34:43 -070091# Customizing
92
Ian Wienanda35391e2015-08-10 13:53:40 +100093DevStack can be extensively configured via the configuration file
94`local.conf`. It is likely that you will need to provide and modify
95this file if you want anything other than the most basic setup. Start
96by reading the [configuration guide](doc/source/configuration.rst) for
97details of the configuration file and the many available options.