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.

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

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

    $ javac -version

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

    javac 1.8.0_91
  3. Install MariaDB 5.5.
    Install the python-software-properties package:

    $ sudo apt-get install python-software-properties

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

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

    After that we add repository:

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

    Install MariaDB with Galera Patches:

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

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

    $ 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:

    $ sudo apt-get install rsync

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

    $ sudo netstat -ntlp | grep 3306

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

    $ mysql -u root -p

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

    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:

    CREATE DATABASE kaa;

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

    Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

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

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

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

    $ sudo -u postgres psql

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

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

    Create the Kaa database by executing the following command.

    CREATE DATABASE kaa;
  4. Install Zookeeper 3.4.5.

    $ sudo apt-get install zookeeperd

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

    $ 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:

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

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

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

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

    Before start edit file:

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

    $ sudo systemctl start mongodb

    Verify that MongoDB has started successfully.

    $ 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:

    $ 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:

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

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

    $ sudo netstat -ntlp | grep 9042

    Install Java Native Access (JNA).

    $ sudo apt-get install libjna-java

    Check cassandra cql shell.

    $ 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>

 

  1. Install common utils.

    Download and install wget, ca-certificates, curl.

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

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

    $ javac -version

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

    javac 1.8.0_66
  3. Install MariaDB 5.5.
    Install the python-software-properties package:

    $ sudo apt-get install python-software-properties

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

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

    After that we add repository:

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

    Install MariaDB with Galera Patches:

    $ 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:

    $ sudo apt-get install rsync

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

    $ sudo netstat -ntlp | grep 3306

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

    $ mysql -u root -p
    

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

    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:

    CREATE DATABASE kaa;

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

    Install PostgreSQL 9.4.
    Add official PostgreSQL repository.

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

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

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

    $ sudo -u postgres psql

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

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

    Create the Kaa database by executing the following command.

    CREATE DATABASE kaa;
  4. Install Zookeeper 3.4.5.

    $ sudo apt-get install zookeeperd

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

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

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

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

    $ sudo service mongod start

    Verify that MongoDB has started successfully.

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

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

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

    $ sudo netstat -ntlp | grep 9042

    Install Java Native Access (JNA).

    $ sudo apt-get install libjna-java

    Check cassandra cql shell.

    $ 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>

 

  1. Install common utils.

    Download and install wget, nc, gzip.

    $ sudo yum install wget nc gzip
  2. Install Oracle JDK 8.

    Download and install JDK rpm.

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

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

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

    $ sudo nano /etc/yum.repos.d/CentOS-Base.repo

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

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

    $ sudo yum list postgres*
    $ sudo yum install postgresql94-server

    Initialize the PostgreSQL database.

    $ sudo service postgresql-9.4 initdb
    Initializing database:                                     [  OK  ]

    Configure the database to start automatically when OS starts.

    $ sudo chkconfig postgresql-9.4 on

    Start the database.

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

    $ sudo -u postgres psql

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

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

    Create the Kaa database by executing the following command.

    CREATE DATABASE kaa;

    Update pg_hba.conf file to allow local connections.

    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.

    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.

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

    $ sudo mkdir /var/zookeeper

    Edit dataDir property in zookeeper configuration file.

    $ sudo nano /opt/zookeeper-3.4.7/conf/zoo.cfg

    Install the supervisor utility.

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

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

    $ sudo chkconfig supervisord on

    Start Zookeeper.

    $ sudo service supervisord start
    Starting supervisord:                                      [  OK  ]

    Check Zookeeper status.

    $ sudo supervisorctl
    zookeeper RUNNING pid 24765, uptime 0:00:06

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

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

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

    $ sudo yum install -y mongodb-org

    Start MongoDB.

    $ sudo service mongod startStarting mongod: [ OK ]

    Verify that MongoDB has started successfully.

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

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

    Add the DataStax Community yum repository.

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

    $ sudo yum install jna

    Install Cassandra.

    $ sudo yum install datastax-ddc

     Export java variables.

    $ export JAVA_HOME=/usr/java/jdk1.8.0_60/
    $ export PATH=$PATH:/usr/java/jdk1.8.0_60/bin/

     Start Cassandra.

    $ service cassandra start

    Configure the database to start automatically when OS starts.

    $ sudo chkconfig cassandra on

    Check cassandra cql shell.

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

 

 

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

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

    $ sudo dpkg -i kaa-node.deb

 

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

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

    $ sudo dpkg -i kaa-node.deb

 

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

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

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

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:

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

$ sudo service kaa-node restart

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

$ 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

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

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

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

# 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
# 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
# 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
# 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.
$ 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.

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

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

Firewall rules configuration

 

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

$ 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

 

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

$ 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

 

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

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

$ sudo service kaa-node start 

Check logs after the startup.

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

G
M
T

 

           

 

Звукова функція обмежена 100 символами
Опції : Історія : Довідка : Зворотний зв'язокЗакрити