Saturday, November 14, 2015

Openstack Liberty



Thought to give time for Openstack Latest version Liberty:

Here it goes,

First good thing is minimum node requirement is just 2, Compute and Controller no neutron :), So let's boot up two machines and begin.

For controller I used vm with 8GB ram and 100GB storage and 16 for compute, both running CentOS 7.


It's all easy for centos 

yum install centos-release-openstack-liberty
yum install python-openstackclient
yum install openstack-selinux

of course for local setup ntpd  
yum install ntpd
systemctl ntpd start
systemctl enable ntpd

Next is for controller SQL 
yum install mariadb mariadb-server python2-PyMySQL

Here I faced issues with mariadb Aria engine, To begin with error was:
151109 11:02:22 [ERROR] mysqld: Aria engine: log initialization failed
151109 11:02:22 [ERROR] Plugin 'Aria' init function returned error.
151109 11:02:22 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
151109 11:02:22 [Note] Plugin 'FEEDBACK' is disabled.
151109 11:02:22 [ERROR] mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
151109 11:02:22 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
151109 11:02:22 [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
151109 11:02:22 [ERROR] Aborting


Solution I found was
Modify /etc/my.cnf.d/server.cnf  to include following lines:
[mysqld]
bind-address = a.b.c.d

default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

Then Delete everything in /var/lib/mysql
mysql_install_db  --user=mysql --data=/var/lib/mysql --basedir=/usr

Now check again and it’s working this time
systemctl restart mariadb.service

cat /var/log/mariadb/mariadb.log
Version: '5.5.44-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server

Make sure to eanable mariadb service
# systemctl enable mariadb.service

Next one was NoSQL Mongo DB
yum install mongodb-server mongodb
# systemctl enable mongod.service
# systemctl start mongod.service

Next RabbitMQ
yum install rabbitmq-server
systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service

Once basic things are done it’s all about specific services Keystone, Compute, Neutron and Horizon

Issue in Keystone:
No oslo configured
[root@liberty_ctrl ~]# su -s /bin/sh -c "keystone-manage db_sync" keystone
No handlers could be found for logger "oslo_config.cfg"
For now I just removed log setting verbose to false,
Later on it turns out it didn’t make complete job
Reason being MySQL user keystone was not able to login via FQDN, hence added that entry manually
Also it didn’t work of using default token as ‘ADMIN_TOKEN’ had to be hexadecimal value of required length

Only issue I found on documentation is it uses controller keyword many times which needs to be replaced with correct hostname





Other issues:

    Issue #1: Since removal of setup command from CentOS 7 how to set hostname?
                   Here is new command: "hostnamectl set-hostname liberty_ctrl"

    Issue #2: I missed to allocate size correctly at beginning:

                   Here are steps to I used to increase partition:
                   parted -a optimal /dev/sdb -- mkpart primary 68.7GB 100%
                   parted /dev/sdb -- toggle 2 lvm
                 
                   vgextend vg1 /dev/sdb2
                   lvextend /dev/vg1/root -l +100%FREE
             
               
                  resize2fs /dev/vg1/root


                   

No comments:

Post a Comment