blob: 168172c630bb860a505650471bd2c969d35f1661 [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
77 $ git clone https://git.openstack.org/openstack-dev/devstack
78 $ 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.
90- Set ``FIXED_RANGE`` and ``FIXED_NETWORK_SIZE`` to configure the
91 internal address space used by the instances.
92- Set ``FLAT_INTERFACE`` to the Ethernet interface that connects the
93 host to your local network. This is the interface that should be
94 configured with the static IP address mentioned above.
95- Set the administrative password. This password is used for the
96 **admin** and **demo** accounts set up as OpenStack users.
97- Set the MySQL administrative password. The default here is a random
98 hex string which is inconvenient if you need to look at the database
99 directly for anything.
100- Set the RabbitMQ password.
101- Set the service password. This is used by the OpenStack services
102 (Nova, Glance, etc) to authenticate with Keystone.
103
104``local.conf`` should look something like this:
105
Matt Riedemann584979c2018-12-13 08:22:12 -0500106.. code-block:: ini
Sean M. Collins09e550c2014-10-21 11:40:08 -0400107
108 [[local|localrc]]
109 FLOATING_RANGE=192.168.1.224/27
110 FIXED_RANGE=10.11.12.0/24
111 FIXED_NETWORK_SIZE=256
112 FLAT_INTERFACE=eth0
113 ADMIN_PASSWORD=supersecret
Swapnil (coolsvap) Kulkarnic988bf62015-10-08 13:10:43 +0530114 DATABASE_PASSWORD=iheartdatabases
Sean M. Collins09e550c2014-10-21 11:40:08 -0400115 RABBIT_PASSWORD=flopsymopsy
116 SERVICE_PASSWORD=iheartksl
117
Matt Riedemann584979c2018-12-13 08:22:12 -0500118.. note:: There is a sample :download:`local.conf </assets/local.conf>` file
119 under the *samples* directory in the devstack repository.
120
Sean M. Collins09e550c2014-10-21 11:40:08 -0400121Run DevStack:
122
Matt Riedemann584979c2018-12-13 08:22:12 -0500123.. code-block:: console
Sean M. Collins09e550c2014-10-21 11:40:08 -0400124
Matt Riedemann584979c2018-12-13 08:22:12 -0500125 $ ./stack.sh
Sean M. Collins09e550c2014-10-21 11:40:08 -0400126
127A seemingly endless stream of activity ensues. When complete you will
128see a summary of ``stack.sh``'s work, including the relevant URLs,
129accounts and passwords to poke at your shiny new OpenStack.
130
131Using OpenStack
Sean Dague32930462014-11-18 06:51:16 -0500132---------------
Sean M. Collins09e550c2014-10-21 11:40:08 -0400133
134At this point you should be able to access the dashboard from other
135computers on the local network. In this example that would be
136http://192.168.1.201/ for the dashboard (aka Horizon). Launch VMs and if
137you give them floating IPs and security group access those VMs will be
138accessible from other machines on your network.