Open Stack

What is OpenStack?

OpenStack is a platform for open-source cloud computing. This is deployed as a service solution which consists of integrated project. This helps to control throughout a data center with a help of a web based dashboard or command-line tools.
OpenStack came into existence in 2010 as a joint project with NASA. Now OpenStack is a non-profitable entity. More than 300 companies have joined OpenStack project till now. Prime target of this community is to provide cloud-based OpenStack services over standard hardware requirements.

Components of OpenStack

Components of OpenStack
OpenStack is built up of many components that help in its smooth functioning within a cloud environment. Major components are discussed below:
  1. Compute (Nova) :- Compute is a cloud computing controller designed to manage resources in a virtualized environments. This can also be used to manage high performance bare metal configurations. Available options for hypervisor technology are Xen, KVM and VMware. This is coded in Python and uses many pre-designed libraries. SQL Alchemy is used for database access.
  2. Object Storage (Swift) :- This is a mountable redundancy storage system. This helps in data replication throughout the data center. Files and objects are copied to multiple storage units with the help of this component. Storage clusters are scaled horizontally with every addition of servers. OpenStack object storage component helps to replicate content from all active nodes to new available clusters, ensuring no loss of data in case of hard drive or a server failure. This is an inexpensive method of data replication as it uses software mode to carry out distribution and replication operations. Reliability is an important factor when it comes to data loss in case of data center operations.
  1. Block Storage (Cinder) :- Block storage component provides persistent level storage solutions for using cloud oriented computing devices. This component manages to addition, removal and creation of new block devices in a server. These components provide full integration services with OpenStack to help minimizing use of hardware resources. This service can be managed by user within the dashboard using a web-based or command-line interface. Linux based storage platforms can use Cloudbyte, EMC, Coraid, SAN Storage, etc. Raw Block level storage can also be integrated but are limited to a few provider like HP and IBM. Block storage is highly sensitive in nature and can be appropriate to handle performance based scenarios. Snapshot management becomes an as with the help of integrated functionalities.
  2. Networking (neutron) :- Neutron is an OpenStack networking component helps in managing all kind of network related quarry under one roof. Staring for IP address management to routing techniques, everything is integrated into this component. This component is the key tool to ensure no network limited issues. Cloud platform are usually confusing with the growing demand of cloud farms. It becomes really tough to manage network without the availability of any such tool. This component provides pre-designed network solutions for all kind of application and user group management.

Some other OpenStack components and their functions:

Horizon – It is a dashboard for administrators or end-users for accessing the backend services.
Nova Compute – It takes requests from end-users and manages virtualization through API or dashboard to form Virtual Instances.
Glance – it is a repository of images and used for maintaining a catalog of images.
Keystone – It is used for managing authentication services, like authorization, authentication and other credentials.
OpenStack is a 100% python based cloud environment with pre-designed and existing python libraries. Use of MySQL is also integrated in this. OpenStack is a great tool to manage an entire data center environment.

Installation of Open Stack




Add Stack User

Devstack should be run as a non-root user with sudo enabled (standard logins to cloud images such as “ubuntu” or “cloud-user” are usually fine).
You can quickly create a separate stack user to run DevStack with

1 - Create a Stack user:

$: sudo groupadd stack
$: sudo useradd -g stack -s /bin/bash -d /opt/stack -m stack
$: sudo passwd stack
$: sudo visudo


 


Since this user will be making many changes to your system, it should have sudo privileges:

$sudo visudo

add stack user into that

stack ALL=(ALL) NOPASSWD: ALL

then switch to that user

 sudo su - stack

Download DevStack

$ git clone https://git.openstack.org/openstack-dev/devstack
$ cd devstack
The devstack repo contains a script that installs OpenStack and templates for configuration files


Create a local.conf

Create a local.conf file with 4 passwords preset at the root of the devstack git repo.


local.conf should look like

[[local|localrc]]
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=stack
DATABASE_PASSWORD=stack
RABBIT_PASSWORD=stack
SERVICE_PASSWORD=stack-secret
SERVICE_TOKEN=openstackopenstackopenstack
enable_plugin barbican https://git.openstack.org/openstack/barbican
enable_service rabbit mysql key
GIT_BASE=${GIT_BASE:-https://git.openstack.org}




Start the install

./stack.sh
This will take a 15 - 20 minutes, largely depending on the speed of your internet connection. Many git trees and packages will be installed during this process.


Errors facing.

1.Remove all mysql and lamp from your ubuntu if it is configured

To remove mysql completely from your system Just type in terminal


sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean


2.How do I remove the LAMP stack so I can start over? 

 sudo apt-get purge mysql-server apache2 php5

That will remove the "big-boy" packages, which should take care of most cases.

You can find this information in the documentation, specifically this section on how to start over:

    To remove the LAMP stack remove the following packages:

    Note: This assumes you have no other programs that require any of these packages. You might wish to simulate this removal first, and only remove the packages that don't cause removal of something desired.

    sudo apt-get remove apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql

    To also remove the debconf data, use the purge option when removing. To get rid of any configurations you may have made to apache, manually remove the /etc/apache2 directory once the packages have been removed.

Don't use tasksel to remove packages, bad things can happen, this is covered in this bug report.



3.      git clone git//git.openstack.org/openstack/requirements.git/opt/stack/reqiurements Cloning into '/opt/stack/requirements'... fatal:unable to connect to git.openstack.org: git.openstack.org[0: 192.237.223.224]: errno=Connection refused git.openstack.org[1: 2001:4800:7813:516:3bc3:d7f6:ff04:aacb]: errno=Network is unreachable


The solution is to modify the local.conf  file in the devstack installation folder to use https instead of git.

Default setting in local.conf  file:

GIT_BASE=${GIT_BASE:-git://git.openstack.org}

Modified setting that should bypass git restrictions:

GIT_BASE=${GIT_BASE:-https://git.openstack.org}

Simply add this modified line to the local/localrc section of your local.conf file in the DevStack directory and it should use the HTTPS protocol instead of the Git protocol! More info on the local.conf file here - http://devstack.org/configuration.html



4.Error: Unable to retrieve instance list.
after restarting run

sudo screen -c stack-screenrc


If we run ./stack.sh, it will erase all the data. I can't retrieve the data. So I am trying to retrieve the data for that I ran the command "screen -c stack-screenrc ". Thanks




5. [ERROR] ./stack.sh:198 If you wish to run this script anyway run with FORCE=yes



$FORCE=yes ./stack.sh




6. error:df: '/run/user/1000/gvfs': Permission denied

$cd devstack

$sed -i 's/git:/https:/g' stackrc


7.error sub-process /usr/bin/dpkg returned an error code (1)

rm -rf /var/lib/dpkg/info/*

rm -rf /var/cache/apt/archives/*

apt-get upgrade

apt-get -f install

7. failed to start devstack devstack@etcd.service


The HOST_IP (and all the other IPs) in my local.conf, weren't the same in /etc/hosts so etcd couldn't start the service.


https://bugs.launchpad.net/devstack/+bug/1694499


8.

Exceeded maximum number of retries. Exceeded max ...

i downloaded the manager.py and replaced it with the existing
~/nova/nova/conductor/manager.py
replaced with attached one



https://github.com/openstack/nova/blob/master/nova/conductor/manager.py




curtesy:

https://intellipaat.com/blog/openstack-tutorial-for-beginners/

https://docs.openstack.org/developer/devstack/

 http://www.stackoverflow.com








Comments

Popular posts from this blog