blob: 1ea1c5ddae763c206d0bffe4aafe6df5deb01838 [file] [log] [blame]
Sean Daguecea7ec82016-08-05 08:29:54 -04001.. 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
14==========
15 DevStack
16==========
Sean M. Collins09e550c2014-10-21 11:40:08 -040017
Dean Troyeraf140292014-11-20 21:13:15 -060018.. image:: assets/images/logo-blue.png
19
Ian Wienand7cd16ce2016-04-08 09:40:56 +100020DevStack is a series of extensible scripts used to quickly bring up a
Sean Daguecea7ec82016-08-05 08:29:54 -040021complete OpenStack environment based on the latest versions of
22everything from git master. It is used interactively as a development
23environment and as the basis for much of the OpenStack project's
24functional testing.
Ian Wienand7cd16ce2016-04-08 09:40:56 +100025
26The source is available at
27`<https://git.openstack.org/cgit/openstack-dev/devstack>`__.
28
Sean Daguecea7ec82016-08-05 08:29:54 -040029.. warning::
Sean M. Collins09e550c2014-10-21 11:40:08 -040030
Sean Daguecea7ec82016-08-05 08:29:54 -040031 DevStack will make substantial changes to your system during
32 installation. Only run DevStack on servers or virtual machines that
33 are dedicated to this purpose.
Sean M. Collins09e550c2014-10-21 11:40:08 -040034
Dean Troyer26dd21b2014-11-06 09:33:02 -060035Quick Start
Sean Daguecea7ec82016-08-05 08:29:54 -040036===========
Sean M. Collins09e550c2014-10-21 11:40:08 -040037
Sean Daguecea7ec82016-08-05 08:29:54 -040038Install Linux
Sean M. Collins09e550c2014-10-21 11:40:08 -040039-------------
40
Jens Harbott7224a6b2019-04-01 11:16:53 +000041Start with a clean and minimal install of a Linux system. DevStack
Laura Sofia Enriquez1c75d2f2018-10-11 19:13:17 -030042attempts to support the two latest LTS releases of Ubuntu, the
43latest/current Fedora version, CentOS/RHEL 7, as well as Debian and
44OpenSUSE.
Sean M. Collins09e550c2014-10-21 11:40:08 -040045
Jens Harbott7224a6b2019-04-01 11:16:53 +000046If you do not have a preference, Ubuntu 18.04 (Bionic Beaver) is the
47most tested, and will probably go the smoothest.
Sean Daguecea7ec82016-08-05 08:29:54 -040048
Jens Harbott7224a6b2019-04-01 11:16:53 +000049Add Stack User (optional)
50-------------------------
Sean Daguecea7ec82016-08-05 08:29:54 -040051
Jens Harbott7224a6b2019-04-01 11:16:53 +000052DevStack should be run as a non-root user with sudo enabled
Sean Daguecea7ec82016-08-05 08:29:54 -040053(standard logins to cloud images such as "ubuntu" or "cloud-user"
54are usually fine).
55
Jens Harbott7224a6b2019-04-01 11:16:53 +000056If you are not using a cloud image, you can create a separate `stack` user
57to run DevStack with
Sean Daguecea7ec82016-08-05 08:29:54 -040058
Matt Riedemann584979c2018-12-13 08:22:12 -050059.. code-block:: console
Sean Daguecea7ec82016-08-05 08:29:54 -040060
David Rabelfca0da52017-03-17 14:47:18 +010061 $ sudo useradd -s /bin/bash -d /opt/stack -m stack
Sharat Sharma89a855f2016-10-03 12:10:23 +053062
63Since this user will be making many changes to your system, it should
64have sudo privileges:
65
Matt Riedemann584979c2018-12-13 08:22:12 -050066.. code-block:: console
Sharat Sharma89a855f2016-10-03 12:10:23 +053067
Cyril Roelandta48ffa82017-04-06 15:23:13 +020068 $ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
Attila Fazekas9ef346f2017-02-13 15:09:35 +010069 $ sudo su - stack
Sharat Sharma89a855f2016-10-03 12:10:23 +053070
71Download DevStack
72-----------------
73
Matt Riedemann584979c2018-12-13 08:22:12 -050074.. code-block:: console
Sharat Sharma89a855f2016-10-03 12:10:23 +053075
76 $ git clone https://git.openstack.org/openstack-dev/devstack
77 $ cd devstack
78
79The ``devstack`` repo contains a script that installs OpenStack and
Jens Harbott7224a6b2019-04-01 11:16:53 +000080templates for configuration files.
Sharat Sharma89a855f2016-10-03 12:10:23 +053081
82Create a local.conf
83-------------------
84
Jens Harbott7224a6b2019-04-01 11:16:53 +000085Create a ``local.conf`` file with four passwords preset at the root of the
Sharat Sharma89a855f2016-10-03 12:10:23 +053086devstack git repo.
Matt Riedemann584979c2018-12-13 08:22:12 -050087
88.. code-block:: ini
Sharat Sharma89a855f2016-10-03 12:10:23 +053089
90 [[local|localrc]]
91 ADMIN_PASSWORD=secret
92 DATABASE_PASSWORD=$ADMIN_PASSWORD
93 RABBIT_PASSWORD=$ADMIN_PASSWORD
94 SERVICE_PASSWORD=$ADMIN_PASSWORD
95
96This is the minimum required config to get started with DevStack.
Sean Daguecea7ec82016-08-05 08:29:54 -040097
Matt Riedemann584979c2018-12-13 08:22:12 -050098.. note:: There is a sample :download:`local.conf </assets/local.conf>` file
99 under the *samples* directory in the devstack repository.
100
Sean Daguecea7ec82016-08-05 08:29:54 -0400101Start the install
102-----------------
103
Matt Riedemann584979c2018-12-13 08:22:12 -0500104.. code-block:: console
Sean Daguecea7ec82016-08-05 08:29:54 -0400105
Matt Riedemann584979c2018-12-13 08:22:12 -0500106 $ ./stack.sh
Sean Daguecea7ec82016-08-05 08:29:54 -0400107
108This will take a 15 - 20 minutes, largely depending on the speed of
109your internet connection. Many git trees and packages will be
110installed during this process.
111
112Profit!
Sean M. Collins09e550c2014-10-21 11:40:08 -0400113-------
114
Sean Daguecea7ec82016-08-05 08:29:54 -0400115You now have a working DevStack! Congrats!
Sean M. Collins09e550c2014-10-21 11:40:08 -0400116
Sean Daguecea7ec82016-08-05 08:29:54 -0400117Your devstack will have installed ``keystone``, ``glance``, ``nova``,
Nguyen Haie7299762019-02-13 15:04:02 +0900118``placement``, ``cinder``, ``neutron``, and ``horizon``. Floating IPs
119will be available, guests have access to the external world.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400120
Sean Daguecea7ec82016-08-05 08:29:54 -0400121You can access horizon to experience the web interface to
122OpenStack, and manage vms, networks, volumes, and images from
123there.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400124
Sean Daguecea7ec82016-08-05 08:29:54 -0400125You can ``source openrc`` in your shell, and then use the
126``openstack`` command line tool to manage your devstack.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400127
Sean Daguecea7ec82016-08-05 08:29:54 -0400128You can ``cd /opt/stack/tempest`` and run tempest tests that have
129been configured to work with your devstack.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400130
Sean Daguebd6614a2016-08-11 09:05:16 -0400131You can :doc:`make code changes to OpenStack and validate them
132<development>`.
133
Sean Daguecea7ec82016-08-05 08:29:54 -0400134Going further
135-------------
136
137Learn more about our :doc:`configuration system <configuration>` to
Sean Daguebc883df2016-08-12 07:21:59 -0400138customize devstack for your needs. Including making adjustments to the
139default :doc:`networking <networking>`.
Sean Daguecea7ec82016-08-05 08:29:54 -0400140
141Read :doc:`guides <guides>` for specific setups people have (note:
142guides are point in time contributions, and may not always be kept
143up to date to the latest devstack).
144
145Enable :doc:`devstack plugins <plugins>` to support additional
146services, features, and configuration not present in base devstack.
147
Andrea Frittoli067e3652018-02-23 16:04:46 +0000148Use devstack in your CI with :doc:`Ansible roles <zuul_roles>` and
Andrea Frittolif32f3f52018-02-19 21:45:22 +0000149:doc:`Jobs <zuul_jobs>` for Zuul V3. Migrate your devstack Zuul V2 jobs to Zuul
150V3 with this full migration :doc:`how-to <zuul_ci_jobs_migration>`.
Andrea Frittolifddf3432018-02-19 18:34:43 +0000151
Sean Daguecea7ec82016-08-05 08:29:54 -0400152Get :doc:`the big picture <overview>` of what we are trying to do
153with devstack, and help us by :doc:`contributing to the project
154<hacking>`.
Doug Hellmann84ce2f12017-05-09 07:35:08 -0400155
156Contents
157--------
158
159.. toctree::
160 :glob:
161 :maxdepth: 2
162
163 *