Saturday, July 5, 2014

Install OpenStack Icehouse on Linux Debian based operating systems (Mint-17, Ubuntu-14.04-LTS)

OpenStack is a free and opensource IaaS platform. I found some difficulties while installing OpenStack on my Ubuntu 14.04 last week. Hence, I am writing to guide those who are like me :)

It would be great if you install OpenStack on a virtual machine. Install Oracle's Virtual Box. Then install Ubuntu or Mint on Virtual Box.

We are going to use DevStack to install OpenStack. DevStack is a script used to create OpenStack environment quickly.

Step-1 : Install Git

Install Git if you don't have Git installed on your system.

sudo apt-get update
sudo apt-get install git
 

Step-2 : Clone DevStack

Clone latest DevStack to a folder of your choice. Lets refer it as $DevStackHome. Run the following command on your terminal. It will create a folder (devstack) inside $DevStackHome and clone it.

git clone https://github.com/openstack-dev/devstack.git

 

Step-3 : Stack!

Navigate to devstack folder and run the following command to install OpenStack.

./stack.sh

Follow the instructions to install it. It will ask passwords for several modules (database, rabbit, service admin, service authentication) while installing. Would be good if you give same password to all.

Once it is installed successfully, you will get something like below on your terminal.


As you can see in the above log, you can access OpenStack @ http://10.0.2.15/project/


You might get the following error when installing it.

Resolving cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)... failed: Name or service not known.
wget: unable to resolve host address 'cdn.download.cirros-cloud.net'
+ exit_trap
+ local r=4
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 4 -ne 0 ]]
+ echo 'Error on exit'
Error on exit
+ ./tools/worlddump.py -d
usage: worlddump.py [-h] [-d DIR]
worlddump.py: error: argument -d/--dir: expected one argument

Refer this guide to find a workaround.

Step-4 : Unstack!

Don't forget to unstack OpenStack before shutting down your machine. If you do so, you can rejoin to the same session later.

Navigate to devstack folder and run the following command.

./unstack.sh

 

 Step-5 : Rejoin-Stack!

Don't forget to rejoin-stack OpenStack once you start your machine again. If you rejoin, you can access the previous session. If you stack, it will destroy all the previous sessions (settings, instances, images etc) and create a fresh OpenStack for you.

Navigate to devstack folder and run the following command.

./rejoin-stack.sh

If you rejoined, you can open a new tab/terminal to unstack. 

 

 Step-6 : Again Stack!

If you want to destroy previous sessions, you simply can stack.

Navigate to devstack folder and run the following command.

./stack.sh

That's all. Play with OpenStack!

No comments:

Post a Comment