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 Documentación de Couchbase, but rather, to reiterate some buenas prácticas for a successful installation. This blog is divided into 2 parts.
Parte 1: Install Couchbase Server 6.5.1 as non-root.
Parte 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
Instale: A new installer cb-non-package-installer, is used to install the Couchbase server as opposed to using rpm2cpio and reloc.sh.
Estado: Now you can check the status of the Couchbase server with a new command, couchbase-server –status
Actualizar: La 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
Requisitos previos
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.
Desactivar Páginas Transparentes Enormes (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 documentación 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 documentación 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.
1 2 3 4 5 |
[ec2-usuario@ip-172-31-22-131 ~]$ ulimit -n 70000 [ec2-usuario@ip-172-31-22-131 ~]$ ulimit -c ilimitado |
Install required programs
We need python2, bzip2 and perl. So, make sure that these are all available
1 2 3 4 5 6 7 8 9 |
[ec2-usuario@ip-172-31-22-131 ~]$ python2 -V Python 2.7.16 [ec2-usuario@ip-172-31-22-131 ~]$ bzip2 -V bzip2, a bloque-sorting archivo compressor; Versión 1.0.6, 6-Sept-2010. [ec2-usuario@ip-172-31-22-131 ~]$ perl -v Este es perl 5, versión 26, subversion 3 (v5.26.3) construido para x86_64-linux-hilo-multi (con 51 registrado patches, véase perl -V para más detalle) |
Download the packages
1 2 3 |
[ec2-usuario@ip-172-31-22-131 ~]$ wget https://packages.couchbase.com/releases/6.5.1/couchbase-server-enterprise-6.5.1-centos8.x86_64.rpm [ec2-usuario@ip-172-31-22-131 ~]$ wget https://packages.couchbase.com/cb-non-package-installer/cb-non-package-installer |
Install Couchbase Server as non-root
SSH into the first node to install.
Step 1: Create the directories for the Server and Data
1 2 3 4 |
[ec2-usuario@ip-172-31-22-131 ~]$ ls -l total 346696 drwxrwx---. 3 ec2-usuario ec2-usuario 21 Abr 24 18:03 cb-datos drwxrwxr-x. 2 ec2-usuario ec2-usuario 6 Abr 24 18:03 cb-servidor |
Step 2: Install the Couchbase Server
1 2 |
[ec2-usuario@ip-172-31-22-131 ~]$ ./cb-no-paquete-instalador --instale --instale-ubicación /Inicio/ec2-usuario/cb-servidor --paquete couchbase-servidor-empresa-6.5.1-centos8.x86_64.rpm Con éxito instalado |
Step 3: Start the Couchbase Server
1 2 3 4 5 6 7 8 9 10 11 12 |
/Inicio/ec2-usuario/cb-servidor/op/couchbase/papelera/couchbase-servidor \-- -noinput -detached En maximum número de procesa para el couchbase usuario es configure demasiado low (4096). En debe sea en menos 10000. Normally este puede sea increased por adding el siguiente líneas a /etc/seguridad/límites.conf: couchbase <valor> couchbase <valor> Dónde <valor> es greater que 10000. En procedure mayo sea totally diferente si usted're corriendo así que llamado "non-root/non-sudo install" o si usted've construido Couchbase Servidor de fuente. |
You can ignore that message since we have already set the ulimits for ec2-user.
Step 4: Check the status
1 2 |
[ec2-usuario@ip-172-31-22-131 ~]$ /Inicio/ec2-usuario/cb-servidor/op/couchbase/papelera/couchbase-servidor --estado Couchbase Servidor es corriendo |
Repeat above steps for the other 2 nodes
Setup the Couchbase Cluster
Acceso: http://xxxx.compute.amazonaws.com:8091
Note the changes to the various Data Paths.
Check the 1 node cluster
Add remaining nodes
Haga clic en ADD SERVER from the above screen, add the other 2 nodes and Reequilibrar. 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.
Requisitos previos
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
Notas
- Visite no 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
1 |
[ec2-usuario@ip-172-31-25-239 ~]$ /Inicio/ec2-usuario/cb-servidor/op/couchbase/papelera/couchbase-servidor -k |
Step 3: Upgrade the server
1 2 3 4 |
[ec2-usuario@ip-172-31-25-239 ~]$ ./cb-no-paquete-instalador --actualizar --instale-ubicación \ /Inicio/ec2-usuario/cb-servidor --paquete couchbase-servidor-empresa-6.5.1-centos8.x86_64.rpm Ejecutar cbupgrade este podría toma algunos tiempo Actualizar tiene completado con éxito |
Step 4: Start the server
1 |
[ec2-usuario@ip-172-31-25-239 ~]$ /Inicio/ec2-usuario/cb-servidor/op/couchbase/papelera/couchbase-servidor \-- -noinput -detached |
Consejo: In any of the steps, you can check the server status by:
1 |
[ec2-usuario@ip-172-31-25-239 ~]$ /Inicio/ec2-usuario/cb-servidor/op/couchbase/papelera/couchbase-servidor --estado |
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 con Graceful Failover and Delta Recovery.
Click the Add Back: Delta Recovery botón.
Optional: Check the Log
1 |
Inicio reequilibrar, KeepNodes = ['ns_1@ec2-3-101-69-76.us-west-1.compute.amazonaws.com', 'ns_1@ec2-54-176-242-50.us-west-1.compute.amazonaws.com', 'ns_1@ec2-54-67-66-89.us-west-1.compute.amazonaws.com'], EjectNodes = [], Fallido en y being ejected nodos = [], Delta recovery nodos = ['ns_1@ec2-54-176-242-50.us-west-1.compute.amazonaws.com'], Delta recovery cubos = todos; Operation Id = 1651aa843a095465bbb5b38dd22a1adans_orchestrator 000ns_1@ec2-54-176-242-50.us-oeste-1.compute.amazonaws.com1:00:44 AM Vie Abr 24, 2020 |
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.
Conclusión
After the completion of the upgrade process, check the Dashboard for the Server version:
The upgrade is complete.