blob: 86b85da95633ffd724845dcbcec1284d916433c2 [file] [log] [blame]
Sean Daguea7f32722017-09-07 11:16:40 -04001DevStack is a set of scripts and utilities to quickly deploy an OpenStack cloud
2from git source trees.
Anthony Young63987872011-09-30 11:34:43 -07003
Sean Dague29c1f982017-05-02 08:40:26 -04004Goals
5=====
Anthony Young63987872011-09-30 11:34:43 -07006
Dr. Jens Harbottfbc18652023-06-07 15:19:37 +02007* To quickly build dev OpenStack environments in a clean Ubuntu or RockyLinux
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +01008 environment
9* To describe working configurations of OpenStack (which code branches
10 work together? what do config files look like for those branches?)
11* To make it easier for developers to dive into OpenStack so that they can
12 productively contribute without having to understand every part of the
13 system at once
Anthony Young63987872011-09-30 11:34:43 -070014* To make it easy to prototype cross-project features
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010015* To provide an environment for the OpenStack CI testing on every commit
16 to the projects
Jesse Andrewsba23cc72011-09-11 03:22:13 -070017
Takashi NATSUMEfa007772017-07-22 08:59:43 +090018Read more at https://docs.openstack.org/devstack/latest
Jesse Andrewsb69d6ce2011-10-13 10:36:00 -070019
Dean Troyerb8dd27b2013-10-17 12:03:55 -050020IMPORTANT: Be sure to carefully read `stack.sh` and any other scripts you
21execute before you run them, as they install software and will alter your
22networking configuration. We strongly recommend that you run `stack.sh`
23in a clean and disposable vm when you are first getting started.
Dean Troyer2aa2a892013-08-04 19:53:19 -050024
Sean Dague29c1f982017-05-02 08:40:26 -040025Versions
26========
Anthony Young073d17d2011-11-23 12:50:46 -080027
Dean Troyerb8dd27b2013-10-17 12:03:55 -050028The DevStack master branch generally points to trunk versions of OpenStack
29components. For older, stable versions, look for branches named
30stable/[release] in the DevStack repo. For example, you can do the
Dr. Jens Harbottfbc18652023-06-07 15:19:37 +020031following to create a Zed OpenStack cloud::
Anthony Young073d17d2011-11-23 12:50:46 -080032
Dr. Jens Harbottfbc18652023-06-07 15:19:37 +020033 git checkout stable/zed
Anthony Young073d17d2011-11-23 12:50:46 -080034 ./stack.sh
35
Dean Troyerb8dd27b2013-10-17 12:03:55 -050036You can also pick specific OpenStack project releases by setting the appropriate
37`*_BRANCH` variables in the ``localrc`` section of `local.conf` (look in
38`stackrc` for the default set). Usually just before a release there will be
39milestone-proposed branches that need to be tested::
Dean Troyerce043c42012-02-03 22:56:38 -060040
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040041 GLANCE_REPO=https://opendev.org/openstack/glance.git
Dean Troyere9819d52012-03-21 11:25:06 -050042 GLANCE_BRANCH=milestone-proposed
Dean Troyerce043c42012-02-03 22:56:38 -060043
Sean Dague29c1f982017-05-02 08:40:26 -040044Start A Dev Cloud
45=================
Dean Troyerce043c42012-02-03 22:56:38 -060046
Dean Troyerb8dd27b2013-10-17 12:03:55 -050047Installing in a dedicated disposable VM is safer than installing on your
48dev machine! Plus you can pick one of the supported Linux distros for
49your VM. To start a dev cloud run the following NOT AS ROOT (see
50**DevStack Execution Environment** below for more on user accounts):
Anthony Young0e65abf2011-09-30 09:24:00 -070051
52 ./stack.sh
53
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010054When the script finishes executing, you should be able to access OpenStack
55endpoints, like so:
Anthony Young63987872011-09-30 11:34:43 -070056
Tres Henryca85b792011-10-28 14:00:21 -070057* Horizon: http://myhost/
Dr. Jens Harbottfbc18652023-06-07 15:19:37 +020058* Keystone: http://myhost/identity/v3/
Anthony Young63987872011-09-30 11:34:43 -070059
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010060We also provide an environment file that you can use to interact with your
Sean Dague29c1f982017-05-02 08:40:26 -040061cloud via CLI::
Anthony Young073d17d2011-11-23 12:50:46 -080062
Dean Troyerb8dd27b2013-10-17 12:03:55 -050063 # source openrc file to load your environment with OpenStack CLI creds
Anthony Young073d17d2011-11-23 12:50:46 -080064 . openrc
65 # list instances
Sean Dague29c1f982017-05-02 08:40:26 -040066 openstack server list
Dean Troyer0bd24102012-03-08 00:33:54 -060067
Sean Dague29c1f982017-05-02 08:40:26 -040068DevStack Execution Environment
69==============================
Dean Troyer23f69d82013-10-04 12:35:24 -050070
Radoslaw Smigielski8c666cf2014-05-14 12:36:29 +010071DevStack runs rampant over the system it runs on, installing things and
72uninstalling other things. Running this on a system you care about is a recipe
73for disappointment, or worse. Alas, we're all in the virtualization business
74here, so run it in a VM. And take advantage of the snapshot capabilities
75of your hypervisor of choice to reduce testing cycle times. You might even save
76enough time to write one more feature before the next feature freeze...
Dean Troyer23f69d82013-10-04 12:35:24 -050077
Ian Wienanda35391e2015-08-10 13:53:40 +100078``stack.sh`` needs to have root access for a lot of tasks, but uses
79``sudo`` for all of those tasks. However, it needs to be not-root for
80most of its work and for all of the OpenStack services. ``stack.sh``
81specifically does not run if started as root.
Dean Troyerb8dd27b2013-10-17 12:03:55 -050082
Ian Wienanda35391e2015-08-10 13:53:40 +100083DevStack will not automatically create the user, but provides a helper
84script in ``tools/create-stack-user.sh``. Run that (as root!) or just
85check it out to see what DevStack's expectations are for the account
86it runs under. Many people simply use their usual login (the default
87'ubuntu' login on a UEC image for example).
Dean Troyer23f69d82013-10-04 12:35:24 -050088
Sean Dague29c1f982017-05-02 08:40:26 -040089Customizing
90===========
Anthony Young63987872011-09-30 11:34:43 -070091
Ian Wienanda35391e2015-08-10 13:53:40 +100092DevStack can be extensively configured via the configuration file
93`local.conf`. It is likely that you will need to provide and modify
94this file if you want anything other than the most basic setup. Start
Sean Dague29c1f982017-05-02 08:40:26 -040095by reading the `configuration guide
Takashi NATSUMEfa007772017-07-22 08:59:43 +090096<https://docs.openstack.org/devstack/latest/configuration.html>`_
Sean Dague29c1f982017-05-02 08:40:26 -040097for details of the configuration file and the many available options.