Thursday 3 April 2014

Openstack


                                      OpenStack Practical Experience




Installation on a SingleMachine

H/w Requirements:
Two Nic's
AMD/VT Enabled
S/w Requirements:
Ubuntu
Mysql

Installation Procedure:
Installing Controller and compute in One Machine

Prerequisite Installation
NTP :
#apt-get install ntp
used for syncronize the time between clients

Mysql:
    #apt-get install python-mysqldb mysql-server
Edit mysql configuration file /etc/mysql/my.cnf and set the bind address
[myqsqld]
bind-address = 10.10.10.10
    #service mysql restart (to update changes)
Secure Installation of mysql (Removing unnecesary users and db's)
   #mysql_secure_installation
If above fails use the below caommand
   #mysql_install_db
 
OpenStack Packages installation Environment Setup
Adding openstack repository from source
   #apt-get install python-software-properties
   #add-apt-repository cloud-archive:havana
Update the Package Database
   #apt-get update && apt-get dist-upgrade
   #init 6 (restart the server)

Messaging Server (Rabbitmq Server)
This server depends on AMQP protocol used for communication
     #apt-get install rabbitmq-server
default account and password of the rabbitmq server is guest guest
To Change default password of rabbitmq server
    #rabbitmqctl newpassword guest oldpassword
Now you are ready to install openstack packages


Installing Keystone( Identity Service)
Usage: Authentication & User management
    #apt-get install keystone
Configure the keystone to work with mysql database
   #vim /etc/keystone/keystone.conf

[sql]
connection = mysql://keystone:password@10.10.10.10/dbname
ex: connection = mysql://keystone:hacker@10.10.10.10/keystone
By defaullt the keystone installation comes with SQLite db ,Remove it.
    #rm -rf /var/lib/keystone
Create a keystone database in mysql
   #mysql -u root -p
mysql> CREATE DATABASE keystone;
mysql> GRANT ALL PRIVILEGES ON keystone.* TO \ 'keystone'@'10.10.10.10' IDENTIFIED BY 'hacker';
mysql> GRANT ALL PRIVILEGES ON keystone.* TO \ 'keystone'@'% IDENTIFIED BY 'hacker';
Making the keystone to sync with mysql and create tables automatical
    #keystone-manage db_sync


Verification:
1. Login to mysql with keystone user and password and check whether tables are created or not.
2.service keystone restart

Create USERS, TENANTS, ROLES
Users:
Tenants:
Roles:
To be Continued.......

No comments:

Post a Comment