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

 

 

Verified against host OS:

  • Ubuntu 14.04 LTS Desktop 64-bit
  • Ubuntu 16.04 LTS Desktop 64-bit
  • CentOS 6.7 64-bit

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

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 has been tested on the latest production release of MariaDB and PostgreSQL.

Kaa also requires MongoDB 2.6.9 or Cassandra 3.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.

    Install MariaDB 5.5.
    Install the python-software-properties package:

    Now, we can add the key files for the MariaDB repository. 

    After that we add repository:

    Install MariaDB with Galera Patches:

    If you faced issues with above method, please try another one:

     

    If, for some reason, you do not already have rsync installed on your machines, you should install it now by typing:

    You can check if the MariaDB service is running by executing the following command:

    Connect to the mysql-server by executing the following command:

    Specify the login and password for user (the default login and password in Kaa configuration files is "sqladmin" and "admin"):

    Create the Kaa database by executing the following command:

    If you want configure MariaDB in cluster mode use MariaDB cluster installation

    Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

    Install PostgreSQL 9.4.

    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.

  3. Install Zookeeper 3.4.5.

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

  4. Install MongoDB (Optional, you may install Cassandra 3.5 instead) (source).

    If you have installed previous version, this is how you can completely uninstall it:

    Add the MongoDB repository to the /etc/apt/sources.list.d/mongodb.list.

    Install MongoDB.

    Before start edit file:

    Start the MongoDB.

    Verify that MongoDB has started successfully.

     

     

  5. Install Cassandra 3.5 (Optional, you may install MongoDB instead) (source).
    Since Cassandra requires python-support and this package was removed in Ubuntu 16.04 , manually install python-support:

    Download deb package and unpack it:

    Set Apache repo. Change the 35x to match the latest version. For example, use 36x if Cassandra 3.6 is the latest version:

    Install Cassandra 3.5.

    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, 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.

    Install MariaDB 5.5.
    Install the python-software-properties package:

    Now, we can add the key files for the MariaDB repository. 

    After that we add repository:

    Install MariaDB with Galera Patches:

    If, for some reason, you do not already have rsync installed on your machines, you should install it now by typing:

    You can check if the MariaDB service is running by executing the following command:

    Connect to the mysql-server by executing the following command:

    Specify the login and password for user (the default login and password in Kaa configuration files is "sqladmin" and "admin"):

    Create the Kaa database by executing the following command:

    If you want configure MariaDB in cluster mode use MariaDB cluster installation

    Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

    Install PostgreSQL 9.4.

    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.

  3. Install Zookeeper 3.4.5.

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

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

    Install MongoDB 2.6.9.

     Start the MongoDB.

    Verify that MongoDB has started successfully.

  5. Install Cassandra 3.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 3.5.

    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 3.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 3.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 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

You can find SQL database configuration property file templates in "/etc/kaa-node/conf/" folder: mariadb-dao.properties.template file for MariaDB database and postgresql-dao.properties.template file for PostgreSQL.

HTTP ERROR: 503

If you receive ERROR: 503 Problem accessing /kaaAdmin. Reason: Service Unavailable or GenericJDBCException: Could not open connection when accessing the Admin UI, please check the log files (refer to Troubleshooting guide for how to obtain the logs) for the following lines:

Log file example

If such lines are present in the logs then you need to download the database driver jar file from the official site, place it in Kaa node classpath "/usr/lib/kaa-node/lib" and restart the kaa-node service:

Check that the MariaDB login and password is up to date in the server configuration files.

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 login and password.

Switching between MariaDB and PostgreSQL

To switch between databases change contents of sql-dao.properties and admin-dao.properties files (see /etc/kaa-node/conf/)

 

 

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).

 

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.

 

For switching between databases you must change contents of sql-dao.properties and admin-dao.properties files. Use this configuration.


Copyright © 2014-2016, CyberVision, Inc.

G
M
T

 

           

 

Звукова функція обмежена 100 символами
  • No labels

6 Comments

  1. in sql database configuration running cat /etc/kaa-node/conf/sql_dao.properties | grep jdbc_username gives me no such file or directory, when i check the directory i found the file name is sql-dao.properties

    Also in nosql database configuration cat /etc/kaa-node/conf/dao.properties | grep nosql_db_provider_name the name of the file is nosql-dao.properties

    please update the documentation, thanks so much

  2. Made the appropriate changes in files names. Thanks.

  3. The addition of MongoDB repository is not working. It only worked adding hpk://keyserver.ubuntu.com:80 to this address

  4. follow the steps in this link to install latest mongodb 3.2 community edition on your ubuntu machine

    https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

  5. Hi! I come from china, beijing.  I can not download kaa rpm bag. why ???  I can visit this link:  http://www.kaaproject.org/download-kaa/ , but click download button, not response. Anyone help me?

    1. I found it.  js file can not donwload. 浏览器不能加载下载使用的js。需要翻墙