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