Dean Troyer | 54b9732 | 2014-06-20 17:53:55 -0500 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>Single Machine Guide - DevStack</title> |
| 6 | <meta name="description" content=""> |
| 7 | <meta name="author" content=""> |
| 8 | |
| 9 | <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> |
| 10 | <!--[if lt IE 9]> |
| 11 | <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
| 12 | <![endif]--> |
| 13 | |
| 14 | <!-- Le styles --> |
| 15 | <link href="../assets/css/bootstrap.css" rel="stylesheet"> |
| 16 | <link href="../assets/css/local.css" rel="stylesheet"> |
| 17 | <style type="text/css"> |
| 18 | body { padding-top: 60px; } |
| 19 | dd { padding: 10px; } |
| 20 | </style> |
| 21 | |
| 22 | <!-- Le javascripts --> |
| 23 | <script src="../assets/js/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script> |
| 24 | <script src="../assets/js/bootstrap.js" type="text/javascript" charset="utf-8"></script> |
| 25 | </head> |
| 26 | |
| 27 | <body> |
| 28 | |
| 29 | <div class="navbar navbar-fixed-top"> |
| 30 | <div class="navbar-inner"> |
| 31 | <div class="container"> |
| 32 | <a class="brand" href="/">DevStack</a> |
| 33 | <ul class="nav pull-right"> |
| 34 | <li><a href="../overview.html">Overview</a></li> |
| 35 | <li><a href="../changes.html">Changes</a></li> |
| 36 | <li><a href="../faq.html">FAQ</a></li> |
| 37 | <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li> |
| 38 | <li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li> |
| 39 | </ul> |
| 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | |
| 44 | <div class="container"> |
| 45 | <section id="overview"> |
| 46 | <h1>All-In-One: Dedicated Hardware</h1> |
| 47 | <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> |
| 48 | </section> |
| 49 | |
| 50 | <section id="prerequisites"> |
| 51 | <div class="page-header"> |
| 52 | <h2>Prerequisites <small>Linux & Network</small></h2> |
| 53 | </div> |
| 54 | |
| 55 | <h3>Minimal Install</h3> |
| 56 | <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 12.04 (only 27MB) since DevStack will download & 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-18-x86_64-netinst.iso">Fedora</a> and <a href="http://mirrors.kernel.org/centos/6.4/isos/x86_64/CentOS-6.4-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> |
| 57 | |
| 58 | <h3>Network Configuration</h3> |
| 59 | <p>Determine the network configuration on the interface used to integrate your |
| 60 | OpenStack cloud with your existing network. For example, if the IPs given out on your network |
| 61 | by DHCP are 192.168.1.X - where X is between 100 and 200 you will be able to use IPs |
| 62 | 201-254 for <b>floating ips</b>.</p> |
| 63 | <p>To make things easier later change your host to use a static IP instead of DHCP (i.e. 192.168.1.201).</p> |
| 64 | </section> |
| 65 | |
| 66 | <section id="installation"> |
| 67 | <div class="page-header"> |
| 68 | <h2>Installation <small>shake and bake</small></h2> |
| 69 | </div> |
| 70 | |
| 71 | <h3>Add your user</h3> |
| 72 | <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> |
| 73 | <pre>adduser stack</pre> |
| 74 | <p>Since this user will be making many changes to your system, it will need to have sudo priviledges:</p> |
| 75 | <pre>apt-get install sudo -y || yum install -y sudo |
| 76 | echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers</pre> |
| 77 | <p>From here on you should use the user you created. <b>Logout</b> and <b>login</b> as that user.</p> |
| 78 | |
| 79 | <h3>Download DevStack</h3> |
| 80 | <p>We'll grab the latest version of DevStack via https:</p> |
| 81 | <pre>sudo apt-get install git -y || yum install -y git |
| 82 | git clone https://github.com/openstack-dev/devstack.git |
| 83 | cd devstack</pre> |
| 84 | |
| 85 | <h3>Run DevStack</h3> |
| 86 | <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> |
| 87 | <ul> |
| 88 | <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> |
| 89 | <li>Set <code>FIXED_RANGE</code> and <code>FIXED_NETWORK_SIZE</code> to configure the internal address space used by the instances.</li> |
| 90 | <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> |
| 91 | <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> |
| 92 | <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> |
| 93 | <li>Set the RabbitMQ password.</li> |
| 94 | <li>Set the service password. This is used by the OpenStack services (Nova, Glance, etc) to authenticate with Keystone.</li> |
| 95 | </ul> |
| 96 | <p><code>local.conf</code> should look something like this:</p> |
| 97 | <pre>[[local|localrc]] |
| 98 | FLOATING_RANGE=192.168.1.224/27 |
| 99 | FIXED_RANGE=10.11.12.0/24 |
| 100 | FIXED_NETWORK_SIZE=256 |
| 101 | FLAT_INTERFACE=eth0 |
| 102 | ADMIN_PASSWORD=supersecret |
| 103 | MYSQL_PASSWORD=iheartdatabases |
| 104 | RABBIT_PASSWORD=flopsymopsy |
| 105 | SERVICE_PASSWORD=iheartksl</pre> |
| 106 | |
| 107 | <p>Run DevStack:</p> |
| 108 | <pre>./stack.sh</pre> |
| 109 | <p>A seemingly endless stream of activity ensues. When complete you will see a summary of |
| 110 | <code>stack.sh</code>'s work, including the relevant URLs, accounts and passwords to poke at your |
| 111 | shiny new OpenStack.</p> |
| 112 | |
| 113 | <h3>Using OpenStack</h3> |
| 114 | <p>At this point you should be able to access the dashboard from other computers on the |
| 115 | local network. In this example that would be http://192.168.1.201/ for the dashboard (aka Horizon). |
| 116 | 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> |
| 117 | |
| 118 | <p>Some examples of using the OpenStack command-line clients <code>nova</code> and <code>glance</code> |
| 119 | are in the shakedown scripts in <code>devstack/exercises</code>. <code>exercise.sh</code> |
| 120 | will run all of those scripts and report on the results.</p> |
| 121 | |
| 122 | </section> |
| 123 | |
| 124 | <footer> |
| 125 | <p>© Openstack Foundation 2011-2013 — 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> |
| 126 | </footer> |
| 127 | |
| 128 | </div> <!-- /container --> |
| 129 | |
| 130 | </body> |
| 131 | </html> |