blob: a0e97edb37c62d0e07b277312ea6cc2ae6a6aa4a [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
52Since this user will be making many changes to your system, it will need
53to have sudo privileges:
54
Matt Riedemann584979c2018-12-13 08:22:12 -050055.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -040056
Matt Riedemann584979c2018-12-13 08:22:12 -050057 $ apt-get install sudo -y || yum install -y sudo
58 $ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
59
60.. note:: On some systems you may need to use ``sudo visudo``.
Sean M. Collins09e550c2014-10-21 11:40:08 -040061
62From here on you should use the user you created. **Logout** and
Matt Riedemann584979c2018-12-13 08:22:12 -050063**login** as that user:
64
65.. code-block:: console
66
67 $ sudo su stack && cd ~
Sean M. Collins09e550c2014-10-21 11:40:08 -040068
69Download DevStack
Sean Dague32930462014-11-18 06:51:16 -050070-----------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040071
72We'll grab the latest version of DevStack via https:
73
Matt Riedemann584979c2018-12-13 08:22:12 -050074.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -040075
Matt Riedemann584979c2018-12-13 08:22:12 -050076 $ sudo apt-get install git -y || sudo yum install -y git
Matt Riedemann9b6d2f22019-06-18 10:43:16 -040077 $ git clone https://opendev.org/openstack/devstack
Matt Riedemann584979c2018-12-13 08:22:12 -050078 $ cd devstack
Sean M. Collins09e550c2014-10-21 11:40:08 -040079
80Run DevStack
Sean Dague32930462014-11-18 06:51:16 -050081------------
Sean M. Collins09e550c2014-10-21 11:40:08 -040082
83Now to configure ``stack.sh``. DevStack includes a sample in
84``devstack/samples/local.conf``. Create ``local.conf`` as shown below to
85do the following:
86
87- Set ``FLOATING_RANGE`` to a range not used on the local network, i.e.
88 192.168.1.224/27. This configures IP addresses ending in 225-254 to
89 be used as floating IPs.
Stephen Finucane4b8cba72019-05-21 14:17:11 +010090- Set ``FIXED_RANGE`` to configure the internal address space used by the
91 instances.
Sean M. Collins09e550c2014-10-21 11:40:08 -040092- Set the administrative password. This password is used for the
93 **admin** and **demo** accounts set up as OpenStack users.
94- Set the MySQL administrative password. The default here is a random
95 hex string which is inconvenient if you need to look at the database
96 directly for anything.
97- Set the RabbitMQ password.
98- Set the service password. This is used by the OpenStack services
99 (Nova, Glance, etc) to authenticate with Keystone.
100
101``local.conf`` should look something like this:
102
Matt Riedemann584979c2018-12-13 08:22:12 -0500103.. code-block:: ini
Sean M. Collins09e550c2014-10-21 11:40:08 -0400104
105 [[local|localrc]]
106 FLOATING_RANGE=192.168.1.224/27
107 FIXED_RANGE=10.11.12.0/24
Sean M. Collins09e550c2014-10-21 11:40:08 -0400108 ADMIN_PASSWORD=supersecret
Swapnil (coolsvap) Kulkarnic988bf62015-10-08 13:10:43 +0530109 DATABASE_PASSWORD=iheartdatabases
Sean M. Collins09e550c2014-10-21 11:40:08 -0400110 RABBIT_PASSWORD=flopsymopsy
111 SERVICE_PASSWORD=iheartksl
112
Matt Riedemann584979c2018-12-13 08:22:12 -0500113.. note:: There is a sample :download:`local.conf </assets/local.conf>` file
114 under the *samples* directory in the devstack repository.
115
Sean M. Collins09e550c2014-10-21 11:40:08 -0400116Run DevStack:
117
Matt Riedemann584979c2018-12-13 08:22:12 -0500118.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -0400119
Matt Riedemann584979c2018-12-13 08:22:12 -0500120 $ ./stack.sh
Sean M. Collins09e550c2014-10-21 11:40:08 -0400121
122A seemingly endless stream of activity ensues. When complete you will
123see a summary of ``stack.sh``'s work, including the relevant URLs,
124accounts and passwords to poke at your shiny new OpenStack.
125
126Using OpenStack
Sean Dague32930462014-11-18 06:51:16 -0500127---------------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400128
129At this point you should be able to access the dashboard from other
130computers on the local network. In this example that would be
131http://192.168.1.201/ for the dashboard (aka Horizon). Launch VMs and if
132you give them floating IPs and security group access those VMs will be
133accessible from other machines on your network.