blob: 263fbb9d6f51d90161c90f8d148f3e4eb921a59d [file] [log] [blame]
Dean Troyer26dd21b2014-11-06 09:33:02 -06001=========================
2All-In-One Single Machine
3=========================
Sean M. Collins09e550c2014-10-21 11:40:08 -04004
5Things are about to get real! Using OpenStack in containers or VMs is
6nice for kicking the tires, but doesn't compare to the feeling you get
7with hardware.
8
9Prerequisites Linux & Network
Sean Dague32930462014-11-18 06:51:16 -050010=============================
Sean M. Collins09e550c2014-10-21 11:40:08 -040011
12Minimal Install
Sean Dague32930462014-11-18 06:51:16 -050013---------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040014
15You need to have a system with a fresh install of Linux. You can
16download the `Minimal
17CD <https://help.ubuntu.com/community/Installation/MinimalCD>`__ for
18Ubuntu releases since DevStack will download & install all the
19additional dependencies. The netinstall ISO is available for
Dean Troyerea3cdfa2014-11-08 08:29:16 -060020`Fedora <http://mirrors.kernel.org/fedora/releases/>`__
Sean M. Collins09e550c2014-10-21 11:40:08 -040021and
Dean Troyerea3cdfa2014-11-08 08:29:16 -060022`CentOS/RHEL <http://mirrors.kernel.org/centos/>`__.
Sean M. Collins09e550c2014-10-21 11:40:08 -040023You may be tempted to use a desktop distro on a laptop, it will probably
24work but you may need to tell Network Manager to keep its fingers off
25the interface(s) that OpenStack uses for bridging.
26
27Network Configuration
Sean Dague32930462014-11-18 06:51:16 -050028---------------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040029
30Determine the network configuration on the interface used to integrate
31your OpenStack cloud with your existing network. For example, if the IPs
32given out on your network by DHCP are 192.168.1.X - where X is between
33100 and 200 you will be able to use IPs 201-254 for **floating ips**.
34
35To make things easier later change your host to use a static IP instead
36of DHCP (i.e. 192.168.1.201).
37
38Installation shake and bake
Sean Dague32930462014-11-18 06:51:16 -050039===========================
Sean M. Collins09e550c2014-10-21 11:40:08 -040040
41Add your user
Sean Dague32930462014-11-18 06:51:16 -050042-------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040043
44We need to add a user to install DevStack. (if you created a user during
45install you can skip this step and just give the user sudo privileges
46below)
47
Matt Riedemann584979c2018-12-13 08:22:12 -050048.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -040049
Matt Riedemann584979c2018-12-13 08:22:12 -050050 $ sudo useradd -s /bin/bash -d /opt/stack -m stack
Sean M. Collins09e550c2014-10-21 11:40:08 -040051
yatinkarelc64ea4f2022-04-20 12:30:09 +053052Ensure home directory for the ``stack`` user has executable permission for all,
53as RHEL based distros create it with ``700`` and Ubuntu 21.04+ with ``750``
54which can cause issues during deployment.
55
56.. code-block:: console
57
58 $ sudo chmod +x /opt/stack
59
Sean M. Collins09e550c2014-10-21 11:40:08 -040060Since this user will be making many changes to your system, it will need
61to have sudo privileges:
62
Matt Riedemann584979c2018-12-13 08:22:12 -050063.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -040064
Takashi Kajinamib609c802025-01-07 10:51:03 +090065 $ apt-get install sudo -y || dnf install -y sudo
Martin Kopecb70d98f2022-07-20 14:05:15 +000066 $ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
Matt Riedemann584979c2018-12-13 08:22:12 -050067
68.. note:: On some systems you may need to use ``sudo visudo``.
Sean M. Collins09e550c2014-10-21 11:40:08 -040069
70From here on you should use the user you created. **Logout** and
Matt Riedemann584979c2018-12-13 08:22:12 -050071**login** as that user:
72
73.. code-block:: console
74
75 $ sudo su stack && cd ~
Sean M. Collins09e550c2014-10-21 11:40:08 -040076
77Download DevStack
Sean Dague32930462014-11-18 06:51:16 -050078-----------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040079
80We'll grab the latest version of DevStack via https:
81
Matt Riedemann584979c2018-12-13 08:22:12 -050082.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -040083
Takashi Kajinamib609c802025-01-07 10:51:03 +090084 $ sudo apt-get install git -y || sudo dnf install -y git
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040085 $ git clone https://opendev.org/openstack/devstack
Matt Riedemann584979c2018-12-13 08:22:12 -050086 $ cd devstack
Sean M. Collins09e550c2014-10-21 11:40:08 -040087
88Run DevStack
Sean Dague32930462014-11-18 06:51:16 -050089------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040090
91Now to configure ``stack.sh``. DevStack includes a sample in
92``devstack/samples/local.conf``. Create ``local.conf`` as shown below to
93do the following:
94
95- Set ``FLOATING_RANGE`` to a range not used on the local network, i.e.
96 192.168.1.224/27. This configures IP addresses ending in 225-254 to
97 be used as floating IPs.
Stephen Finucane4b8cba72019-05-21 14:17:11 +010098- Set ``FIXED_RANGE`` to configure the internal address space used by the
99 instances.
Sean M. Collins09e550c2014-10-21 11:40:08 -0400100- Set the administrative password. This password is used for the
101 **admin** and **demo** accounts set up as OpenStack users.
102- Set the MySQL administrative password. The default here is a random
103 hex string which is inconvenient if you need to look at the database
104 directly for anything.
105- Set the RabbitMQ password.
106- Set the service password. This is used by the OpenStack services
107 (Nova, Glance, etc) to authenticate with Keystone.
108
Dr. Jens Harbott781fbf42022-10-11 15:41:02 +0200109.. warning:: Only use alphanumeric characters in your passwords, as some
110 services fail to work when using special characters.
111
Sean M. Collins09e550c2014-10-21 11:40:08 -0400112``local.conf`` should look something like this:
113
Matt Riedemann584979c2018-12-13 08:22:12 -0500114.. code-block:: ini
Sean M. Collins09e550c2014-10-21 11:40:08 -0400115
116 [[local|localrc]]
117 FLOATING_RANGE=192.168.1.224/27
118 FIXED_RANGE=10.11.12.0/24
Sean M. Collins09e550c2014-10-21 11:40:08 -0400119 ADMIN_PASSWORD=supersecret
Swapnil (coolsvap) Kulkarnic988bf62015-10-08 13:10:43 +0530120 DATABASE_PASSWORD=iheartdatabases
Sean M. Collins09e550c2014-10-21 11:40:08 -0400121 RABBIT_PASSWORD=flopsymopsy
122 SERVICE_PASSWORD=iheartksl
123
Matt Riedemann584979c2018-12-13 08:22:12 -0500124.. note:: There is a sample :download:`local.conf </assets/local.conf>` file
125 under the *samples* directory in the devstack repository.
126
Sean M. Collins09e550c2014-10-21 11:40:08 -0400127Run DevStack:
128
Matt Riedemann584979c2018-12-13 08:22:12 -0500129.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -0400130
Matt Riedemann584979c2018-12-13 08:22:12 -0500131 $ ./stack.sh
Sean M. Collins09e550c2014-10-21 11:40:08 -0400132
133A seemingly endless stream of activity ensues. When complete you will
134see a summary of ``stack.sh``'s work, including the relevant URLs,
135accounts and passwords to poke at your shiny new OpenStack.
136
137Using OpenStack
Sean Dague32930462014-11-18 06:51:16 -0500138---------------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400139
140At this point you should be able to access the dashboard from other
141computers on the local network. In this example that would be
142http://192.168.1.201/ for the dashboard (aka Horizon). Launch VMs and if
143you give them floating IPs and security group access those VMs will be
144accessible from other machines on your network.