blob: 0db0466281c8afb0515f31812985b8aeb3f913c9 [file] [log] [blame]
Sean M. Collins09e550c2014-10-21 11:40:08 -04001`DevStack </>`__
2
3- `Overview <../overview.html>`__
4- `Changes <../changes.html>`__
5- `FAQ <../faq.html>`__
6- `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
7- `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
8
9All-In-One: Dedicated Hardware
10==============================
11
12Things are about to get real! Using OpenStack in containers or VMs is
13nice for kicking the tires, but doesn't compare to the feeling you get
14with hardware.
15
16Prerequisites Linux & Network
17-----------------------------
18
19Minimal Install
20~~~~~~~~~~~~~~~
21
22You need to have a system with a fresh install of Linux. You can
23download the `Minimal
24CD <https://help.ubuntu.com/community/Installation/MinimalCD>`__ for
25Ubuntu releases since DevStack will download & install all the
26additional dependencies. The netinstall ISO is available for
27`Fedora <http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-20-x86_64-netinst.iso>`__
28and
29`CentOS/RHEL <http://mirrors.kernel.org/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-netinstall.iso>`__.
30You may be tempted to use a desktop distro on a laptop, it will probably
31work but you may need to tell Network Manager to keep its fingers off
32the interface(s) that OpenStack uses for bridging.
33
34Network Configuration
35~~~~~~~~~~~~~~~~~~~~~
36
37Determine the network configuration on the interface used to integrate
38your OpenStack cloud with your existing network. For example, if the IPs
39given out on your network by DHCP are 192.168.1.X - where X is between
40100 and 200 you will be able to use IPs 201-254 for **floating ips**.
41
42To make things easier later change your host to use a static IP instead
43of DHCP (i.e. 192.168.1.201).
44
45Installation shake and bake
46---------------------------
47
48Add your user
49~~~~~~~~~~~~~
50
51We need to add a user to install DevStack. (if you created a user during
52install you can skip this step and just give the user sudo privileges
53below)
54
55::
56
57 adduser stack
58
59Since this user will be making many changes to your system, it will need
60to have sudo privileges:
61
62::
63
64 apt-get install sudo -y || yum install -y sudo
65 echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
66
67From here on you should use the user you created. **Logout** and
68**login** as that user.
69
70Download DevStack
71~~~~~~~~~~~~~~~~~
72
73We'll grab the latest version of DevStack via https:
74
75::
76
77 sudo apt-get install git -y || yum install -y git
78 git clone https://git.openstack.org/openstack-dev/devstack
79 cd devstack
80
81Run DevStack
82~~~~~~~~~~~~
83
84Now to configure ``stack.sh``. DevStack includes a sample in
85``devstack/samples/local.conf``. Create ``local.conf`` as shown below to
86do the following:
87
88- Set ``FLOATING_RANGE`` to a range not used on the local network, i.e.
89 192.168.1.224/27. This configures IP addresses ending in 225-254 to
90 be used as floating IPs.
91- Set ``FIXED_RANGE`` and ``FIXED_NETWORK_SIZE`` to configure the
92 internal address space used by the instances.
93- Set ``FLAT_INTERFACE`` to the Ethernet interface that connects the
94 host to your local network. This is the interface that should be
95 configured with the static IP address mentioned above.
96- Set the administrative password. This password is used for the
97 **admin** and **demo** accounts set up as OpenStack users.
98- Set the MySQL administrative password. The default here is a random
99 hex string which is inconvenient if you need to look at the database
100 directly for anything.
101- Set the RabbitMQ password.
102- Set the service password. This is used by the OpenStack services
103 (Nova, Glance, etc) to authenticate with Keystone.
104
105``local.conf`` should look something like this:
106
107::
108
109 [[local|localrc]]
110 FLOATING_RANGE=192.168.1.224/27
111 FIXED_RANGE=10.11.12.0/24
112 FIXED_NETWORK_SIZE=256
113 FLAT_INTERFACE=eth0
114 ADMIN_PASSWORD=supersecret
115 MYSQL_PASSWORD=iheartdatabases
116 RABBIT_PASSWORD=flopsymopsy
117 SERVICE_PASSWORD=iheartksl
118
119Run DevStack:
120
121::
122
123 ./stack.sh
124
125A seemingly endless stream of activity ensues. When complete you will
126see a summary of ``stack.sh``'s work, including the relevant URLs,
127accounts and passwords to poke at your shiny new OpenStack.
128
129Using OpenStack
130~~~~~~~~~~~~~~~
131
132At this point you should be able to access the dashboard from other
133computers on the local network. In this example that would be
134http://192.168.1.201/ for the dashboard (aka Horizon). Launch VMs and if
135you give them floating IPs and security group access those VMs will be
136accessible from other machines on your network.
137
138Some examples of using the OpenStack command-line clients ``nova`` and
139``glance`` are in the shakedown scripts in ``devstack/exercises``.
140``exercise.sh`` will run all of those scripts and report on the results.
141
142© Openstack Foundation 2011-2013 — An `OpenStack
143program <https://wiki.openstack.org/wiki/Programs>`__ created by
144`Rackspace Cloud
145Builders <http://www.rackspace.com/cloud/private_edition/>`__