With Couchbase Server 6.5.1. we now standardize the non-root install and upgrade for rpm packages. This will now allow you to easily install, upgrade and maintain Couchbase Server as non-root. 

The purpose of this blog is not to replace our excellent Couchbase documentation, but rather, to reiterate some best practices  for a successful installation. This blog is divided into 2 parts.

Part 1: Install Couchbase Server 6.5.1 as non-root.
Part 2: Upgrade a non-root installed Couchbase Server 6.0.4 to version 6.5.1.

What’s new in Couchbase Server 6.5.1 

Install: A new installer cb-non-package-installer, is used to install the Couchbase server as opposed to using rpm2cpio and reloc.sh.
Status: Now you can check the status of the Couchbase server with a new command, couchbase-server –status
Upgrade: The cb-non-package-installer is used to upgrade the Couchbase server from the previous version. All upgrade options, including Rolling Online Upgrade with Graceful Failover and Delta Recovery are supported.

Part 1: New install

Plan

  • Deploy a 3 node Couchbase 6.5.1 cluster as non-root
  • The user will be: ec2-user
  • The Server will be deployed in: /home/ec2-user/cb-server
  • The Data will be in: /home/ec2-user/cb-data

Pre-requisites

There are a few Common Errors which you may run into when running Couchbase server as non-root and the linked document describes them. For example: ulimits. Ulimit is the number of open file descriptors per process. The standard root installer changes these during installation, but for non-root, you have to take care of these yourself. So, let me highlight a few here since these are very important.

Disable Transparent Huge Pages (THP)

Transparent huge pages (THP) is a memory management system that is enabled by default in most Linux operating systems. THP must be disabled in order for Couchbase Server to function correctly on Linux. Please follow the documentation and ensure that THP has been disabled.

Configure Kernel Swappiness

On Linux, the kernel’s swappiness level indicates how likely the system is to swap pages out of physical memory based on RAM usage. Swappiness should be set to 1 or 0 on most Linux systems to achieve optimal Couchbase Server performance. Please follow the documentation and ensure that Swappiness has been set as per recommendation.

Check the ulimits

A quick check of ulimits for the ec2-user. These are the minimum recommended values. Make these permanent.

Install required programs

We need python2, bzip2 and perl. So, make sure that these are all available

Download the packages

Install Couchbase Server as non-root

SSH into the first node to install.

Step 1: Create the directories for the Server and Data

Step 2: Install the Couchbase Server

Step 3: Start the Couchbase Server

You can ignore that message since we have already set the ulimits for ec2-user.

Step 4: Check the status

Repeat above steps for the other 2 nodes

Setup the Couchbase Cluster

Access: http://xxxx.compute.amazonaws.com:8091


Note the changes to the various Data Paths.

Check the 1 node cluster

Add remaining nodes

Click on ADD SERVER from the above screen, add the other 2 nodes and Rebalance. When adding, do check the custom data paths in the Add Server screen.

Cluster is now up and running

Part 2: Upgrade

Pre-upgrade

I start with a 3 node Couchbase Server 6.0.4 installed as ec2-user.
The installation home is: /home/ec2-user/cb-server
The data directory is: /home/ec2-user/cb-data

Lets check the Couchbase Server status by logging into Couchbase 6.0.4 Admin UI and make sure they are all Green.

Next, a quick check of the buckets shows:


Now, let’s upgrade this cluster to Couchbase 6.5.1.

Pre-requisites

This is the same as described in Part 1 of this blog. Please make sure of meeting these pre-requisites even if these have not been done when you installed Couchbase Server 6.0.4. The upgrade process is a good opportunity to do this.

Upgrade Process

Step 1: Gracefully Failover a node

Notes

  • Do not Rebalance yet
  • The node is Failed over and not taking any traffic, but is still part of the cluster

A quick check of the node

SSH into the failed over node and perform these steps.

Step 2: Stop the server

Step 3: Upgrade the server

Step 4: Start the server

Tip: In any of the steps, you can check the server status by:

Check the server version in the UI, post upgrade


Note the change in the Server Version.

Add the node back and Rebalance

Note: We will be performing Rolling Online Upgrade with Graceful Failover and Delta Recovery. 


Click the Add Back: Delta Recovery button.

Optional: Check the Log

Complete full upgrade

Repeat the same process for all 3 nodes.To Failover the first node, which you were logging into the Admin UI, you will need to access the Admin UI from a upgraded node. The look and feel has been made better, but the functionality is the same.

Conclusion

After the completion of the upgrade process, check the Dashboard for the Server version:


The upgrade is complete.

 

Author

Posted by Prasad Doddi

Prasad is a Senior Product Manager for Couchbase Supportability, Manageability and Tools. Prior to Couchbase, he worked at IBM in various departments including Development, QA, Support and Technical Sales. Prasad holds a master’s degree in Chem. Engg. from Clarkson University, NY.

Leave a reply