Feeds:
Posts
Comments

Posts Tagged ‘LB’

What is Keepalived ?

Keepalived is a routing software written in C. The main goal of this project is to provide simple and robust facilities for loadbalancing and high-availability to Linux system and Linux based infrastructures. Loadbalancing framework relies on well-known and widely used Linux Virtual Server (IPVS) kernel module providing Layer4 loadbalancing. Keepalived implements a set of checkers to dynamically and adaptively maintain and manage loadbalanced server pool according their health. On the other hand high-availability is achieved by VRRP protocol. VRRP is a fundamental brick for router failover.

Visit here for more details : http://www.keepalived.org/

Pre-requirements

  1. Additional Packages required to build/compile keepalived from sourcesudo apt-get install build-essential libssl-dev keepalived psmisc
  2. Move Installed keepalivedmv /usr/sbin/keepalived /usr/sbin/keepalived.orig
  3. Change keepalived service script:

    vi /etc/init.d/keepalived

    Modify the path: “DAEMON=/usr/sbin/keepalived” to “DAEMON=/usr/local/sbin/keepalived”

  4. Need Additional 1 Virtual IP(VIP) address on top of existing IP

Download Source Code

sudo apt-get install wget

wget wget http://www.keepalived.org/software/keepalived-1.2.13.tar.gz

tar -zxvf keepalived-1.2.13.tar.gz

Build and Install from Source Code

cd keepalived-1.2.13
./configure
make
make install
keepalived -v
Keepalived v1.2.13 (11/30,2016)

Start Keepalived

/etc/init.d/keepalived start

Or

service keepalived start/restart/stop

Error :

Nov 30 15:25:39 node-2 Keepalived[14392]: Starting Keepalived v1.2.13 (11/30,2016)
Nov 30 15:25:39 node-2 Keepalived[14393]: Starting Healthcheck child process, pid=14395
Nov 30 15:25:39 node-2 Keepalived[14393]: Starting VRRP child process, pid=14396
Nov 30 15:25:39 node-2 Keepalived_healthcheckers[14395]: Initializing ipvs 2.6
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering Kernel netlink reflector
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering Kernel netlink command channel
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering gratuitous ARP shared channel
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Opening file ‘/etc/keepalived/keepalived.conf’.
Nov 30 15:25:39 node-2 modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file ‘/lib/modules/3.19.0-26-generic/modules.dep.bin’
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Configuration is using : 63166 Bytes
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Using LinkWatch kernel netlink reflector…
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: VRRP_Instance(V1) Entering BACKUP STATE
Nov 30 15:25:39 node-2 Keepalived_healthcheckers[14395]: IPVS: Can’t initialize ipvs: Protocol not available
Nov 30 15:25:39 node-2 Keepalived[14393]: Healthcheck child process(14395) died: Respawning

Solution:

sudo modprobe ip_vs

service keepalived restart

Further Details will be updated, stay tuned.

 

 

Read Full Post »

Requirements:

  • OpenSSL installed in Ubuntu
  • Following details for your SSL certificate
    • Country (2 digit ex, IN)=MY,
    • State or =Malaysia,
    • Locality or City=Kuala Lumpur,
    • Organization Name=Marutham Infra Services Sdn Bhd,
    • Organizational Unit Name=Cloud and Advance Services,
    • Common Name (e.g. server FQDN)=maruthuminfra.com.my

Generate CSR:

  • Now Generate Certificate Signing Request (CSR), It also generates Private Key file(Make sure it is protected and no one has access to this file). We use RSA 2048 bit Encryption with SHA256 Hashing algorithm as shown below.
  • openssl req -new -newkey rsa:2048 -nodes -sha256 -out test.csr -keyout test.key -subj “/C=MY/ST=Malaysia/L=Kuala Lumpur/O=Marutham Infra Services Sdn Bhd/OU=Cloud and Advance Services/CN=maruthaminfra.com.my”

  • CSR generation done. Now you may send you CSR file to CA Issuer.
  • Next Install SSL at Load balancer or WebServer or Proxy Server or Application Server where you SSL is getting terminated.

Any Questions, Please comment below

யாதும் ஊரே யாவரும் கேளிர் – புறநானூறு

Read Full Post »