Kaa releases
Shortcuts
Skip to end of metadata
Go to start of metadata

Introduction

This guide describes installation and configuration of Kaa components on a single Linux node. If this is the first time you use Kaa, we recommend that you start the evaluation using the Kaa Sandbox instead of attempting manual installation described in this guide. The Kaa Sandbox emulates a single-node Kaa installation which comes already pre-configured so that you could instantly start developing applications. Additionally, the Kaa Sandbox provides a number of demo applications for you to play with and learn by example. 

Kaa requirements and supported versions

Supported OS

Kaa supports the following operating system families and provides installation packages for each of them.

  • Ubuntu and Debian systems
  • Red Hat/CentOS/Oracle 5 or Red Hat 6 systems

Please note that the instructions from this guide were tested on Ubuntu 14.04 and Centos 6.7. Instructions for other OS may have minor differences.

System requirements

To use Kaa, your system must meet the following minimum system requirements.

  • 64-bit OS
  • 4 Gb RAM

Third party components

 Kaa requires the following third party components to be installed and configured.

Kaa also requires MongoDB 2.6.9 or Cassandra 2.2.5 as a NoSQL database. The installation steps for third-party components are provided in the following section.

Installation steps

Third party components

  1. Install common utils.

    Download and install wget, ca-certificates, curl.

  2. Install Oracle JDK 8.
    Add java apt repository. This repository is not official; for a different way to install Oracle JDK, see the official page.

    You can check if Oracle JDK is installed by executing the following command.

    In case of successful installation, you will receive the JDK version.

  3. Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

    Install PostgreSQL 9.4 for Ubuntu 14.04 64-bit.

    You can check if the Postgresql service is running by executing the following command.

    For more details, please refer to the official page.

    Connect to the postgresql-server via the psql utility by executing the following command.

    Specify the password for the postgres user (the default password in Kaa configuration files is "admin").

    Create the Kaa database by executing the following command.

  4. Install Zookeeper 3.4.5.
    Install Zookeeper 3.4.5 for Ubuntu 14.04 64-bit.

    You can check if the Zookeeper service is running by executing the following command.

  5. Install MongoDB 2.6 (Optional, you may install Cassandra 2.2.5 instead) (source).
    Add the MongoDB repository to the /etc/apt/sources.list.d/mongodb.list.

    Install MongoDB 2.6.9 for Ubuntu 14.04 64-bit.

     Start the MongoDB.

    Verify that MongoDB has started successfully.

  6. Install Cassandra 2.2.5 (Optional, you may install MongoDB 2.6 instead) (source).
    Add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list.

    Install Cassandra 2.2.5 for Ubuntu 14.04 64-bit.

    You can check if the Cassandra service is running by executing the following command.

    Install Java Native Access (JNA).

    Check cassandra cql shell.

  1. Install common utils.

    Download and install wget, nc, gzip.

  2. Install Oracle JDK 8.

    Download and install JDK rpm.

    Update Java alternatives for the new JDK.

    Check Java version.

  3. Install PostgreSQL 9.4 ( source ).

    Exclude old PostgreSQL from the default repository.

    Install PostgreSQL 9.4 PGDG file for CentOS 6 64-bit.

    List available PostgreSQL installations and install the PostgreSQL server.

    Initialize the PostgreSQL database.

    Configure the database to start automatically when OS starts.

    Start the database.

    Connect to the postgresql-server via the psql utility by executing the following command.

    Specify the password for the postgres user (default password in kaa configuration files is "admin").

    Create the Kaa database by executing the following command.

    Update pg_hba.conf file to allow local connections.

    Restart the database.

  4. Install Zookeeper 3.4.7.

    Download and extract Zookeeper packages.

    Create a data directory.

    Edit dataDir property in zookeeper configuration file.

    Install the supervisor utility.

    Edit the /etc/supervisord.conf file and add a section about ZooKeeper to it.

    Configure the database to start automatically when OS starts.

    Start Zookeeper.

    Check Zookeeper status.

    You can check if the Zookeeper service is running by executing the following command.

  5. Install MongoDB 2.6 (Optional, you may install Cassandra 2.2.5 instead) (source).

    Add the MongoDB yum repository.

    Install MongoDB.

    Start MongoDB.

    Verify that MongoDB has started successfully.

    Configure database to start automatically when OS starts.

  6. Install Cassandra 2.2.5 (Optional, you may install MongoDB 2.6 instead) (source).

    Add the DataStax Community yum repository.

    Install Java Native Access (JNA).

    Install Cassandra.

     Export java variables.

     Start Cassandra.

    Configure the database to start automatically when OS starts.

    Check cassandra cql shell.

 

 

Kaa server components

To install Kaa you will need to download pre-built packages or build them from the source codeWe will use pre-built packages in this guide.

 

  1. Download the latest Debian package from the Kaa download page.
  2. Unpack the downloaded tarball by executing the following command.

  3. Install the Node service by executing the following command.

  1. Download the latest RPM package from the Kaa download page.
  2. Unpack the downloaded tarball by executing the following command.

  3. Install the Node service by executing the following command.

Configuration steps

SQL database configuration

Check that the PostgreSQL password is up to date in the server configuration files.

In case of the password mismatch, edit the configuration file to set a new password.

NoSQL database configuration

Check that a NoSQL database name matches your choice.

In case you are going to use Cassandra, execute the following commands.

Network interface configuration

This step will configure a public interface for Operations and Bootstrap servers. It is important to specify the hostname or an IP address that is visible for devices in your network. This will allow various devices to communicate with the server components.

Firewall rules configuration

Open TCP ports for Admin UI (8080), Bootstrap server (9888, 9889), Operations server (9997, 9999).

Open TCP ports for Admin UI (8080), Bootstrap server (9888, 9889), Operations server (9997, 9999).

Startup steps

Start Kaa service.

Check logs after the startup.

Open Admin UI in a web browser: http://YOUR_SERVER_HOST:8080/kaaAdmin. This will open a web page that will request to enter the Kaa administrator login and password information. This is one time operation.

Further reading

Use the following guides and references to make the most of Kaa.

Guide
What it is for
Administration UI guideUse this guide to start working with the Kaa web UI.
Programming guideUse this guide to create your own Kaa applications.

Copyright © 2014-2016, CyberVision, Inc.

  • No labels