Overview

This page presents an brief overview about webPA server components required for a reference webPA cluster setup and explains how to setup the cluster.

WebPA is a secure web protocol messaging system for bi-directional communication between cloud server and RDK devices. It was built from the ground up specifically with security and performance as priorities. It is currently used by millions of devices and services and will continue to expand in scale into the future. 

Setting up a single node webPA cluster

System Requirement

Operation systemCentos 6.8
Architecturex86_64
Memory2048 MB
Disk spaceN/A

Dependencies


1) Supervisor


Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.

Unlike other system initialization services, it is not meant to be run as a substitute for init. Instead it is meant to be used to control processes related to a project or a customer, and is meant to start like any other program at boot time.

How to install

a) Enable Extra Packages for Enterprise Linux (EPEL)
	$ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
	$ rpm -Uvh epel-release-6-8.noarch.rpm
b) Install Python meld3
	$ yum install python-meld3
c) Install supervisor
	$ yum install supervisor


2) ZooKeeper


ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interface so you don't have to write them from scratch. You can use it off-the-shelf to implement consensus, group management, leader election, and presence protocols. And you can build on it for your own, specific needs.

How to install

$ yum install zookeeper

Adding a startup script

# cat /etc/init.d/zookeeper 
#!bin/bash
#
# zookeeper Startup Script
#
# chkconfig: 345 90 14
# description: Zookeeper Application Startup Script

# Source function library
. /etc/rc.d/init.d/functions

#-------------------------------------------------------------------------------

start() {
	echo -n $"Starting Zookeeper: "
	/usr/lib/zookeeper/bin/zkServer.sh start
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && echo "[ OK ]"
}

stop() {
	echo -n $"Stopping Zookeeper: "
	/usr/lib/zookeeper/bin/zkServer.sh stop
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && echo "[ OK ]"
}

restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop) 
	stop
	;;
  restart|force-reload|reload)
	restart
	;;
  status)
	/usr/lib/zookeeper/bin/zkServer.sh status
	RETVAL=$?
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
	exit 1
esac

exit $RETVAL

Enable the service at bootup

Launch system-config-services from a console and enable the zookeeper service from the services list.