Dean Troyer | e9819d5 | 2012-03-21 11:25:06 -0500 | [diff] [blame] | 1 | DevStack is a set of scripts and utilities to quickly deploy an OpenStack cloud. |
Anthony Young | 6398787 | 2011-09-30 11:34:43 -0700 | [diff] [blame] | 2 | |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 3 | Goals |
| 4 | ===== |
Anthony Young | 6398787 | 2011-09-30 11:34:43 -0700 | [diff] [blame] | 5 | |
Radoslaw Smigielski | 8c666cf | 2014-05-14 12:36:29 +0100 | [diff] [blame] | 6 | * 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 Young | 6398787 | 2011-09-30 11:34:43 -0700 | [diff] [blame] | 13 | * To make it easy to prototype cross-project features |
Radoslaw Smigielski | 8c666cf | 2014-05-14 12:36:29 +0100 | [diff] [blame] | 14 | * To provide an environment for the OpenStack CI testing on every commit |
| 15 | to the projects |
Jesse Andrews | ba23cc7 | 2011-09-11 03:22:13 -0700 | [diff] [blame] | 16 | |
venkatamahesh | 3c68501 | 2015-09-26 18:05:34 +0530 | [diff] [blame] | 17 | Read more at http://docs.openstack.org/developer/devstack |
Jesse Andrews | b69d6ce | 2011-10-13 10:36:00 -0700 | [diff] [blame] | 18 | |
Dean Troyer | b8dd27b | 2013-10-17 12:03:55 -0500 | [diff] [blame] | 19 | IMPORTANT: Be sure to carefully read `stack.sh` and any other scripts you |
| 20 | execute before you run them, as they install software and will alter your |
| 21 | networking configuration. We strongly recommend that you run `stack.sh` |
| 22 | in a clean and disposable vm when you are first getting started. |
Dean Troyer | 2aa2a89 | 2013-08-04 19:53:19 -0500 | [diff] [blame] | 23 | |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 24 | Versions |
| 25 | ======== |
Anthony Young | 073d17d | 2011-11-23 12:50:46 -0800 | [diff] [blame] | 26 | |
Dean Troyer | b8dd27b | 2013-10-17 12:03:55 -0500 | [diff] [blame] | 27 | The DevStack master branch generally points to trunk versions of OpenStack |
| 28 | components. For older, stable versions, look for branches named |
| 29 | stable/[release] in the DevStack repo. For example, you can do the |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 30 | following to create a Newton OpenStack cloud:: |
Anthony Young | 073d17d | 2011-11-23 12:50:46 -0800 | [diff] [blame] | 31 | |
Pierre Riteau | 62f29a9 | 2016-11-03 10:10:03 +0000 | [diff] [blame] | 32 | git checkout stable/newton |
Anthony Young | 073d17d | 2011-11-23 12:50:46 -0800 | [diff] [blame] | 33 | ./stack.sh |
| 34 | |
Dean Troyer | b8dd27b | 2013-10-17 12:03:55 -0500 | [diff] [blame] | 35 | You 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 |
| 38 | milestone-proposed branches that need to be tested:: |
Dean Troyer | ce043c4 | 2012-02-03 22:56:38 -0600 | [diff] [blame] | 39 | |
Steve Kowalik | 047cac5 | 2013-11-07 22:36:10 +1100 | [diff] [blame] | 40 | GLANCE_REPO=git://git.openstack.org/openstack/glance.git |
Dean Troyer | e9819d5 | 2012-03-21 11:25:06 -0500 | [diff] [blame] | 41 | GLANCE_BRANCH=milestone-proposed |
Dean Troyer | ce043c4 | 2012-02-03 22:56:38 -0600 | [diff] [blame] | 42 | |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 43 | Start A Dev Cloud |
| 44 | ================= |
Dean Troyer | ce043c4 | 2012-02-03 22:56:38 -0600 | [diff] [blame] | 45 | |
Dean Troyer | b8dd27b | 2013-10-17 12:03:55 -0500 | [diff] [blame] | 46 | Installing in a dedicated disposable VM is safer than installing on your |
| 47 | dev machine! Plus you can pick one of the supported Linux distros for |
| 48 | your VM. To start a dev cloud run the following NOT AS ROOT (see |
| 49 | **DevStack Execution Environment** below for more on user accounts): |
Anthony Young | 0e65abf | 2011-09-30 09:24:00 -0700 | [diff] [blame] | 50 | |
| 51 | ./stack.sh |
| 52 | |
Radoslaw Smigielski | 8c666cf | 2014-05-14 12:36:29 +0100 | [diff] [blame] | 53 | When the script finishes executing, you should be able to access OpenStack |
| 54 | endpoints, like so: |
Anthony Young | 6398787 | 2011-09-30 11:34:43 -0700 | [diff] [blame] | 55 | |
Tres Henry | ca85b79 | 2011-10-28 14:00:21 -0700 | [diff] [blame] | 56 | * Horizon: http://myhost/ |
Anthony Young | 6398787 | 2011-09-30 11:34:43 -0700 | [diff] [blame] | 57 | * Keystone: http://myhost:5000/v2.0/ |
| 58 | |
Radoslaw Smigielski | 8c666cf | 2014-05-14 12:36:29 +0100 | [diff] [blame] | 59 | We also provide an environment file that you can use to interact with your |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 60 | cloud via CLI:: |
Anthony Young | 073d17d | 2011-11-23 12:50:46 -0800 | [diff] [blame] | 61 | |
Dean Troyer | b8dd27b | 2013-10-17 12:03:55 -0500 | [diff] [blame] | 62 | # source openrc file to load your environment with OpenStack CLI creds |
Anthony Young | 073d17d | 2011-11-23 12:50:46 -0800 | [diff] [blame] | 63 | . openrc |
| 64 | # list instances |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 65 | openstack server list |
Dean Troyer | 0bd2410 | 2012-03-08 00:33:54 -0600 | [diff] [blame] | 66 | |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 67 | DevStack Execution Environment |
| 68 | ============================== |
Dean Troyer | 23f69d8 | 2013-10-04 12:35:24 -0500 | [diff] [blame] | 69 | |
Radoslaw Smigielski | 8c666cf | 2014-05-14 12:36:29 +0100 | [diff] [blame] | 70 | DevStack runs rampant over the system it runs on, installing things and |
| 71 | uninstalling other things. Running this on a system you care about is a recipe |
| 72 | for disappointment, or worse. Alas, we're all in the virtualization business |
| 73 | here, so run it in a VM. And take advantage of the snapshot capabilities |
| 74 | of your hypervisor of choice to reduce testing cycle times. You might even save |
| 75 | enough time to write one more feature before the next feature freeze... |
Dean Troyer | 23f69d8 | 2013-10-04 12:35:24 -0500 | [diff] [blame] | 76 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 77 | ``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 |
| 79 | most of its work and for all of the OpenStack services. ``stack.sh`` |
| 80 | specifically does not run if started as root. |
Dean Troyer | b8dd27b | 2013-10-17 12:03:55 -0500 | [diff] [blame] | 81 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 82 | DevStack will not automatically create the user, but provides a helper |
| 83 | script in ``tools/create-stack-user.sh``. Run that (as root!) or just |
| 84 | check it out to see what DevStack's expectations are for the account |
| 85 | it runs under. Many people simply use their usual login (the default |
| 86 | 'ubuntu' login on a UEC image for example). |
Dean Troyer | 23f69d8 | 2013-10-04 12:35:24 -0500 | [diff] [blame] | 87 | |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 88 | Customizing |
| 89 | =========== |
Anthony Young | 6398787 | 2011-09-30 11:34:43 -0700 | [diff] [blame] | 90 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 91 | DevStack can be extensively configured via the configuration file |
| 92 | `local.conf`. It is likely that you will need to provide and modify |
| 93 | this file if you want anything other than the most basic setup. Start |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 94 | by reading the `configuration guide |
root | fabc976 | 2017-05-27 15:01:16 +0800 | [diff] [blame] | 95 | <https://docs.openstack.org/developer/devstack/configuration.html>`_ |
Sean Dague | 29c1f98 | 2017-05-02 08:40:26 -0400 | [diff] [blame] | 96 | for details of the configuration file and the many available options. |