Friday, June 10, 2016

Configuring network to a VM




Supported OS-Redhat/CentOS/Ubuntu
Step 1:
>vi /etc/resolv.conf
nameserver <provide the serverIP>

Step2:
>vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=<default one>
TYPE=Ethernet
UUID=<default-one>
ONBOOT=yes
NETMASK=255.255.255.0
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=172.20.10.42

Step 3:
>vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=host-vm1
GATEWAY=172.20.10.1



Step 4:

>service NetworkManager stop
>service network restart
> ping google.com
PING google.com (216.58.194.206) 56(84) bytes of data.
64 bytes from sfo03s01-in-f14.1e100.net (216.58.194.206): icmp_seq=1 ttl=54 time=6.46 ms
(#You ll see response like this if everything went well)






Thursday, June 9, 2016

MapR-Hue and MySql Integration


Requisites are:
OS-CentOS-6.6/Redhat-6.7
MapR-5.1
Hue-3.9
MySql

Steps:
Here Hue and MySql is installed on different nodes.
MySql Host:Host1
MapR-Hue Host:Host2

On Host1 Host, do below steps: Confirm before going to install it using rpm -qa command.
Step 1:
>rpm -qa | grep mysql-devel
If not installed , do below execution.
>yum install mysql-devel

Step 2:
rpm -qa | grep mysql-connector-java
If not installed , do below execution.
>yum install mysql-connector-java

Step 3:
> rpm -qa | grep mysql-server
If not installed , do below execution
>yum install mysql-server

Step 4:Change the /etc/my.cnf file as follows:
>vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
bind-address=Host1
#This IP is MySql installed Host.
default-storage-engine=InnoDB
sql_mode=STRICT_ALL_TABLES

Step 5:
Start the mysql daemon.
$ sudo service mysqld start

Step 6:
Configure the Mysql with password, initially MySql pwd could be not set, please set here with pwd.
>/usr/bin/mysql_secure_installation
Enter current password for root (enter for none):
OK, successfully used password, moving on...
[...]
Set root password? [Y/n] y
New password:x
Re-enter new password:x
Remove anonymous users? [Y/n] Y
[...]
Disallow root login remotely? [Y/n] N
[...]
Remove test database and access to it [Y/n] Y
[...]
Reload privilege tables now? [Y/n] Y
All done!
(#Here I have provided password as “ x ”)
Step 7:
>mysql> drop database hue;
Create a database for Hue with name “hue” in mysql by using below command.
mysql> create database hue;
Query OK, 1 row affected (0.00 sec)

Here the Host Host2 is the HUE installation HostName.
mysql> grant all on hue.* to 'hue'@Host2 identified by 'x';
Query OK, 0 rows affected (0.00 sec)
# here 'x' is the mysql password

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)







Step 8:
In Hue installed Host Host2, Edit the hue.ini file with this information.
> vi /opt/mapr/hue/hue-3.9.0/desktop/conf/hue.ini

[[database]]
host=Host1
port=3306
engine=mysql
user=hue
password=x
name=hue

Add the below details under “# Settings for the RDBMS application “
> vi /opt/mapr/hue/hue-3.9.0/desktop/conf/hue.ini

[librdbms]

[[databases]]
#Add at MySql settings area.
host=Host1
port=3306
engine=mysql
user=hue
password=x
name=hue

Step 9:
Do these steps in Hue installation Host i.e. Host2
>/opt/mapr/hue/hue-3.9.0/build/env/bin/hue dumpdata > bkpHueData.json
Delete the data in the file in “model “ field if any thing with "useradmin.userprofile" , remove that json file and save it.
Check if any words are presenting with "useradmin.userprofile" string in backup file.
>cat bkpHueData.json | grep useradmin.userprofile

Step 10:
Restart the Hue serverice
> maprcli node services -name hue -action restart -nodes `hostname`

Syncdb operation:
/opt/mapr/hue/hue-3.9.0/build/env/bin/hue syncdb --noinput

Migrating the hue.
/opt/mapr/hue/hue-3.9.0/build/env/bin/hue migrate
From Host1 Mysql Installed Host execute this command.

Step 11:
From MySql Host do the below operation:
mysql> DELETE FROM hue.django_content_type;

Step 12:
From Host2, Hue installed host do this command.
> /opt/mapr/hue/hue-3.9.0/build/env/bin/hue loaddata bkpHueData.json

Start the Hue UI using the Url.
:8888 ” at url browser.

Try to add a user to “ AddUser “ are at mapr user and add it and check the updated table info at mysql using below command/.
mysql> select *from auth_user;
(It ll display the recently added user info in this table.)


Thursday, June 2, 2016

Configuring MapR-5.0.0 cluster on RHEL-6.7 OS.

Here I am adding very basic steps to follow configuring  MapR-5.0.0 cluster on Redhat-6.7 operating system.
Please follow below steps for  for configuring.
Note:
Here We have 2 disks in each node.
Cluster Information:
Cluster Version : MapR-5.0.0
OS version : RHEL-6.7
Number of nodes : 3 nodes.
Login as :mapr/mapr
(Note: Assuming that the basic hardware requirements meet the cluster to configure.)

Steps:
Step 1:
Add the hostnames and ipaddress of all the cluster nodes in /etc/hosts file on each node.
$sudo vi /etc/hosts
172.20.10.10 host10
172.20.10.11 host11
172.20.10.12 host12

Step 2:
Adding virtual disks info. in file called disks.txt to each node.
$sudo vi /tmp/disks.txt
xvdb
xvdc

Step 3:
Adding a group and a User to the each node
$sudo groupadd -g 5000 mapr
$sudo useradd -g 5000 -u 5000 mapr

Step 4:
Changing the SELINUX parameter=pemissive in each node
$sudo vi /etc/selinux/config
SELINUX=pemissive

Step 5:
Disable the iptables(disable firewall permanently) using below command in each node.
$sudo iptables -F
or use below two commands to disable permanently in each node.
$chkconfig iptables off
$service iptables stop

Step 6:
Add the MapR version and ecosystem repos to maprtech.repo file in each node
$sudo vi /etc/yum.repos.d/maprtech.repo
[maprtech]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/v5.0.0/redhat/
enabled=1
gpgcheck=0
protect=1
[maprecosystem]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/ecosystem-5.x/redhat
enabled=1
gpgcheck=0
protect=1


Step 7:
Use below rpm packages to download on each node
$sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step 8:
Install the above downloaded rpm.
$sudo rpm -Uvh epel-release-6-8.noarch.rpm

Step 9:
import the key
$sudo rpm --import http://package.mapr.com/releases/pub/maprgpg.key

Step 10:
Install java-1.7.0.openjdk-devel , if not installed.
$sudo yum install java-1.7.0-openjdk-devel

Step 11:
Install the mapr-core packages(eg: mapr-fileserver,mapr-cldb,mapr-zookeeper etc... required services on each cluster)
$sudo yum install mapr-fileserver
$sudo yum install mapr-cldb mapr-zookeeper

Step 12:
List out the CLDB's ,Zookeeper's insta nodes and then run the configure.sh which is present in "/opt/mapr/server/" folder on each node.
List of CLDB installed nodes : 172.20.10.10,172.20.10.11
List of Zookeeper installed Nodes: 172.20.10.10,172.20.10.11,172.20.10.12
$sudo server/configure.sh -C 172.20.10.10,172.20.10.11 -Z 172.20.10.10,172.20.10.11,172.20.10.12 -N 3Node-MapR-5.0-Cluster

Step 13:
Add the disks.txt file each node
$sudo server/disksetup -F /tmp/disks.txt

Step 14:
use below command to check for all started commands.
$ sudo maprcli node services -columns svc
Note: 
Please refer below link for more detailed info:
http://doc.mapr.com/display/MapR/Advanced+Installation+Topics