| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 1 | .. Documentation Architecture for the devstack docs. | 
|  | 2 |  | 
|  | 3 | It is really easy for online docs to meander over time as people | 
|  | 4 | attempt to add the small bit of additional information they think | 
|  | 5 | people need, into an existing information architecture. In order to | 
|  | 6 | prevent that we need to be a bit strict as to what's on this front | 
|  | 7 | page. | 
|  | 8 |  | 
|  | 9 | This should *only* be the quick start narrative. Which should end | 
|  | 10 | with 2 sections: what you can do with devstack once it's set up, | 
|  | 11 | and how to go beyond this setup. Both should be a set of quick | 
|  | 12 | links to other documents to let people explore from there. | 
|  | 13 |  | 
| Masayuki Igawa | 12e5ddc | 2019-09-25 12:23:16 +0900 | [diff] [blame] | 14 | DevStack | 
|  | 15 | ======== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 16 |  | 
| Dean Troyer | af14029 | 2014-11-20 21:13:15 -0600 | [diff] [blame] | 17 | .. image:: assets/images/logo-blue.png | 
|  | 18 |  | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 19 | DevStack is a series of extensible scripts used to quickly bring up a | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 20 | complete OpenStack environment based on the latest versions of | 
|  | 21 | everything from git master.  It is used interactively as a development | 
|  | 22 | environment and as the basis for much of the OpenStack project's | 
|  | 23 | functional testing. | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 24 |  | 
| Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 25 | The source is available at `<https://opendev.org/openstack/devstack>`__. | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 26 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 27 | .. warning:: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 28 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 29 | DevStack will make substantial changes to your system during | 
|  | 30 | installation. Only run DevStack on servers or virtual machines that | 
|  | 31 | are dedicated to this purpose. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 32 |  | 
| Dean Troyer | 26dd21b | 2014-11-06 09:33:02 -0600 | [diff] [blame] | 33 | Quick Start | 
| Masayuki Igawa | 12e5ddc | 2019-09-25 12:23:16 +0900 | [diff] [blame] | 34 | +++++++++++ | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 35 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 36 | Install Linux | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 37 | ------------- | 
|  | 38 |  | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 39 | Start with a clean and minimal install of a Linux system. DevStack | 
| Dr. Jens Harbott | fbc1865 | 2023-06-07 15:19:37 +0200 | [diff] [blame] | 40 | attempts to support the two latest LTS releases of Ubuntu, | 
|  | 41 | Rocky Linux 9 and openEuler. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 42 |  | 
| Martin Kopec | 818d1a2 | 2022-11-28 11:19:45 +0100 | [diff] [blame] | 43 | If you do not have a preference, Ubuntu 22.04 (Jammy) is the | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 44 | most tested, and will probably go the smoothest. | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 45 |  | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 46 | Add Stack User (optional) | 
|  | 47 | ------------------------- | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 48 |  | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 49 | DevStack should be run as a non-root user with sudo enabled | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 50 | (standard logins to cloud images such as "ubuntu" or "cloud-user" | 
|  | 51 | are usually fine). | 
|  | 52 |  | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 53 | If you are not using a cloud image, you can create a separate `stack` user | 
|  | 54 | to run DevStack with | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 55 |  | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 56 | .. code-block:: console | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 57 |  | 
| David Rabel | fca0da5 | 2017-03-17 14:47:18 +0100 | [diff] [blame] | 58 | $ sudo useradd -s /bin/bash -d /opt/stack -m stack | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 59 |  | 
| yatinkarel | c64ea4f | 2022-04-20 12:30:09 +0530 | [diff] [blame] | 60 | Ensure home directory for the ``stack`` user has executable permission for all, | 
|  | 61 | as RHEL based distros create it with ``700`` and Ubuntu 21.04+ with ``750`` | 
|  | 62 | which can cause issues during deployment. | 
|  | 63 |  | 
|  | 64 | .. code-block:: console | 
|  | 65 |  | 
|  | 66 | $ sudo chmod +x /opt/stack | 
|  | 67 |  | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 68 | Since this user will be making many changes to your system, it should | 
|  | 69 | have sudo privileges: | 
|  | 70 |  | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 71 | .. code-block:: console | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 72 |  | 
| Cyril Roelandt | a48ffa8 | 2017-04-06 15:23:13 +0200 | [diff] [blame] | 73 | $ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack | 
| Marek Tamaskovic | 5244877 | 2021-07-28 16:54:50 +0200 | [diff] [blame] | 74 | $ sudo -u stack -i | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 75 |  | 
|  | 76 | Download DevStack | 
|  | 77 | ----------------- | 
|  | 78 |  | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 79 | .. code-block:: console | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 80 |  | 
| Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 81 | $ git clone https://opendev.org/openstack/devstack | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 82 | $ cd devstack | 
|  | 83 |  | 
|  | 84 | The ``devstack`` repo contains a script that installs OpenStack and | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 85 | templates for configuration files. | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 86 |  | 
|  | 87 | Create a local.conf | 
|  | 88 | ------------------- | 
|  | 89 |  | 
| Jens Harbott | 7224a6b | 2019-04-01 11:16:53 +0000 | [diff] [blame] | 90 | Create a ``local.conf`` file with four passwords preset at the root of the | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 91 | devstack git repo. | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 92 |  | 
|  | 93 | .. code-block:: ini | 
| Sharat Sharma | 89a855f | 2016-10-03 12:10:23 +0530 | [diff] [blame] | 94 |  | 
|  | 95 | [[local|localrc]] | 
|  | 96 | ADMIN_PASSWORD=secret | 
|  | 97 | DATABASE_PASSWORD=$ADMIN_PASSWORD | 
|  | 98 | RABBIT_PASSWORD=$ADMIN_PASSWORD | 
|  | 99 | SERVICE_PASSWORD=$ADMIN_PASSWORD | 
|  | 100 |  | 
|  | 101 | This is the minimum required config to get started with DevStack. | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 102 |  | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 103 | .. note:: There is a sample :download:`local.conf </assets/local.conf>` file | 
| Dr. Jens Harbott | 781fbf4 | 2022-10-11 15:41:02 +0200 | [diff] [blame] | 104 | under the *samples* directory in the devstack repository. | 
|  | 105 |  | 
|  | 106 | .. warning:: Only use alphanumeric characters in your passwords, as some | 
|  | 107 | services fail to work when using special characters. | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 108 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 109 | Start the install | 
|  | 110 | ----------------- | 
|  | 111 |  | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 112 | .. code-block:: console | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 113 |  | 
| Matt Riedemann | 584979c | 2018-12-13 08:22:12 -0500 | [diff] [blame] | 114 | $ ./stack.sh | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 115 |  | 
| Dr. Jens Harbott | fbc1865 | 2023-06-07 15:19:37 +0200 | [diff] [blame] | 116 | This will take 15 - 30 minutes, largely depending on the speed of | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 117 | your internet connection. Many git trees and packages will be | 
|  | 118 | installed during this process. | 
|  | 119 |  | 
|  | 120 | Profit! | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 121 | ------- | 
|  | 122 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 123 | You now have a working DevStack! Congrats! | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 124 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 125 | Your devstack will have installed ``keystone``, ``glance``, ``nova``, | 
| Nguyen Hai | e729976 | 2019-02-13 15:04:02 +0900 | [diff] [blame] | 126 | ``placement``, ``cinder``, ``neutron``, and ``horizon``. Floating IPs | 
|  | 127 | will be available, guests have access to the external world. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 128 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 129 | You can access horizon to experience the web interface to | 
|  | 130 | OpenStack, and manage vms, networks, volumes, and images from | 
|  | 131 | there. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 132 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 133 | You can ``source openrc`` in your shell, and then use the | 
|  | 134 | ``openstack`` command line tool to manage your devstack. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 135 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 136 | You can ``cd /opt/stack/tempest`` and run tempest tests that have | 
|  | 137 | been configured to work with your devstack. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 138 |  | 
| Sean Dague | bd6614a | 2016-08-11 09:05:16 -0400 | [diff] [blame] | 139 | You can :doc:`make code changes to OpenStack and validate them | 
|  | 140 | <development>`. | 
|  | 141 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 142 | Going further | 
|  | 143 | ------------- | 
|  | 144 |  | 
|  | 145 | Learn more about our :doc:`configuration system <configuration>` to | 
| Sean Dague | bc883df | 2016-08-12 07:21:59 -0400 | [diff] [blame] | 146 | customize devstack for your needs. Including making adjustments to the | 
|  | 147 | default :doc:`networking <networking>`. | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 148 |  | 
|  | 149 | Read :doc:`guides <guides>` for specific setups people have (note: | 
|  | 150 | guides are point in time contributions, and may not always be kept | 
|  | 151 | up to date to the latest devstack). | 
|  | 152 |  | 
|  | 153 | Enable :doc:`devstack plugins <plugins>` to support additional | 
|  | 154 | services, features, and configuration not present in base devstack. | 
|  | 155 |  | 
| Andrea Frittoli | 067e365 | 2018-02-23 16:04:46 +0000 | [diff] [blame] | 156 | Use devstack in your CI with :doc:`Ansible roles <zuul_roles>` and | 
| Andrea Frittoli | f32f3f5 | 2018-02-19 21:45:22 +0000 | [diff] [blame] | 157 | :doc:`Jobs <zuul_jobs>` for Zuul V3. Migrate your devstack Zuul V2 jobs to Zuul | 
|  | 158 | V3 with this full migration :doc:`how-to <zuul_ci_jobs_migration>`. | 
| Andrea Frittoli | fddf343 | 2018-02-19 18:34:43 +0000 | [diff] [blame] | 159 |  | 
| Sean Dague | cea7ec8 | 2016-08-05 08:29:54 -0400 | [diff] [blame] | 160 | Get :doc:`the big picture <overview>` of what we are trying to do | 
|  | 161 | with devstack, and help us by :doc:`contributing to the project | 
|  | 162 | <hacking>`. | 
| Doug Hellmann | 84ce2f1 | 2017-05-09 07:35:08 -0400 | [diff] [blame] | 163 |  | 
| Ghanshyam Mann | 4578f98 | 2020-04-19 17:54:56 -0500 | [diff] [blame] | 164 | If you are a new contributor to devstack please refer: :doc:`contributor/contributing` | 
|  | 165 |  | 
|  | 166 | .. toctree:: | 
|  | 167 | :hidden: | 
|  | 168 |  | 
|  | 169 | contributor/contributing | 
|  | 170 |  | 
| Doug Hellmann | 84ce2f1 | 2017-05-09 07:35:08 -0400 | [diff] [blame] | 171 | Contents | 
| Masayuki Igawa | 12e5ddc | 2019-09-25 12:23:16 +0900 | [diff] [blame] | 172 | ++++++++ | 
| Doug Hellmann | 84ce2f1 | 2017-05-09 07:35:08 -0400 | [diff] [blame] | 173 |  | 
|  | 174 | .. toctree:: | 
|  | 175 | :glob: | 
|  | 176 | :maxdepth: 2 | 
|  | 177 |  | 
|  | 178 | * |