Kaa releases
Shortcuts

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

 

 

Note

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

AUI Tabs Container
titleOS
directionhorizontal
AUI Tabs Page
titleUbuntu 16.04

 

  1. Install common utils.

    Download and install wget, ca-certificates, curl.

    Code Block
    $ sudo apt-get 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.

    Code Block
    $ sudo add-apt-repository ppa:webupd8team/java 
    $ sudo apt-get update 
    $ sudo apt-get install oracle-java8-installer

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

    Code Block
    $ javac -version

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

    Code Block
    javac 1.8.0_91
  3. AUI Tabs Container
    directionhorizontal
    AUI Tabs Page
    titleMariaDB

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

    Code Block
    $ sudo apt-get install python-software-properties

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

    Code Block
    $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

    After that we add repository:

    Code Block
    $ sudo add-apt-repository 'deb http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntu trusty main'

    Install MariaDB with Galera Patches:

    Code Block
    $ sudo apt-get update 
    $ sudo apt-get install mariadb-galera-server galera

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

    Code Block
    $ sudo apt-get install mariadb-galera-server-5.5 mariadb-client-5.5

     

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

    Code Block
    $ sudo apt-get install rsync

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

    Code Block
    $ sudo netstat -ntlp | grep 3306

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

    Code Block
    $ mysql -u root -p

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

    Code Block
    CREATE USER 'sqladmin'@'localhost' IDENTIFIED BY 'admin'; GRANT ALL PRIVILEGES ON *.* TO 'sqladmin'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES;

    Create the Kaa database by executing the following command:

    Code Block
    CREATE DATABASE kaa;
    Info

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

    AUI Tabs Page
    titlePostgreSQL

    Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

    Code Block
    $ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 
    $ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

    Install PostgreSQL 9.4.

    Code Block
    $ sudo apt-get update 
    $ sudo apt-get install postgresql-9.4

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

    Code Block
    $ sudo netstat -ntlp | grep 5432

    For more details, please refer to the official page.

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

    Code Block
    $ sudo -u postgres psql

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

    Code Block
    postgres=# \password Enter new password: admin Enter it again: admin

    Create the Kaa database by executing the following command.

    Code Block
    CREATE DATABASE kaa;
  4. Install Zookeeper 3.4.5.

    Code Block
    $ sudo apt-get install zookeeperd

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

    Code Block
    $ netstat -ntlp | grep 2181
  5. 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:

    Code Block
    $ sudo dpkg -l | grep mongo 
    $ sudo apt-get remove mongodb* --purge

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

    Code Block
    $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
    $ echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

    Install MongoDB.

    Code Block
    $ sudo apt-get update 
    $ sudo apt-get install -y --allow-unauthenticated mongodb-org

    Before start edit file:

    Code Block
    $ sudo nano /etc/systemd/system/mongodb.service
    
    [Unit]
    Description=High-performance, schema-free document-oriented database
    After=network.target
    
    [Service]
    User=mongodb
    ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
    
    [Install]
    WantedBy=multi-user.target

    Start the MongoDB.

    Code Block
    $ sudo systemctl start mongodb

    Verify that MongoDB has started successfully.

    Code Block
    $ sudo systemctl status mongodb
    $ cat /var/log/mongodb/mongod.log | grep "waiting for connections on port" 
    2015-09-23T16:39:35.455+0300 [initandlisten] waiting for connections on port 27017

     

     

  6. 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:

    Code Block
    $ sudo wget "http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb"
    $ sudo dpkg --install python-support_1.0.15_all.deb

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

    Code Block
    $ echo "deb http://www.apache.org/dist/cassandra/debian 35x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
    $ curl -L http://debian.datastax.com/debian/repo_key | apt-key add -

    Install Cassandra 3.5.

    Code Block
    $ sudo apt-get update 
    $ sudo apt-get install -y --allow-unauthenticated cassandra=3.5

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

    Code Block
    $ sudo netstat -ntlp | grep 9042

    Install Java Native Access (JNA).

    Code Block
    $ sudo apt-get install libjna-java

    Check cassandra cql shell.

    Code Block
    $ cqlsh 
    Connected to Test Cluster at 127.0.0.1:9042.
    [cqlsh 5.0.1 | Cassandra 3.5 | CQL spec 3.4.0 | Native protocol v4]
    Use HELP for help.
    cqlsh>
AUI Tabs Page
titleUbuntu 14.04

 

  1. Install common utils.

    Download and install wget, ca-certificates, curl.

    Code Block
    $ sudo apt-get 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.

    Code Block
    $ sudo add-apt-repository ppa:webupd8team/java
    $ sudo apt-get update
    $ sudo apt-get install oracle-java8-installer

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

    Code Block
    $ javac -version

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

    Code Block
    javac 1.8.0_66
  3. AUI Tabs Container
    directionhorizontal
    AUI Tabs Page
    titleMariaDB

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

    Code Block
    $ sudo apt-get install python-software-properties

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

    Code Block
    $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

    After that we add repository:

    Code Block
    $ sudo add-apt-repository 'deb http://mirror.jmu.edu/pub/mariadb/repo/5.5/ubuntu trusty main'

    Install MariaDB with Galera Patches:

    Code Block
    $ sudo apt-get update
    $ sudo apt-get install mariadb-galera-server galera

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

    Code Block
    $ sudo apt-get install rsync

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

    Code Block
    $ sudo netstat -ntlp | grep 3306

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

    Code Block
    $ mysql -u root -p
    

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

    Code Block
    CREATE USER 'sqladmin'@'localhost' IDENTIFIED BY 'admin';
    GRANT ALL PRIVILEGES ON *.* TO 'sqladmin'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;

    Create the Kaa database by executing the following command:

    Code Block
    CREATE DATABASE kaa;
    Info

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

    AUI Tabs Page
    titlePostgreSQL

    Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

    Code Block
    $ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
    $ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

    Install PostgreSQL 9.4.

    Code Block
    $ sudo apt-get update
    $ sudo apt-get install postgresql-9.4

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

    Code Block
    $ sudo netstat -ntlp | grep 5432

    For more details, please refer to the official page.

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

    Code Block
    $ sudo -u postgres psql

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

    Code Block
    postgres=# \password
    Enter new password: admin
    Enter it again: admin

    Create the Kaa database by executing the following command.

    Code Block
    CREATE DATABASE kaa;
  4. Install Zookeeper 3.4.5.

    Code Block
    $ sudo apt-get install zookeeperd

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

    Code Block
    $ netstat -ntlp | grep 2181
  5. 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.

    Code Block
    $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
    $ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

    Install MongoDB 2.6.9.

    Code Block
    $ sudo apt-get update
    $ sudo apt-get install -y mongodb-org=2.6.9 mongodb-org-server=2.6.9 mongodb-org-shell=2.6.9 mongodb-org-mongos=2.6.9 mongodb-org-tools=2.6.9

     Start the MongoDB.

    Code Block
    $ sudo service mongod start

    Verify that MongoDB has started successfully.

    Code Block
    $ cat /var/log/mongodb/mongod.log | grep "waiting for connections on port"
    2015-09-23T16:39:35.455+0300 [initandlisten] waiting for connections on port 27017
  6. 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.

    Code Block
    $ echo "deb http://www.apache.org/dist/cassandra/debian 35x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
    $ curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -

    Install Cassandra 3.5.

    Code Block
    $ sudo apt-get update
    $ sudo apt-get install cassandra=3.5

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

    Code Block
    $ sudo netstat -ntlp | grep 9042

    Install Java Native Access (JNA).

    Code Block
    $ sudo apt-get install libjna-java

    Check cassandra cql shell.

    Code Block
    $ cqlsh
    Connected to Test Cluster at 127.0.0.1:9042.
    [cqlsh 5.0.1 | Cassandra 3.5 | CQL spec 3.4.0 | Native protocol v4]
    Use HELP for help.
    cqlsh>
AUI Tabs Page
titleCentOS 6.7

 

  1. Install common utils.

    Download and install wget, nc, gzip.

    Code Block
    themeEmacs
    languagetext
    $ sudo yum install wget nc gzip
  2. Install Oracle JDK 8.

    Download and install JDK rpm.

    Code Block
    themeEmacs
    languagetext
    $ cd ~
    $ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.rpm"
    $ sudo yum localinstall jdk-8u60-linux-x64.rpm
    

    Update Java alternatives for the new JDK.

    Code Block
    themeEmacs
    languagetext
    $ cd /usr/java/jdk1.8.0_60/
    $ alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_60/bin/java 2
    $ alternatives --config java
    There are 3 programs which provide 'java'.
      Selection    Command
    -----------------------------------------------
       1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
       2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
     + 3           /usr/java/jdk1.8.0_60/bin/java

    Check Java version.

    Code Block
    themeEmacs
    languagetext
    $ java -version
    
    java version "1.8.0_60"
    Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
    Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
  3. Install PostgreSQL 9.4 ( source ).

    Exclude old PostgreSQL from the default repository.

    Code Block
    themeEmacs
    languagetext
    $ sudo nano /etc/yum.repos.d/CentOS-Base.repo

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

    Code Block
    themeEmacs
    languagetext
    $ sudo yum localinstall http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm

    List available PostgreSQL installations and install the PostgreSQL server.

    Code Block
    themeEmacs
    languagetext
    $ sudo yum list postgres*
    $ sudo yum install postgresql94-server

    Initialize the PostgreSQL database.

    Code Block
    themeEmacs
    languagetext
    $ sudo service postgresql-9.4 initdb
    Initializing database:                                     [  OK  ]

    Configure the database to start automatically when OS starts.

    Code Block
    themeEmacs
    languagetext
    $ sudo chkconfig postgresql-9.4 on

    Start the database.

    Code Block
    themeEmacs
    languagetext
    $ sudo service postgresql-9.4 start
    Starting postgresql-9.4 service:                           [  OK  ]

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

    Code Block
    themeEmacs
    languagetext
    $ sudo -u postgres psql

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

    Code Block
    themeEmacs
    languagetext
    postgres=# \password
    Enter new password: admin
    Enter it again: admin

    Create the Kaa database by executing the following command.

    Code Block
    themeEmacs
    languagetext
    CREATE DATABASE kaa;

    Update pg_hba.conf file to allow local connections.

    Code Block
    themeEmacs
    languagetext
    sudo nano /var/lib/pgsql/9.4/data/pg_hba.conf
    remove lines:
    local   all             all                                     ident
    host    all             all             127.0.0.1/32            ident
    add lines:
    local   all             all                                     trust
    host    all             all             127.0.0.1/32            trust

    Restart the database.

    Code Block
    themeEmacs
    languagetext
    sudo service postgresql-9.4 restart
    Stopping postgresql-9.4 service:                           [  OK  ]
    Starting postgresql-9.4 service:                           [  OK  ]
  4. Install Zookeeper 3.4.7.

    Download and extract Zookeeper packages.

    Code Block
    themeEmacs
    languagetext
    $ cd /opt
    $ sudo wget http://www.eu.apache.org/dist/zookeeper/zookeeper-3.4.7/zookeeper-3.4.7.tar.gz
    $ sudo tar zxvf zookeeper-3.4.7.tar.gz
    $ sudo cp zookeeper-3.4.7/conf/zoo_sample.cfg zookeeper-3.4.7/conf/zoo.cfg

    Create a data directory.

    Code Block
    themeEmacs
    languagetext
    $ sudo mkdir /var/zookeeper

    Edit dataDir property in zookeeper configuration file.

    Code Block
    themeEmacs
    languagetext
    $ sudo nano /opt/zookeeper-3.4.7/conf/zoo.cfg

    Install the supervisor utility.

    Code Block
    themeEmacs
    languagetext
    $ sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    $ yum install supervisor

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

    Code Block
    themeEmacs
    languagetext
    $ sudo nano /etc/supervisord.conf
    [program:zookeeper]
    command=/opt/zookeeper-3.4.7/bin/zkServer.sh start-foreground
    autostart=true
    autorestart=true
    startsecs=1
    startretries=999
    redirect_stderr=false
    stdout_logfile=/var/log/zookeeper-out
    stdout_logfile_maxbytes=10MB
    stdout_logfile_backups=10
    stdout_events_enabled=true
    stderr_logfile=/var/log/zookeeper-err
    stderr_logfile_maxbytes=100MB
    stderr_logfile_backups=10
    stderr_events_enabled=true

    Configure the database to start automatically when OS starts.

    Code Block
    themeEmacs
    languagetext
    $ sudo chkconfig supervisord on

    Start Zookeeper.

    Code Block
    themeEmacs
    languagetext
    $ sudo service supervisord start
    Starting supervisord:                                      [  OK  ]

    Check Zookeeper status.

    Code Block
    themeEmacs
    languagetext
    $ sudo supervisorctl
    zookeeper RUNNING pid 24765, uptime 0:00:06

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

    Code Block
    $ netstat -ntlp | grep 2181
    tcp        0      0 :::2181                     :::*                        LISTEN      2132/java
  5. Install MongoDB 2.6 (Optional, you may install Cassandra 3.5 instead) (source).

    Add the MongoDB yum repository.

    Code Block
    themeEmacs
    languagetext
    $ sudo nano /etc/yum.repos.d/mongodb.repo
    [mongodb]
    name=MongoDB Repository
    baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
    gpgcheck=0
    enabled=1

    Install MongoDB.

    Code Block
    themeEmacs
    languagetext
    $ sudo yum install -y mongodb-org

    Start MongoDB.

    Code Block
    themeEmacs
    languagetext
    $ sudo service mongod startStarting mongod: [ OK ]

    Verify that MongoDB has started successfully.

    Code Block
    themeEmacs
    languagetext
    $ cat /var/log/mongodb/mongod.log | grep "waiting for connections on port"
    2015-09-23T16:39:35.455+0300 [initandlisten] waiting for connections on port 27017

    Configure database to start automatically when OS starts.

    Code Block
    themeEmacs
    languagetext
    $ sudo chkconfig mongod on
  6. Install Cassandra 3.5 (Optional, you may install MongoDB 2.6 instead) (source).

    Add the DataStax Community yum repository.

    Code Block
    themeEmacs
    languagetext
    $ sudo nano /etc/yum.repos.d/datastax.repo
    [datastax-ddc] 
    name = DataStax Repo for Apache Cassandra
    baseurl = http://rpm.datastax.com/datastax-ddc/3.5
    enabled = 1
    gpgcheck = 0

    Install Java Native Access (JNA).

    Code Block
    themeEmacs
    languagetext
    $ sudo yum install jna

    Install Cassandra.

    Code Block
    themeEmacs
    languagetext
    $ sudo yum install datastax-ddc

     Export java variables.

    Code Block
    themeEmacs
    languagetext
    $ export JAVA_HOME=/usr/java/jdk1.8.0_60/
    $ export PATH=$PATH:/usr/java/jdk1.8.0_60/bin/

     Start Cassandra.

    Code Block
    themeEmacs
    languagetext
    $ service cassandra start

    Configure the database to start automatically when OS starts.

    Code Block
    themeEmacs
    languagetext
    $ sudo chkconfig cassandra on

    Check cassandra cql shell.

    Code Block
    themeEmacs
    languagetext
    $ cqlsh
    Connected to Test Cluster at 127.0.0.1:9042.
    [cqlsh 5.0.1 | Cassandra 3.5 | CQL spec 3.4.0 | Native protocol v4]
    Use HELP for help.
    cqlsh> 

 

 

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.

 

AUI Tabs Container
titleInstallation steps
directionhorizontal
AUI Tabs Page
iddeb
titleUbuntu 16.04

 

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

    Code Block
    languagetext
    $ tar -xvf kaa-deb-*.tar.gz
    
  3. Install the Node service by executing the following command.

    Code Block
    languagetext
    $ sudo dpkg -i kaa-node.deb
AUI Tabs Page
iddeb
titleUbuntu 14.04

 

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

    Code Block
    languagetext
    $ tar -xvf kaa-deb-*.tar.gz
    
  3. Install the Node service by executing the following command.

    Code Block
    languagetext
    $ sudo dpkg -i kaa-node.deb
AUI Tabs Page
idrpm
titleCentOS 6.7

 

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

    Code Block
    languagetext
    $ tar -xvf kaa-rpm-*.tar.gz
    
  3. Install the Node service by executing the following command.

    Code Block
    languagetext
    $ sudo rpm -i kaa-node.rpm

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.

Info
titleHTTP 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:

Code Block
titleLog file example
...
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.postgresql.Driver'
...
Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver
...

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:

Code Block
languagebash
$ sudo service kaa-node restart
AUI Tabs Container
directionhorizontal
AUI Tabs Page
titleMariaDB

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

Code Block
languagetext
$ cat /etc/kaa-node/conf/admin-dao.properties | grep jdbc_username
jdbc_username=sqladmin
$ cat /etc/kaa-node/conf/admin-dao.properties | grep jdbc_password
jdbc_password=admin
$ cat /etc/kaa-node/conf/sql-dao.properties | grep jdbc_username
jdbc_username=sqladmin
$ cat /etc/kaa-node/conf/sql-dao.properties | grep jdbc_password
jdbc_password=admin
AUI Tabs Page
titlePostgreSQL

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

Code Block
languagetext
$ cat /etc/kaa-node/conf/admin-dao.properties | grep jdbc_password
jdbc_password=admin
$ cat /etc/kaa-node/conf/sql-dao.properties | grep jdbc_password
jdbc_password=admin

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

Code Block
languagetext
$ sudo nano /etc/kaa-node/conf/admin-dao.properties
$ sudo nano /etc/kaa-node/conf/sql-dao.properties

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

AUI Tabs Container
directionhorizontal
AUI Tabs Page
titleMariaDB
AUI Tabs Container
directionhorizontal
AUI Tabs Page
titlesql-dao.properties
Code Block
languagetext
# Database name
db_name=kaa

# Specific configurations for DAO layer
# Max wait time in seconds for history dao class. Custom property for Kaa History Service.
dao_max_wait_time=5

# specify hibernate sql dialect for mariaDB
hibernate_dialect=org.hibernate.dialect.MySQL5InnoDBDialect

# specify if hibernate will format sql request
hibernate_format_sql=false

# specify if show hibernate sql request
hibernate_show_sql=false

# specify hibernate hbm2ddl strategy
hibernate_hbm2ddl_auto=update

# specify jdbc mariaDB driver class
jdbc_driver_className=org.mariadb.jdbc.Driver

# specify jdbc database user name
jdbc_username=sqladmin

# specify jdbc mariaDB database password root
jdbc_password=admin

# specify jdbc database hosts and ports
jdbc_host_port=localhost:3306

# specify jdbc database provider name
sql_provider_name=mysql:failover
AUI Tabs Page
titleadmin-dao.properties
Code Block
languagetext
# specify hibernate sql dialect
hibernate_dialect=org.hibernate.dialect.MySQL5InnoDBDialect

# specify if hibernate will format sql request
hibernate_format_sql=false

# specify if show hibernate sql request
hibernate_show_sql=false

# specify hibernate hbm2ddl strategy
hibernate_hbm2ddl_auto=update

# specify jdbc driver class
jdbc_driver_className=org.mariadb.jdbc.Driver

# specify jdbc database user name
jdbc_username=sqladmin

# specify jdbc database password
jdbc_password=admin

# specify jdbc database url
jdbc_url=jdbc:mysql:failover://localhost:3306/kaa
AUI Tabs Page
titlePostgreSQL
AUI Tabs Container
directionhorizontal
AUI Tabs Page
titlesql-dao.properties
Code Block
languagetext
# Database name
db_name=kaa

# Specific configurations for DAO layer
# Max wait time in seconds for history dao class. Custom property for Kaa History Service.
dao_max_wait_time=5

# specify hibernate sql dialect
hibernate_dialect=org.hibernate.dialect.PostgreSQL82Dialect

# specify if hibernate will format sql request
hibernate_format_sql=false

# specify if show hibernate sql request
hibernate_show_sql=false

# specify hibernate hbm2ddl strategy
hibernate_hbm2ddl_auto=update

# specify jdbc driver class
jdbc_driver_className=org.postgresql.Driver

# specify jdbc database user name
jdbc_username=postgres

# specify jdbc database password
jdbc_password=admin

# specify jdbc database host
jdbc_host_port=localhost:5432

# specify jdbc database provider name
sql_provider_name=postgresql
AUI Tabs Page
titleadmin-dao.properties
Code Block
languagetext
# specify hibernate sql dialect
hibernate_dialect=org.hibernate.dialect.PostgreSQL82Dialect

# specify if hibernate will format sql request
hibernate_format_sql=false

# specify if show hibernate sql request
hibernate_show_sql=false

# specify hibernate hbm2ddl strategy
hibernate_hbm2ddl_auto=update

# specify jdbc driver class
jdbc_driver_className=org.postgresql.Driver

# specify jdbc database user name
jdbc_username=postgres

# specify jdbc database password
jdbc_password=admin

# specify jdbc database url
jdbc_url=jdbc:postgresql://localhost:5432/kaa

 

 

NoSQL database configuration

 

Check that a NoSQL database name matches your choice.
Code Block
languagetext
$ cat /etc/kaa-node/conf/nosql-dao.properties | grep nosql_db_provider_name
nosql_db_provider_name=mongodb

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

Code Block
languagetext
$ sudo cqlsh -f /etc/kaa-node/conf/cassandra.cql
$ sudo nano /etc/kaa-node/conf/nosql-dao.properties
nosql_db_provider_name=cassandra

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.

Code Block
languagetext
$ sudo nano /etc/kaa-node/conf/kaa-node.properties
transport_public_interface=localhost=YOUR_PUBLIC_INTERFACE

Firewall rules configuration

AUI Tabs Container
directionhorizontal
AUI Tabs Page
titleUbuntu 16.04

 

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

Code Block
languagetext
$ sudo iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9888 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9889 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9997 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9999 -j ACCEPT
$ sudo apt-get install iptables-persistent
$ sudo service netfilter-persistent start
$ sudo netfilter-persistent save
AUI Tabs Page
titleUbuntu 14.04

 

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

Code Block
languagetext
$ sudo iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9888 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9889 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9997 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9999 -j ACCEPT
$ sudo apt-get install iptables-persistent
$ sudo service iptables-persistent start
$ sudo service iptables-persistent save
AUI Tabs Page
titleCentOS 6.7

 

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

Code Block
languagetext
$ sudo iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9888 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9889 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9997 -j ACCEPT
$ sudo iptables -I INPUT -p tcp -m tcp --dport 9999 -j ACCEPT
$ sudo service iptables save

Startup steps

Start Kaa service.

Code Block
languagetext
$ sudo service kaa-node start 

Check logs after the startup.

Code Block
languagetext
$ cd /var/log/kaa
$ cat * | grep ERROR

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.

...