Wednesday, March 25, 2015

How To Implement Couchbase Cluster on Linux


Here we have considered three servers for Couchbase cluster configuration.

Action Plan

1. Download Required RPM from Couchbase Website
2. Install Couchbase RPM in three servers
3. Configure three Couchbase server one after another
4. Configure cluster from from any of the three server 

Environment Details For Each server

1. Operating System Version : Red Hat Linux 6.4 (64 Bit)
2. RAM : 3 GB
3. HDD : 50 GB.

Configuration Details

Server:1
1. IP Address : 192.168.0.71
2. Hostname : couchbase1.spectrum-bd.com
Server:2
1. IP Address : 192.168.0.72
2. Hostname : couchbase2.spectrum-bd.com
Server:3
1. IP Address : 192.168.0.73
2. Hostname : couchbase3.spectrum-bd.com

To start using Couchbase Server, follow these steps to install each node of server:

Installing on Red Hat Linux

For Red Hat Enterprise Linux version 6.0, Couchbase Server RPM performs dependency checks for OpenSSL using pkg-config. Therefore you need to check that this pkg-config is installed and if you do not have it, InstallIt#
To install Couchbase Server, use the rpm command-line tool with the RPM package that you downloaded. You must be logged in as root (Superuser) to complete the installation:
root-> rpm –ivh couchbase-server-enterprise-3.0.2-centos6.x86_64.rpm
Once the rpm command completes, Couchbase Server starts automatically, and is configured to automatically start during boot under the 2, 3, 4, and 5 runlevels. Refer to the Red Hat RPM documentation for more information about installing packages using RPM.
After installation finishes, the installation process will display a message similar to that below:
    Minimum RAM required  : 4 GB
    System RAM configured : 8174464 KB

    Minimum number of processors required : 4 cores 
    Number of processors on the system : 4 cores


    Starting couchbase-server[ OK ]

    You have successfully installed Couchbase Server. 
    Please browse to http://couchbase1.spectrum-bd.com:8091/ to configure your server. 
    Please refer to http://couchbase.com for additional resources.

    Please note that you have to update your firewall configuration to 
    allow connections to the following ports: 11211, 11210, 11209, 4369,
    8091, 8092 and from 21100 to 21299.


    By using this software you agree to the End User License Agreement.
    See /opt/couchbase/LICENSE.txt.
Once installed, you can use the Red Hat chkconfig command to manage the Couchbase Server service, including checking the current status and creating the links to enable and disable automatic start-up. Refer to the Red Hat documentation for instructions.
To do the initial setup for Couchbase, open a web browser and access the Couchbase Web Console. See the following step:...
01.Setup:Open Couchbase Web Console and click to setup.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/01.setup.PNG
02.Configure Server: Set the disk storage and cluster configuration. Provide a node IP or hostname under Configure Server Hostname.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/02.configure_server.PNG
03.Sample buckets: The Sample Buckets panel appears where you can select the sample data buckets you want to load.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/03.sample_buckets.PNG
04.Bucket Settings: Click the names of sample buckets to load Couchbase Server. These data sets demonstrate Couchbase Server and help you understand and develop views. If you decide to install sample data, the installer creates one Couchbase bucket for each set of sample data you choose.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/04.Bucket_Settings.PNG
05.Notifications:This stage you must have to be check i agree to the terms and conditions associated with this product.But you can uncheck Enable software update notifications.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/05.Notificatons.PNG
06.Secure the Server: Enter a username and password. Your username must have no more than 24 characters, and your password must have 6 to 24 characters. You use these credentials each time you add a new server into the cluster. These are the same credentials you use for Couchbase REST API.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/06.secure_server.PNG
07.Finish: Once you finish this setup, you see Couchbase Web Console with the Cluster Overview page:source:Shelf/Wiki/couchbase/images/HowTo_Cluster/07.finish.PNG
We just finished installing Couchbase on server 1.we have to follow above step for server 2, and sever 3. then we are going to start clustering with following step....

Couchbase clustering

08.Server Nodes: In the Server panel you can view and managing servers in the cluster. Click Add Server.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/08.server_node.PNG
09.Add Server: A panel appears where you can provide credentials and either a host name or IP address for the new node: At this point you can provide a hostname for the node you add.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/09.add_server_2.PNG
10.Pending Rebalance: At this stage we do not have to Re balancing because we will do it later .source:Shelf/Wiki/couchbase/images/HowTo_Cluster/10.pending_rebalanching.PNG
11. Add Another Server:Same as at stage 09.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/11.add_server_3.PNG
12.Rebalance:In the Server panel, click Rebalance.The rebalance automatically takes all data from the node flagged for removal and move it to your new node.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/12.Pending_reblanching.PNG
13.complete:Once rebalancing has been completed, the Server Nodes display only the active nodes in your cluster.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/13.compleate.PNG
15.Cluster Review: Now click on the cluster Review tab and it will display three servers as active server.source:Shelf/Wiki/couchbase/images/HowTo_Cluster/14.Cluster_Review.png

At this Point we can Say Couchbase Cluster Installed and Configured Successfully.

No comments:

Post a Comment