blob: 1e932f88a56af34bfb7015a4fd77cc48a5a49fc6 [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
Masayuki Igawa12e5ddc2019-09-25 12:23:16 +090014DevStack
15========
Sean M. Collins09e550c2014-10-21 11:40:08 -040016
Dean Troyeraf140292014-11-20 21:13:15 -060017.. image:: assets/images/logo-blue.png
18
Ian Wienand7cd16ce2016-04-08 09:40:56 +100019DevStack is a series of extensible scripts used to quickly bring up a
Sean Daguecea7ec82016-08-05 08:29:54 -040020complete OpenStack environment based on the latest versions of
21everything from git master. It is used interactively as a development
22environment and as the basis for much of the OpenStack project's
23functional testing.
Ian Wienand7cd16ce2016-04-08 09:40:56 +100024
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040025The source is available at `<https://opendev.org/openstack/devstack>`__.
Ian Wienand7cd16ce2016-04-08 09:40:56 +100026
Sean Daguecea7ec82016-08-05 08:29:54 -040027.. warning::
Sean M. Collins09e550c2014-10-21 11:40:08 -040028
Sean Daguecea7ec82016-08-05 08:29:54 -040029 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. Collins09e550c2014-10-21 11:40:08 -040032
Dean Troyer26dd21b2014-11-06 09:33:02 -060033Quick Start
Masayuki Igawa12e5ddc2019-09-25 12:23:16 +090034+++++++++++
Sean M. Collins09e550c2014-10-21 11:40:08 -040035
Sean Daguecea7ec82016-08-05 08:29:54 -040036Install Linux
Sean M. Collins09e550c2014-10-21 11:40:08 -040037-------------
38
Jens Harbott7224a6b2019-04-01 11:16:53 +000039Start with a clean and minimal install of a Linux system. DevStack
Laura Sofia Enriquez1c75d2f2018-10-11 19:13:17 -030040attempts to support the two latest LTS releases of Ubuntu, the
wangxiyuan6440c6d2022-08-05 14:18:13 +080041latest/current Fedora version, CentOS/RHEL/Rocky Linux 9, OpenSUSE and
42openEuler.
Sean M. Collins09e550c2014-10-21 11:40:08 -040043
Martin Kopec818d1a22022-11-28 11:19:45 +010044If you do not have a preference, Ubuntu 22.04 (Jammy) is the
Jens Harbott7224a6b2019-04-01 11:16:53 +000045most tested, and will probably go the smoothest.
Sean Daguecea7ec82016-08-05 08:29:54 -040046
Jens Harbott7224a6b2019-04-01 11:16:53 +000047Add Stack User (optional)
48-------------------------
Sean Daguecea7ec82016-08-05 08:29:54 -040049
Jens Harbott7224a6b2019-04-01 11:16:53 +000050DevStack should be run as a non-root user with sudo enabled
Sean Daguecea7ec82016-08-05 08:29:54 -040051(standard logins to cloud images such as "ubuntu" or "cloud-user"
52are usually fine).
53
Jens Harbott7224a6b2019-04-01 11:16:53 +000054If you are not using a cloud image, you can create a separate `stack` user
55to run DevStack with
Sean Daguecea7ec82016-08-05 08:29:54 -040056
Matt Riedemann584979c2018-12-13 08:22:12 -050057.. code-block:: console
Sean Daguecea7ec82016-08-05 08:29:54 -040058
David Rabelfca0da52017-03-17 14:47:18 +010059 $ sudo useradd -s /bin/bash -d /opt/stack -m stack
Sharat Sharma89a855f2016-10-03 12:10:23 +053060
yatinkarelc64ea4f2022-04-20 12:30:09 +053061Ensure home directory for the ``stack`` user has executable permission for all,
62as RHEL based distros create it with ``700`` and Ubuntu 21.04+ with ``750``
63which can cause issues during deployment.
64
65.. code-block:: console
66
67 $ sudo chmod +x /opt/stack
68
Sharat Sharma89a855f2016-10-03 12:10:23 +053069Since this user will be making many changes to your system, it should
70have sudo privileges:
71
Matt Riedemann584979c2018-12-13 08:22:12 -050072.. code-block:: console
Sharat Sharma89a855f2016-10-03 12:10:23 +053073
Cyril Roelandta48ffa82017-04-06 15:23:13 +020074 $ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
Marek Tamaskovic52448772021-07-28 16:54:50 +020075 $ sudo -u stack -i
Sharat Sharma89a855f2016-10-03 12:10:23 +053076
77Download DevStack
78-----------------
79
Matt Riedemann584979c2018-12-13 08:22:12 -050080.. code-block:: console
Sharat Sharma89a855f2016-10-03 12:10:23 +053081
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040082 $ git clone https://opendev.org/openstack/devstack
Sharat Sharma89a855f2016-10-03 12:10:23 +053083 $ cd devstack
84
85The ``devstack`` repo contains a script that installs OpenStack and
Jens Harbott7224a6b2019-04-01 11:16:53 +000086templates for configuration files.
Sharat Sharma89a855f2016-10-03 12:10:23 +053087
88Create a local.conf
89-------------------
90
Jens Harbott7224a6b2019-04-01 11:16:53 +000091Create a ``local.conf`` file with four passwords preset at the root of the
Sharat Sharma89a855f2016-10-03 12:10:23 +053092devstack git repo.
Matt Riedemann584979c2018-12-13 08:22:12 -050093
94.. code-block:: ini
Sharat Sharma89a855f2016-10-03 12:10:23 +053095
96 [[local|localrc]]
97 ADMIN_PASSWORD=secret
98 DATABASE_PASSWORD=$ADMIN_PASSWORD
99 RABBIT_PASSWORD=$ADMIN_PASSWORD
100 SERVICE_PASSWORD=$ADMIN_PASSWORD
101
102This is the minimum required config to get started with DevStack.
Sean Daguecea7ec82016-08-05 08:29:54 -0400103
Matt Riedemann584979c2018-12-13 08:22:12 -0500104.. note:: There is a sample :download:`local.conf </assets/local.conf>` file
Dr. Jens Harbott781fbf42022-10-11 15:41:02 +0200105 under the *samples* directory in the devstack repository.
106
107.. warning:: Only use alphanumeric characters in your passwords, as some
108 services fail to work when using special characters.
Matt Riedemann584979c2018-12-13 08:22:12 -0500109
Sean Daguecea7ec82016-08-05 08:29:54 -0400110Start the install
111-----------------
112
Matt Riedemann584979c2018-12-13 08:22:12 -0500113.. code-block:: console
Sean Daguecea7ec82016-08-05 08:29:54 -0400114
Matt Riedemann584979c2018-12-13 08:22:12 -0500115 $ ./stack.sh
Sean Daguecea7ec82016-08-05 08:29:54 -0400116
117This will take a 15 - 20 minutes, largely depending on the speed of
118your internet connection. Many git trees and packages will be
119installed during this process.
120
121Profit!
Sean M. Collins09e550c2014-10-21 11:40:08 -0400122-------
123
Sean Daguecea7ec82016-08-05 08:29:54 -0400124You now have a working DevStack! Congrats!
Sean M. Collins09e550c2014-10-21 11:40:08 -0400125
Sean Daguecea7ec82016-08-05 08:29:54 -0400126Your devstack will have installed ``keystone``, ``glance``, ``nova``,
Nguyen Haie7299762019-02-13 15:04:02 +0900127``placement``, ``cinder``, ``neutron``, and ``horizon``. Floating IPs
128will be available, guests have access to the external world.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400129
Sean Daguecea7ec82016-08-05 08:29:54 -0400130You can access horizon to experience the web interface to
131OpenStack, and manage vms, networks, volumes, and images from
132there.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400133
Sean Daguecea7ec82016-08-05 08:29:54 -0400134You can ``source openrc`` in your shell, and then use the
135``openstack`` command line tool to manage your devstack.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400136
Sean Daguecea7ec82016-08-05 08:29:54 -0400137You can ``cd /opt/stack/tempest`` and run tempest tests that have
138been configured to work with your devstack.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400139
Sean Daguebd6614a2016-08-11 09:05:16 -0400140You can :doc:`make code changes to OpenStack and validate them
141<development>`.
142
Sean Daguecea7ec82016-08-05 08:29:54 -0400143Going further
144-------------
145
146Learn more about our :doc:`configuration system <configuration>` to
Sean Daguebc883df2016-08-12 07:21:59 -0400147customize devstack for your needs. Including making adjustments to the
148default :doc:`networking <networking>`.
Sean Daguecea7ec82016-08-05 08:29:54 -0400149
150Read :doc:`guides <guides>` for specific setups people have (note:
151guides are point in time contributions, and may not always be kept
152up to date to the latest devstack).
153
154Enable :doc:`devstack plugins <plugins>` to support additional
155services, features, and configuration not present in base devstack.
156
Andrea Frittoli067e3652018-02-23 16:04:46 +0000157Use devstack in your CI with :doc:`Ansible roles <zuul_roles>` and
Andrea Frittolif32f3f52018-02-19 21:45:22 +0000158:doc:`Jobs <zuul_jobs>` for Zuul V3. Migrate your devstack Zuul V2 jobs to Zuul
159V3 with this full migration :doc:`how-to <zuul_ci_jobs_migration>`.
Andrea Frittolifddf3432018-02-19 18:34:43 +0000160
Sean Daguecea7ec82016-08-05 08:29:54 -0400161Get :doc:`the big picture <overview>` of what we are trying to do
162with devstack, and help us by :doc:`contributing to the project
163<hacking>`.
Doug Hellmann84ce2f12017-05-09 07:35:08 -0400164
Ghanshyam Mann4578f982020-04-19 17:54:56 -0500165If you are a new contributor to devstack please refer: :doc:`contributor/contributing`
166
167.. toctree::
168 :hidden:
169
170 contributor/contributing
171
Doug Hellmann84ce2f12017-05-09 07:35:08 -0400172Contents
Masayuki Igawa12e5ddc2019-09-25 12:23:16 +0900173++++++++
Doug Hellmann84ce2f12017-05-09 07:35:08 -0400174
175.. toctree::
176 :glob:
177 :maxdepth: 2
178
179 *