[Ubuntu] Install OpenStack on Ubuntu 14.04 LTS

[Ubuntu] Install OpenStack on Ubuntu 14.04 LTS

OpenStack is a cloud operating system that controls large pools of compute, storage, and networking resources throughout a datacenter, managed through a dashboard or via the OpenStack API. If you’ve used Amazon Web Service, OpenStack is just a bit like AWS.

openstack-software-diagram


In the beginning, I wanted to install Ubuntu OpenStack on the Ubuntu 14.04 server LTS. When I knew I need to get at least seven machines to run Ubuntu OpenStack, I was very surprised. I just wanted to install OpenStack on ONE machine. And then, I found a solution and followed this instruction to install Ubuntu OpenStack on one machine. However, no matter what I did, it didn’t work. After I inputed “sudo openstack-install“, the process always stopped. I had no idea what happened, and I didn’t find any useful solution so that I gave up this way.

I tried to find another solution to install OpenStack. Then I read the official documents regarding DevStack, and finally installed DevStack on Ubuntu 14.04 Server LTS successfully. I would like to show you how I did it.

Getting started

I launched Ubuntu 14.04 server LTS as a virtual machine on Parallels. If you don’t know how to launch it, you can read this useful article. Just in case, I gave it 4GB RAM and 100GB hard disk.

Create user

$ sudo adduser stack
$ sudo apt-get install sudo -y
$ sudo su
$ sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
$ sudo apt-get install git -y

Logout and login as stack user.

Download DevStack

$ git clone https://git.openstack.org/openstack-dev/devstack
$ cd devstack

Configuration

Now to configure stack.sh. DevStack includes a sample in devstack/samples/local.conf. Create local.conf as shown below to do the following:

$ cp samples/local.conf .

Check your network setting:

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1c:42:61:81:d6  
          inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0

In above example, 192.168.0.11 is my HOST_IP. It is also IP address of OpenStack Server. Then modify local.conf.

$ vim local.conf

HOST_IP=192.168.0.11
FLAT_INTERFACE=eth0
FLOATING_RANGE=192.168.0.224/28
ADMIN_PASSWORD=secret
MYSQL_PASSWORD=secret
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
SERVICE_TOKEN=secret

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.

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.

Run DevStack

$ ./stack.sh

Now, you can go to grab a coffee, take a break even take a nap, because it will be waited for a long time.

Results

Your terminal will show the following messages:

This is your host IP address: 192.168.0.11
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.0.11/dashboard
Keystone is serving at http://192.168.0.11:5000/
The default users are: admin and demo
The password: secret

Now fire up a Web browser on your OpenStack server and point it to the IP address it told you, which in my example is http://192.168.0.11/dashboard. If you see the login page you may congratulate yourself for a successful installation, and for accessing the Horizon dashboard. Go ahead and login as admin with whatever password you set in localrc.

If you make a mess, you can use clean.sh which reverses stack.sh and then execute stack.sh to reinstall OpenStack.

Screenshots

Login
OpenStack1_result

Overview
OpenStack2_result

Launch Instance
OpenStack3_result

Instances
OpenStack4_result

Images
OpenStack5_result

All Hypervisors
OpenStack6_result

Flavors
OpenStack7_result

System Information
OpenStack8_result

Thanks your reading.

(Visited 379 time, 1 visit today)
Facebooktwittergoogle_plusredditpinterestlinkedinmail
Comments are closed.