blob: 9eaa38a49a97965e49cb3e0f9da3fb5e4f7fa2fe [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
10-----------------------------
11
12Minimal Install
13~~~~~~~~~~~~~~~
14
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
20`Fedora <http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-20-x86_64-netinst.iso>`__
21and
22`CentOS/RHEL <http://mirrors.kernel.org/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-netinstall.iso>`__.
23You 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
28~~~~~~~~~~~~~~~~~~~~~
29
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
39---------------------------
40
41Add your user
42~~~~~~~~~~~~~
43
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
48::
49
50 adduser stack
51
52Since this user will be making many changes to your system, it will need
53to have sudo privileges:
54
55::
56
57 apt-get install sudo -y || yum install -y sudo
58 echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
59
60From here on you should use the user you created. **Logout** and
61**login** as that user.
62
63Download DevStack
64~~~~~~~~~~~~~~~~~
65
66We'll grab the latest version of DevStack via https:
67
68::
69
70 sudo apt-get install git -y || yum install -y git
71 git clone https://git.openstack.org/openstack-dev/devstack
72 cd devstack
73
74Run DevStack
75~~~~~~~~~~~~
76
77Now to configure ``stack.sh``. DevStack includes a sample in
78``devstack/samples/local.conf``. Create ``local.conf`` as shown below to
79do the following:
80
81- Set ``FLOATING_RANGE`` to a range not used on the local network, i.e.
82 192.168.1.224/27. This configures IP addresses ending in 225-254 to
83 be used as floating IPs.
84- Set ``FIXED_RANGE`` and ``FIXED_NETWORK_SIZE`` to configure the
85 internal address space used by the instances.
86- Set ``FLAT_INTERFACE`` to the Ethernet interface that connects the
87 host to your local network. This is the interface that should be
88 configured with the static IP address mentioned above.
89- Set the administrative password. This password is used for the
90 **admin** and **demo** accounts set up as OpenStack users.
91- Set the MySQL administrative password. The default here is a random
92 hex string which is inconvenient if you need to look at the database
93 directly for anything.
94- Set the RabbitMQ password.
95- Set the service password. This is used by the OpenStack services
96 (Nova, Glance, etc) to authenticate with Keystone.
97
98``local.conf`` should look something like this:
99
100::
101
102 [[local|localrc]]
103 FLOATING_RANGE=192.168.1.224/27
104 FIXED_RANGE=10.11.12.0/24
105 FIXED_NETWORK_SIZE=256
106 FLAT_INTERFACE=eth0
107 ADMIN_PASSWORD=supersecret
108 MYSQL_PASSWORD=iheartdatabases
109 RABBIT_PASSWORD=flopsymopsy
110 SERVICE_PASSWORD=iheartksl
111
112Run DevStack:
113
114::
115
116 ./stack.sh
117
118A seemingly endless stream of activity ensues. When complete you will
119see a summary of ``stack.sh``'s work, including the relevant URLs,
120accounts and passwords to poke at your shiny new OpenStack.
121
122Using OpenStack
123~~~~~~~~~~~~~~~
124
125At this point you should be able to access the dashboard from other
126computers on the local network. In this example that would be
127http://192.168.1.201/ for the dashboard (aka Horizon). Launch VMs and if
128you give them floating IPs and security group access those VMs will be
129accessible from other machines on your network.
130
131Some examples of using the OpenStack command-line clients ``nova`` and
132``glance`` are in the shakedown scripts in ``devstack/exercises``.
133``exercise.sh`` will run all of those scripts and report on the results.