Friday, October 3, 2014

CouchBase Installation on Ubuntu

Couchbase Installation..

Couchbase installation is pretty straight forward.

go to http://www.couchbase.com/download and based on your operating system & Config, download the required version - Typically around 150 MB of size.
you can download it to the machine using sftp as shown below.

Note : for Red Hat Linux Systems, thing to consider is : THP (Transparent huge pages) should be disabled which is recommend by the couch base.
/* Check Status
You can check the current status of THP with the following command:
cat /sys/kernel/mm/*transparent_hugepage/enabled
Output will resemble the following, with the current status marked in [brackets]:
[always] madvise never
 Always indicates that THP will be used for all allocations, and Couchbase recommends disabling THP in this instance. Note: Older kernels may only show the always and never options. 
You can check the current status of THP defrag with the following command:
cat /sys/kernel/mm/*transparent_hugepage/defrag
Output will resemble the following, where always is specified, meaning that THP defrag is always enabled:
[always] never
Note: some distributions name the flag transparent_hugepage, others redhat_transparent_hugepage, hence the wildcard). */ 
For more info, please visit : http://support.couchbase.com/entries/22160929-Transparent-Huge-Pages

UbantoAz:Downloads raj$ sftp 10.64.211.111
rmattewada@10.64.211.238's password: 

Connected to 10.64.211.111.
sftp> cd /tmp
sftp> pwd
Remote working directory: /tmp
sftp> put couchbase-server-enterprise_2.5.1_x86_64.deb  .
Uploading couchbase-server-enterprise_2.5.1_x86_64.deb to /tmp/./couchbase-server-enterprise_2.5.1_x86_64.deb
couchbase-server-enterprise_2.5.1_x86_64.deb                                                                                    100%  134MB   5.6MB/s   00:24    
sftp> ls
couchbase-server-enterprise_2.5.1_x86_64.deb          

Once the copy is done, you can follow below as root user:
Note that in Ubuntu, you have Debian as package manager, where as in RHEL, you will see yum.

root@csshtest-6001:/opt# pwd
/opt
root@csshtest-6001:/opt# cp /tmp/couchbase-server-enterprise_2.5.1_x86_64.deb .
root@csshtest-6001:/opt# uname -a
Linux csshtest-6001 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@csshtest-6001:/opt# #For Ubuntu version 12.04, you need to install a specific OpenSSL dependency by running:
root@csshtest-6001:/opt# id
uid=0(root) gid=0(root) groups=0(root)
root@csshtest-6001:/opt# apt-get install libssl0.9.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libssl0.9.8
0 upgraded, 1 newly installed, 0 to remove and 87 not upgraded.
Need to get 692 kB of archives.
After this operation, 2,445 kB of additional disk space will be used.
Get:1 http://installsvc.vip/mirrors/archive.ubuntu.com/ubuntu/ trusty-updates/universe libssl0.9.8 amd64 0.9.8o-7ubuntu3.2.14.04.1 [692 kB]
Fetched 692 kB in 0s (4,135 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libssl0.9.8:amd64.
(Reading database ... 56731 files and directories currently installed.)
Preparing to unpack .../libssl0.9.8_0.9.8o-7ubuntu3.2.14.04.1_amd64.deb ...
Unpacking libssl0.9.8:amd64 (0.9.8o-7ubuntu3.2.14.04.1) ...
Setting up libssl0.9.8:amd64 (0.9.8o-7ubuntu3.2.14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
root@csshtest-6001:/opt# 
root@csshtest-6001:/opt# #The Ubuntu Couchbase installation uses the DEB package. To install, use the dpkg command-line tool using the DEB file that you downloaded. The following example uses sudo which will require root-access to allow installation:
root@csshtest-6001:/opt# 
root@csshtest-6001:/opt# mkdir couchbase
root@csshtest-6001:/opt# cd couchbase/
root@csshtest-6001:/opt/couchbase# cp ../couchbase
couchbase/                                    couchbase-server-enterprise_2.5.1_x86_64.deb  
root@csshtest-6001:/opt/couchbase# cp ../couchbase-server-enterprise_2.5.1_x86_64.deb  .
root@csshtest-6001:/opt/couchbase# 
root@csshtest-6001:/opt/couchbase# dpkg -i couchbase-server-enterprise_2.5.1_x86_64.deb 
Selecting previously unselected package couchbase-server.
(Reading database ... 56755 files and directories currently installed.)
Preparing to unpack couchbase-server-enterprise_2.5.1_x86_64.deb ...
libssl1* is installed. Continue installing
Minimum RAM required  : 4 GB
System RAM configured : 1017948 kB

Minimum number of processors required : 4 cores
Number of processors on the system    : 1 cores
Unpacking couchbase-server (2.5.1) ...
Setting up couchbase-server (2.5.1) ...
 * Started couchbase-server

You have successfully installed Couchbase Server.
Please browse to http://csshtest-6001: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, 18091, 18092, 11214, 11215 and from 21100 to 21299.

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

Processing triggers for ureadahead (0.100.0-16) ...

root@csshtest-6001:/opt/couchbase# 

Now, open a browser and type in : http://ip_address:8091
you will get the set up prompt, click on that and you will see


decide on per server Ram Quota - Typically 75% of the total available RAM or
80% of the total available RAM if you are using XDCR (Cross Data Center Replication)
Note: you can join a cluster immediately (if you are planning to do so) if you check that instead of starting as a new cluster.

If you want to play with the sample data, check in for available samples like Beer or gamesim.


Depending on your I/O Load, chose the reader/sriter workers
Do not enable Flush if you are using this for production.
decide on per node ram Quota for bucket and allocate one.

pass through the next step and at step 5, provide username, password and you are done.

You can follow the same for all the servers in your cluster and bring them up. Then, you can add the nodes to a cluster.

Observations:

Observations:
1. when there are 3 nodes in a cluster,
if 2 nodes are down and another node is added, but in pending balance state,
and in that state, if that server server goes down, the admin console says:
Servers Down: 2
Servers Pending Rebalance: 1
where as i think it should say Servers Down: 3



2. when rebalance is in progress, if we click on the stop rebalance, the operation would not stop
though it says "rebalance stopped by janitar"
to verify that, in the server nodes tab, go to pending rebalance and you will not notice anything pending.




No comments: