devstack/docs/source/guides/single-machine.html
Dean Troyer 1c42599a3b devstack.org site updates
Includes:
* Change Precise to Trusty
* Add the new plugin phase
* Remove deprecated config options
* much, much more

Change-Id: I0385f18a3256ad37a611e505e49572f27b3bcc10
2014-07-28 17:51:29 -05:00

132 lines
7.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Single Machine Guide - DevStack</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<link href="../assets/css/local.css" rel="stylesheet">
<style type="text/css">
body { padding-top: 60px; }
dd { padding: 10px; }
</style>
<!-- Le javascripts -->
<script src="../assets/js/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../assets/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="/">DevStack</a>
<ul class="nav pull-right">
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
<li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<section id="overview">
<h1>All-In-One: Dedicated Hardware</h1>
<p>Things are about to get real! Using OpenStack in containers or VMs is nice for kicking the tires, but doesn't compare to the feeling you get with hardware.</p>
</section>
<section id="prerequisites">
<div class="page-header">
<h2>Prerequisites <small>Linux & Network</small></h2>
</div>
<h3>Minimal Install</h3>
<p>You need to have a system with a fresh install of Linux. You can download the <a href="https://help.ubuntu.com/community/Installation/MinimalCD">Minimal CD</a> for Ubuntu releases since DevStack will download &amp; install all the additional dependencies. The netinstall ISO is available for <a href="http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/Fedora-20-x86_64-netinst.iso">Fedora</a> and <a href="http://mirrors.kernel.org/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-netinstall.iso">CentOS/RHEL</a>. You may be tempted to use a desktop distro on a laptop, it will probably work but you may need to tell Network Manager to keep its fingers off the interface(s) that OpenStack uses for bridging.</p>
<h3>Network Configuration</h3>
<p>Determine the network configuration on the interface used to integrate your
OpenStack cloud with your existing network. For example, if the IPs given out on your network
by DHCP are 192.168.1.X - where X is between 100 and 200 you will be able to use IPs
201-254 for <b>floating ips</b>.</p>
<p>To make things easier later change your host to use a static IP instead of DHCP (i.e. 192.168.1.201).</p>
</section>
<section id="installation">
<div class="page-header">
<h2>Installation <small>shake and bake</small></h2>
</div>
<h3>Add your user</h3>
<p>We need to add a user to install DevStack. (if you created a user during install you can skip this step and just give the user sudo priviledges below)</p>
<pre>adduser stack</pre>
<p>Since this user will be making many changes to your system, it will need to have sudo priviledges:</p>
<pre>apt-get install sudo -y || yum install -y sudo
echo "stack ALL=(ALL) NOPASSWD: ALL" &gt;&gt; /etc/sudoers</pre>
<p>From here on you should use the user you created. <b>Logout</b> and <b>login</b> as that user.</p>
<h3>Download DevStack</h3>
<p>We'll grab the latest version of DevStack via https:</p>
<pre>sudo apt-get install git -y || yum install -y git
git clone https://github.com/openstack-dev/devstack.git
cd devstack</pre>
<h3>Run DevStack</h3>
<p>Now to configure <code>stack.sh</code>. DevStack includes a sample in <code>devstack/samples/local.conf</code>. Create <code>local.conf</code> as shown below to do the following:</p>
<ul>
<li>Set <code>FLOATING_RANGE</code> to a range not used on the local network, i.e. 192.168.1.224/27. This configures IP addresses ending in 225-254 to be used as floating IPs.</li>
<li>Set <code>FIXED_RANGE</code> and <code>FIXED_NETWORK_SIZE</code> to configure the internal address space used by the instances.</li>
<li>Set <code>FLAT_INTERFACE</code> to the Ethernet interface that connects the host to your local network. This is the interface that should be configured with the static IP address mentioned above.</li>
<li>Set the administrative password. This password is used for the <b>admin</b> and <b>demo</b> accounts set up as OpenStack users.</li>
<li>Set the MySQL administrative password. The default here is a random hex string which is inconvenient if you need to look at the database directly for anything.</li>
<li>Set the RabbitMQ password.</li>
<li>Set the service password. This is used by the OpenStack services (Nova, Glance, etc) to authenticate with Keystone.</li>
</ul>
<p><code>local.conf</code> should look something like this:</p>
<pre>[[local|localrc]]
FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=supersecret
MYSQL_PASSWORD=iheartdatabases
RABBIT_PASSWORD=flopsymopsy
SERVICE_PASSWORD=iheartksl</pre>
<p>Run DevStack:</p>
<pre>./stack.sh</pre>
<p>A seemingly endless stream of activity ensues. When complete you will see a summary of
<code>stack.sh</code>'s work, including the relevant URLs, accounts and passwords to poke at your
shiny new OpenStack.</p>
<h3>Using OpenStack</h3>
<p>At this point you should be able to access the dashboard from other computers on the
local network. In this example that would be http://192.168.1.201/ for the dashboard (aka Horizon).
Launch VMs and if you give them floating IPs and security group access those VMs will be accessable from other machines on your network.</p>
<p>Some examples of using the OpenStack command-line clients <code>nova</code> and <code>glance</code>
are in the shakedown scripts in <code>devstack/exercises</code>. <code>exercise.sh</code>
will run all of those scripts and report on the results.</p>
</section>
<footer>
<p>&copy; Openstack Foundation 2011-2013 &mdash; An <a href="https://wiki.openstack.org/wiki/Programs">OpenStack program</a> created by <a href="http://www.rackspace.com/cloud/private_edition/">Rackspace Cloud Builders</a></p>
</footer>
</div> <!-- /container -->
</body>
</html>