Introduction

Kaa sources come with the Docker image starting from version 0.9.0. This image helps you with fast deployment of the Kaa clusters.

The Kaa Docker image is placed under the /server/containers folder in the Kaa repository.

The default environments that come in this package are:

  • Fully functional Kaa cluster

    • Kaa node
    • Zookeeper node
    • PostgreSQL node
    • Cassandra node
    • MongoDB node
  • Single Kaa node, which can be deployed to an existing cluster

The base image configuration is done using the following environment variables:

Variable name

Sample values

Description

CONTROL_ENABLED

true/false

Determines whether control server enabled on this node or not

BOOTSTRAP_ENABLED

true/false

Determines whether bootstrap server enabled on this node or not

OPERATIONS_ENABLED

true/false

Determines whether operations server enabled on this node or not

DATABASE

cassandra/mongodb

Determines whether Cassandra or MongoDB provider will be used

ZK_HOSTS

localhost:2181, anotherhost:2181

Comma-separated list of Zookeeper nodes hostname:port

CASSANDRA_HOSTS

localhost:9042, ...

Comma-separated list of Cassandra nodes hostname:port

MONGODB_HOSTS

localhost:27017, ...

Comma-separated list of MongoDB nodes hostname:port

JDBC_HOST

localhost

PostgreSQL database hostname

JDBC_PORT

5432

PostgreSQL database port

Steps to deploy

  1. Download the Kaa debian package from http://www.kaaproject.org/download-kaa/ and place it under the node/ folder.
  2. Execute the following command from the node/ folder:

    $ docker build --build-arg setupfile=<KAA_DEBIAN_PACKAGE_LOCATION> -t kaaproject/node:0.9.0 .

     An example of <KAA_DEBIAN_PACKAGE_LOCATION> is ./kaa-node.deb 

  3. Return to the docker/ folder and run:

    $ docker-compose -f docker-compose-cluster-1-node.yaml up -d

     

  4. If you want deploy a single node to an external cluster, edit the docker-compose-1-node.yaml file (set correct service hostnames) and run:

    $ docker-compose -f docker-compose-1-node.yaml up -d
  5. Execute the following command to get into the running container:

    $ docker exec -i -t docker_kaa_node_1 bash

Copyright © 2014-2016, CyberVision, Inc.