Intro to OpenStack Part Two_ How to Install and Configure OpenStack on a Server _ Linux

June 27, 2016 | Author: Sahad Sali | Category: N/A
Share Embed Donate


Short Description

Download Intro to OpenStack Part Two_ How to Install and Configure OpenStack on a Server _ Linux...

Description

11/1/13

Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server | Linux.com

Linux Foundation

Training

Events

Video

 

 

 

 

 

search linux.com

Home

News

Linux Community

Learn Linux

Directory

Jobs

Home Learn Linux Linux Tutorials Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server

Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server Friday, 31 May 2013 09:40 Like

4

Tw eet

Carla Schroder

|

9

Exclusive 83

Last week we learned what OpenStack is and what it does. Today we'll install it on a single machine and make it do stuff. This is not how you would set up a production server, but it's a wonderful fast way to get a testing and learning server running. There are three fairly easy ways to get your hands on OpenStack and try it out: one is to use a commercial public cloud like Rackspace or Cloudwatt, or the free Trystack. If you're in a hurry go for one of the paid services, because it can take days to weeks to get approved for a Trystack account. Using a public cloud is a good way to dive right into developing and testing applications. If you're more interested in spelunking into the guts of OpenStack and learning how to administer it then you can build your own server to play with, and that is what we're going to do with the DevStack installer. DevStack is an amazing shell script that installs the OpenStack components, a LAMP stack Figure 1: A successful OpenStack installation. and CirrOS, which is a tiny Linux distro built for running cloud guests. (Cirrus? Get it? Finally a good geek pun.) I am going to cover installation in detail, because even though it's easier than it's ever been it's still a bit tricksy.

Getting Started

Upcoming Training Courses LF315 Inside Android An Intro to Android Internals 18 Nov » 21 Nov - Silicon Valley DETAILS LF320 Linux Kernel Internals and Debugging 18 Nov » 22 Nov - Virtual DETAILS LF242 Linux System Adm inistration 02 Dec » 05 Dec - Virtual DETAILS View All Upcom ing Courses

Tweets

With most Linux applications it's safe to install and remove and play with whatever you want to test on your main Linux PC, because Linux is a grown-up operating system that does not keel over when you ask it to

Leonard Jackson

5m

@leonardmjackson

do work. Unlike certain overpriced proprietary operating systems that are delicate and full of excuses. But I digress.

Just installed #manjaroLinux on VirtualBox and wow! Even in the vm it's fast. Looks like I'm trying a new distro on my machine :) #Linux

Don't put OpenStack on your main PC because it needs a dedicated system, so for this article I'm running it in VirtualBox on Lubuntu 12.04 on my Linux Mint 13 system. Sure, I know, real server nerds don't run a graphical environment on their servers, but for testing it's a nice convenience, and Lubuntu is lightweight. If you elect to run OpenStack server in a virtual machine give it a minimum of 1.5GB RAM and 6GB storage. If you have a multicore system and can spare more than one core, do so because OpenStack,

Linux Virtualization @LinuxVirt 5m #libvirt #linux Re: [PATCH] Fix race in starting transient VMs dlvr.it/4F7xhZ

even in a simple testing setup, gets hungry. First create a user named stack to use for installing DevStack: $ sudo useradd stack $ sudo passwd stack Enter new UNIX password: Retype new UNIX password: Then give stack full sudo privileges:

Linux Misc. @linuxmisc 15m #linux #mm Re: + mm-memcg-fixtest-for-child-groups.patch added Compose new Tweet…

$ sudo visudo stack ALL=(ALL:ALL) NOPASSWD: ALL Now logout, and then log back in as stack. If you don't have git then install it:

www.linux.com/learn/tutorials/721712-intro-to-openstack-part-two-how-to-install-and-configure-openstack-on-a-server/

1/5

11/1/13

Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server | Linux.com $ sudo apt-get install git -y

Then pull OpenStack from Github. This copies it into the current directory, so I cdto /varand then run git: $ git clone git://github.com/openstack-dev/devstack.git This puts everything in /var/devstack. cdto devstack, and take a few minutes to look in the various scripts and files. For whatever reason, which I have not figured out, I ran into permissions problems on my first run, so I changed ownership of /var/devstackand /opt/stackto stack: $ sudo chown -R stack:stack /opt/stack $ sudo chown -R stack:stack /var/devstack I also changed /var/wwwto www-data:www-data; Ubuntu's default is root, which is not a good practice. It is good to have logging, so create /var/stacklog, and make it owned by stack.

Configuration There is one more prerequisite, and that is to create /var/devstack/localrc. localrcalways goes in your DevStack root, and it configures networking, passwords, logging, and several other items we're going to ignore for the time being. This is what mine looks like, just a minimal configuration: HOST_IP=10.0.1.15 FLAT_INTERFACE=eth0 FLOATING_RANGE=10.0.1.224/28 ADMIN_PASSWORD=supersecret MYSQL_PASSWORD=supersecret RABBIT_PASSWORD=supersecret SERVICE_PASSWORD=supersecret SERVICE_TOKEN=supersecret

Latest Tutorials How to Speed Up Slow apt-get Install on Debian or Ubuntu Minnow Board: The $200 Atom-Based Maker Board How to Run Program or Process on Specific CPU Cores on Linux How to Set Up Web-Based Netw ork Traffic Monitoring on Linux How to Set Up Secure Remote Netw orking w ith OpenVPN on Linux, Part 2

Sign Up For the Linux.com Newsletter First Nam e Last Nam e Em ail Country Subscribe View our Privacy Policy

OpenStack uses a lot of passwords, so for testing I make it easy on myself by recycling the same one. The HOST_IP is the ethX inet addrof your OpenStack server, whether it's virtualized or not, like this example: $ ifconfig eth0 Link encap:Ethernet HWaddr 90:ee:aa:a2:50:aa inet addr:10.0.1.15 Bcast:10.0.1.255 Mask:255.255.255.0 Do create a static IP address for your DevStack server, or you will suffer. Networking is rather involved for

Latest Software News SELinux User-Space Sees A Big Update Blender 2.69 Gets A Hallow een Release

OpenStack, and we'll get into that more in the future; for now we'll keep it as simple as possible.

Slackw are 14.1 Just Days Aw ay

FLAT_INTERFACE is the server's Ethernet interface; if you have just one it's not necessary to include this line. You could have an internal and a public-facing interface, just like on non-cloud servers, and the FLAT_INTERFACE corresponds to the internal interface.

Cisco to Release an Open-Source H.264 Codec Leadw erks Game Engine Now In Beta For Linux

FLOATING_RANGE is a pool of addresses for any OpenStack servers that need to be available to the network. This must not overlap with the server's IP address, which is why my example is way out at the end of the address range. Alrighty then, it's time to finish the installation. Change to /var/devstackand run: $ ./stack.sh This will run for a while and fill your screen with all kinds of output. Go take a nice break and think about pleasant things. When it completes a successful run you'll see something like figure 1, above. Now fire up a Web browser on your OpenStack server and The Horizon dashboard, after OpenStack installation. point it to the IP address it told you, which in my example is http://10.0.1.15. If you see the login page you may congratulate yourself for a successful installation, and for accessing the Horizon dashboard (figure 2.) Go ahead and login as admin

www.linux.com/learn/tutorials/721712-intro-to-openstack-part-two-how-to-install-and-configure-openstack-on-a-server/

2/5

11/1/13

Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server | Linux.com

with whatever password you set in localrc. You can poke around and explore the different screens without hurting anything. There isn't much to see yet, but you'll find a few images and report pages. If you make a mess, the good DevStack people included a do-over script, clean.sh. This reverses stack.shand leaves your git clone files in place, so run clean.shand then stack.shto re-do your installation. That's all for today, so come back next time to learn how to access Horizon from a remote PC, and how to do some basic setup.

Carla Schroder

Comments

Russell Bryant :

01 Jun

I think this is bad advice. Devstack is really only intended for development environments. It's not something I would recommend as a way to install for any type of "real" usage. Use distro packages and an installer. If you're trying it on a Red Hat based platform (RHEL, or a derivative such as CentOS), try installing using the packstack installer. http://openstack.redhat.com/Quickstart

Report

John Spaetzel :

Reply

01 Jun

Did you even read?... "spelunking into the guts of OpenStack and learning how to administer it then you can build your own server to play with, and that is what we're going to do with the DevStack installer"

Report

Mike :

Reply

01 Jun

another example of someone who didn't R.T.F.M., John...

Report

Mike :

Reply

01 Jun

Why doesn't Linux.com provide a link for emailing articles in addition to the links above??

Report

Jcaikai :

Reply

01 Jun

Not sure why some may think that this is bad advice. I for one think this is an amazing guide to just diving in and learning the ropes of a quite complex framework. I guess some people really love to just criticize without taking the time to RTFML.

Report

myles :

Reply

09 Aug

www.linux.com/learn/tutorials/721712-intro-to-openstack-part-two-how-to-install-and-configure-openstack-on-a-server/

3/5

11/1/13

Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server | Linux.com I'm receiving the "keystone did not start" error. Is anyone else running into this problem?

Report

geetha :

Reply

13 Aug

iam also receiving "keystone did not start " ..what to do to start keystone?

Report

King_2188 :

Reply

28 Aug

For testing purposes this works fine. Great article and followthrough as well. Funny, the people who write negative comments on here probably couldn't get their VM's up and running. Thanks again!

Report

linuxUsr117 :

Reply

11 Sep

Failed for me; one error after another.

Report

superbird :

Reply

11 Sep

If you have problem to install OpenStack, there is an easier way to try it. A PAID AMI on Amazon EC2 called NanoStack ((https://aws.amazon.com/marketplace/pp/B00F2NNR3C) can start an OpenStack in less than a minute. It's a pre-configured all-in-one OpenStack installation. It's a pretty cheap way to play with OpenStack.

Report

adam :

Reply

30 Sep

Failed for me too. Keystone issue. Am troubleshooting it now. Most likely centos6 has the same problem as fedora15+ mentioned here http://docs.openstack.org/developer/keystone/setup.html . Unfortunately troubleshooting it means that I have to dig into all the components anyway. The project is very promising but is still too complex for convienant installation. Compared to vSphere it's looks like a frankenstein monster (just my first impression) I hope to give more positive output after getting it up.

Report

Reply

Name :

Email :

Comment :

Subscribe to Comments

Post Comment

www.linux.com/learn/tutorials/721712-intro-to-openstack-part-two-how-to-install-and-configure-openstack-on-a-server/

4/5

11/1/13

Intro to OpenStack Part Two: How to Install and Configure OpenStack on a Server | Linux.com

WHO WE ARE ?

EXPLORE

STAY CURRENT

ABOUT LINUX.COM

The Linux Foundation is a non-profit

Answ ers

Netbooks

How to Participate

Blogs

Cloud Computing

Contact / About

Forums

Enterprise

Advertise

Directory

Embedded & Mobile

Privacy / Terms / Editorial Policy

consortium dedicated to the grow th of Linux. More About the foundation... Frequent Questions Join / Linux Training / Board

Linux.com © 2012 Linux.com. All rights reserved. The Linux Foundation Symbol is a trademark of the Linux Foundation. Linux is a registered trademark of Linus Torvalds.

www.linux.com/learn/tutorials/721712-intro-to-openstack-part-two-how-to-install-and-configure-openstack-on-a-server/

5/5

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF