OpenStack Installation for beginners

Believe me, I’m simply a beginner in OpenStack technologies. And this blog is specially dedicated for the beginners in this technology like me. This doesn’t contain precise directions on a way to install OpenStack, rather this is my installation guide which contains all the errors and their solutions, I faced while installation. Before going to the elaborate installation and configuration of OpenStack, for a theoretical information we will outline OpenStack as –  An open source Infrastructure as a Service (Iaas) platform that helps to make and manage scalable, elastic cloud computing for both public and private cloud. If you wish a lot of details concerning OpenStack and its architecture you may realize a similar here.

Again before going to the installation part, let me tell you concerning my system specifications. Because the aim of OpenStack installation is simply for my personal expertise 😉 I attempted this installation in a virtual machine with the subsequent specs:

RAM : A pair of GB (2048 MB)

CPUs : 1

Hard Disk : Sixty GB Thin Provisioned

The machine is connected with a network adapter and is assigned an IP.

Operating System : CentOS version 7

After installing required operating system (preferably Redhat, Fedora or CentOS) setup the machine’s networking together with proxy, so that the machine can access internet.

1. The system may not have git core components installed. If not installed start by installing those:
yum install git-core
If the result’s a mistake “could not resolve host” then there exists a proxy issue which might be resolved by the steps below:
a. export http_proxy=http://yourproxy:port/
export https_proxy=https://yourproxy:port/
b. Setup proxy entry in etc/yum.conf as Proxy=http://yourproxy:port/
Now install git core components as above. Once these components are installed, we can proceed with the installation of OpenStack.

2. Now we need to download DevStack files before installation. It is better to keep these installation files in a seperate location aside from root location. I used /opt location.
Using the below command will download DevStack in the location <pwd>/devstack/
git clone https://github.com/openstack-dev/devstack.git

3. Once downloaded move to devstack folder cd devstack and install using command ./stack.sh. You will need to enter password for all the subsequent components:
Database
Rabbit
Service Admin Token
Service Password for Service Authentication
Horizon and Keystone

Errors you may come across while installation (which I faced too):
a. You are running this script as root.
Cut it out.
Really.
Reason: OpenStack is intended to be run as a non-root user; Horizon will fail to run as root since Apache won’t serve content from root user). stack.sh should not be run as root. It aborts and suggests one course of action to make an acceptable user account.
Resolution: Execute ./tools/create-stack-user.sh which is able to produce a user and a group named stack and assign needed permissions.
Once done, make sure that you gave permissions to this user in the devstack folder and its contents. For this use the command
chown -R user:group /path/to/directory
Before trying to install, switch to the new user as su user. Now installing as this user, will take away this error.

b. fatal: Unable to look up git.openstack.org (port 9418) (Name or service not known)
Reason: This can be a mistake as a result of the recent updated DNS from Github which haven’t propogated yet.
Resolution: Ping git.openstack.org and copy the ip. Now goto /etc/hosts and add the following line
xyz.yz.xyz.xyz git.openstack.org where xyz refers the ip you read from pinging.

c. git.openstack.org errno=connection timed out
Reason: This can be as a result of that the git protocol is blocked.
Resolution: Modify the file sourcerc (From the release Havana this file is named as stackrc) inside the devstack folder to use https rather than git.
Default setting will be GIT_BASE=${GIT_BASE:-git://git.openstack.org}
Modify the setting as GIT_BASE=${GIT_BASE:-https://git.openstack.org}

d. cliff.app Service Unavailable (HTTP 503)
Reason: The code while installing actually checks for a localrc file within the installation folder. Either there won’t be any file under such name or it doesn’t have the host ip in it(sample shown below).
Resolution: There should have a file named localrc within the devstack folder with the host ip entry in it:
HOST_IP=<IP>
FLAT_INTERFACE=<ethinterface>
MULTI_HOST=1
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=<password>
MYSQL_PASSWORD=<password>
RABBIT_PASSWORD=<password>
SERVICE_PASSWORD=<password>
SERVICE_TOKEN=<password>

once all these errors were resolved, my installation went successful. Once it’s completed the installation, it will return a URL for horizon (dashboard), that you’ll access from a web browser.
And also by default, you will be given with a pair of usernames – admin and demo. The password for these will be the same that you set for keystone.

As mentioned, my installation was successful, but then I couldn’t browse the dashboard with the IP whereas I can ping successfully to that IP. Thinking that it might be some firewall issues, I cleared the iptables of my OpenStack machine by iptables -F (or you could also try /etc/init.d/iptables stop). It was successful and I could now open the dashboard from the browser.

Now that you’re familiar with most of the errors in OpenStack installation. Enjoy installing OpenStack now 🙂 .

LET US KNOW YOUR RATINGS ON THIS BLOG HERE. ALSO FEEL FREE TO CONTACT ME.

Advertisements

4 thoughts on “OpenStack Installation for beginners

  1. I see a lot of interesting content here, i know writing posts is
    time consuming, but i know unlimited source of content for your website , just type in google – rewriter creates an unique article in a minute

    Like

  2. thanks its very helpfull for me.
    i have one big question, how can i load the OpenStack after reboot to computer ?
    do i need the internet every time i load the Openstack ?
    the any way to use OpenStack without connect to internet regularly ?
    regards,
    rami

    Like

    1. Thanks for reading the blog Rami. So, from where are you loading OpenStack? Is it from your local machine or within the server? If from local machine, you need to have internet connection to access OpenStack dashboard.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s