System for quickly installing an OpenStack cloud from upstream git for testing and development.
Go to file
Sean Dague c2fe916fc7 Wait for compute service to check in
With cell v2, on initial bring up, discover hosts can't run unless all
the compute nodes have checked in. The documentation says that you
should run ``nova service-list --binary nova-compute`` and see all
your hosts before running discover hosts. This isn't really viable in
a multinode devstack because of how things are brought up in parts.

We can however know that stack.sh will not complete before the compute
node is up by waiting for the compute node to check in before
completing. This happens quite late in the stack.sh run, so shouldn't
add any extra time in most runs.

Cells v1 and Xenserver don't use real hostnames in the service table
(they encode complex data that is hostname like to provide more
topology information than just hostnames). They are exempted from this
check.

Related-Bug: #1708039

Change-Id: I32eb59b9d6c225a3e93992be3a3b9f4b251d7189
2017-08-02 09:40:25 -04:00
data Fix comment in plugin-registry header 2016-08-31 10:07:06 +10:00
doc/source Merge "doc: Switch from oslosphinx to openstackdocstheme" 2017-07-31 14:34:01 +00:00
exercises Neutron: use "OSC show -f value -c id" instead of "OSC list + grep" 2016-11-18 12:18:09 +01:00
extras.d Merge "Ensure testing configuration can run as late as possible" 2016-11-30 16:30:38 +00:00
files Merge "Fixes devstack ldap plugin" 2017-07-28 16:19:21 +00:00
gate Mostly docs cleanups 2015-03-28 14:35:12 -05:00
inc Update URLs 2017-07-22 09:12:59 +09:00
lib Wait for compute service to check in 2017-08-02 09:40:25 -04:00
pkg Use java version independent package on Ubuntu 2016-12-15 08:48:02 -08:00
samples Update URLs 2017-07-22 09:12:59 +09:00
tests Add python-barbicanclient to LIBS_FROM_GIT 2017-06-22 09:45:28 -04:00
tools Remove extra websockify dependency cleanup step 2017-07-31 08:56:17 +02:00
.gitignore Ignore etcd files downloaded to files/ dir 2017-06-21 09:18:46 +00:00
.gitreview Add .gitreview config file for gerrit. 2011-11-16 11:24:49 -08:00
.mailmap Remove AUTHORS 2014-08-14 13:52:28 +10:00
clean.sh systemd: Always create the systemd unit files 2017-06-14 14:29:39 +10:00
exercise.sh Remove EC2 API from devstack 2016-03-15 13:32:23 +11:00
exerciserc Remove EC2 API from devstack 2016-03-15 13:32:23 +11:00
functions Wait for compute service to check in 2017-08-02 09:40:25 -04:00
functions-common Merge "Actually check if roles are set" 2017-06-26 23:26:27 +00:00
FUTURE.rst Document where we are going 2015-02-05 16:20:52 -05:00
HACKING.rst Document testing of new devstack features 2017-05-12 10:16:33 -07:00
LICENSE Add Apache 2 LICENSE file 2012-04-18 01:45:35 -05:00
MAINTAINERS.rst Move Sahara into in-tree plugin 2015-07-01 16:09:56 +00:00
Makefile Suppressed echoing of the line. 2016-04-30 14:11:52 +05:30
openrc Merge "Make openrc more robust for grenade scenarios" 2017-05-16 14:47:04 +00:00
README.rst Update URLs 2017-07-22 09:12:59 +09:00
run_tests.sh Remove old comment in run_tests.sh 2015-04-17 13:23:25 +10:00
setup.cfg Update URLs 2017-07-22 09:12:59 +09:00
setup.py Convert all HTML doc to RST 2014-10-22 12:27:00 -04:00
stack.sh Wait for compute service to check in 2017-08-02 09:40:25 -04:00
stackrc Introduce CELLSV2_SETUP variable 2017-07-26 13:51:29 -07:00
tox.ini doc: Switch from oslosphinx to openstackdocstheme 2017-07-24 10:34:22 +10:00
unstack.sh Get rid of zookeeper from devstack 2017-05-24 14:13:27 +00:00

DevStack is a set of scripts and utilities to quickly deploy an OpenStack cloud.

Goals

  • To quickly build dev OpenStack environments in a clean Ubuntu or Fedora environment
  • To describe working configurations of OpenStack (which code branches work together? what do config files look like for those branches?)
  • To make it easier for developers to dive into OpenStack so that they can productively contribute without having to understand every part of the system at once
  • To make it easy to prototype cross-project features
  • To provide an environment for the OpenStack CI testing on every commit to the projects

Read more at https://docs.openstack.org/devstack/latest

IMPORTANT: Be sure to carefully read stack.sh and any other scripts you execute before you run them, as they install software and will alter your networking configuration. We strongly recommend that you run stack.sh in a clean and disposable vm when you are first getting started.

Versions

The DevStack master branch generally points to trunk versions of OpenStack components. For older, stable versions, look for branches named stable/[release] in the DevStack repo. For example, you can do the following to create a Newton OpenStack cloud:

git checkout stable/newton
./stack.sh

You can also pick specific OpenStack project releases by setting the appropriate *_BRANCH variables in the localrc section of local.conf (look in stackrc for the default set). Usually just before a release there will be milestone-proposed branches that need to be tested:

GLANCE_REPO=git://git.openstack.org/openstack/glance.git
GLANCE_BRANCH=milestone-proposed

Start A Dev Cloud

Installing in a dedicated disposable VM is safer than installing on your dev machine! Plus you can pick one of the supported Linux distros for your VM. To start a dev cloud run the following NOT AS ROOT (see DevStack Execution Environment below for more on user accounts):

./stack.sh

When the script finishes executing, you should be able to access OpenStack endpoints, like so:

We also provide an environment file that you can use to interact with your cloud via CLI:

# source openrc file to load your environment with OpenStack CLI creds
. openrc
# list instances
openstack server list

DevStack Execution Environment

DevStack runs rampant over the system it runs on, installing things and uninstalling other things. Running this on a system you care about is a recipe for disappointment, or worse. Alas, we're all in the virtualization business here, so run it in a VM. And take advantage of the snapshot capabilities of your hypervisor of choice to reduce testing cycle times. You might even save enough time to write one more feature before the next feature freeze...

stack.sh needs to have root access for a lot of tasks, but uses sudo for all of those tasks. However, it needs to be not-root for most of its work and for all of the OpenStack services. stack.sh specifically does not run if started as root.

DevStack will not automatically create the user, but provides a helper script in tools/create-stack-user.sh. Run that (as root!) or just check it out to see what DevStack's expectations are for the account it runs under. Many people simply use their usual login (the default 'ubuntu' login on a UEC image for example).

Customizing

DevStack can be extensively configured via the configuration file local.conf. It is likely that you will need to provide and modify this file if you want anything other than the most basic setup. Start by reading the configuration guide for details of the configuration file and the many available options.