├── .gitignore ├── 0.9 ├── Dockerfile ├── build.sh ├── examples │ ├── using-compose │ │ ├── kaa-example.env │ │ ├── mariadb-mongodb │ │ │ ├── destroy-kaa.sh │ │ │ ├── docker-compose.yml │ │ │ ├── launch-kaa.sh │ │ │ ├── mariadb-example.env │ │ │ ├── view-errors.sh │ │ │ └── view-kaa-node-logs.sh │ │ └── postgresql-mongodb │ │ │ ├── destroy-kaa.sh │ │ │ ├── docker-compose.yml │ │ │ ├── launch-kaa.sh │ │ │ ├── postgres-example.env │ │ │ ├── view-errors.sh │ │ │ └── view-kaa-node-logs.sh │ └── without-compose │ │ ├── docker-run-kaa-0.9.sh │ │ ├── example-env.dockerenv │ │ ├── view-errors.sh │ │ └── view-kaa-node-logs.sh ├── install │ └── conf │ │ ├── admin-dao.properties.template │ │ ├── common-dao-cassandra.properties.template │ │ ├── common-dao-mongodb.properties.template │ │ ├── kaa-node.properties.template │ │ ├── logback.xml │ │ ├── logging.properties │ │ ├── mariadb-dao.properties.template │ │ ├── nosql-dao.properties.template │ │ ├── postgresql-dao.properties.template │ │ └── sql-dao.properties.template └── kaa │ ├── cat-error.sh │ ├── configure-kaa.sh │ ├── docker-entry.sh │ └── tail-node.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.deb 2 | -------------------------------------------------------------------------------- /0.9/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Christopher Burroughs 3 | ENV DEBIAN_FRONTEND noninteractive 4 | 5 | RUN apt-get update && apt-get -yqq install \ 6 | software-properties-common \ 7 | python-software-properties \ 8 | ca-certificates \ 9 | netcat \ 10 | && apt-get clean \ 11 | && rm -rf /var/lib/apt/lists/* 12 | 13 | ## ORACLE JAVA 8 (auto-accept license) 14 | RUN \ 15 | echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \ 16 | && echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections \ 17 | && add-apt-repository ppa:webupd8team/java -y \ 18 | && apt-get update \ 19 | && apt-get -yqq install \ 20 | oracle-java8-installer \ 21 | && apt-get purge -y \ 22 | software-properties-common \ 23 | python-software-properties \ 24 | && apt-get clean \ 25 | && rm -rf /var/lib/apt/lists/* \ 26 | && rm -rf /var/cache/oracle-jdk8-installer 27 | 28 | ENV JAVA_HOME /usr/lib/jvm/java-8-oracle 29 | 30 | # Copy compiled/downloaded Kaa .DEB file and install 31 | ARG setupfile 32 | COPY ["$setupfile", "/install/kaa-node.deb"] 33 | RUN dpkg -i /install/kaa-node.deb \ 34 | && rm -R /install/deb/ \ 35 | && apt-get autoremove -y && apt-get clean 36 | 37 | # PostgreSQL driver 38 | ADD http://central.maven.org/maven2/org/postgresql/postgresql/9.4.1208/postgresql-9.4.1208.jar /usr/lib/kaa-node/lib/postgresql.jar 39 | RUN chmod 755 /usr/lib/kaa-node/lib/postgresql.jar 40 | 41 | RUN touch /var/log/kaa/kaa-node.log \ 42 | && chown kaa:kaa /var/log/kaa/kaa-node.log 43 | 44 | # Kaa service & convenience shell scripts 45 | COPY kaa/ /kaa 46 | 47 | # Kaa config template files 48 | COPY install/conf/ /usr/lib/kaa-node/conf/ 49 | 50 | EXPOSE 8080 9888 9889 9997 9999 51 | VOLUME ["/var/log/kaa", "/usr/lib/kaa-node/conf"] 52 | 53 | # Make kaa sudoer 54 | RUN echo 'kaa ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers 55 | 56 | ENTRYPOINT ["/kaa/docker-entry.sh"] -------------------------------------------------------------------------------- /0.9/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker build --build-arg setupfile=install/kaa-node.deb -t cburr25/kaa:0.9.0 . 4 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/kaa-example.env: -------------------------------------------------------------------------------- 1 | JDBC_HOST=sql 2 | JDBC_USERNAME=jdbcuser 3 | JDBC_PASSWORD=jdbcpw 4 | MONGODB_NODE_LIST=nosql:27017 5 | ZOOKEEPER_NODE_LIST=zookeeper:2181 6 | TRANSPORT_PUBLIC_INTERFACE=localhost 7 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/mariadb-mongodb/destroy-kaa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot down && \ 4 | docker volume rm kaaiot_sql-data kaaiot_nosql-data kaaiot_zookeeper-data 5 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/mariadb-mongodb/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Run Kaa IoT using MariaDB and MongoDB 2 | 3 | version: '2' 4 | services: 5 | sql: 6 | image: mariadb:5.5 7 | networks: 8 | - back-tier 9 | volumes: 10 | - sql-data:/var/lib/mysql 11 | env_file: mariadb-example.env 12 | zookeeper: 13 | image: jplock/zookeeper:3.4.8 14 | networks: 15 | - back-tier 16 | volumes: 17 | - zookeeper-data:/tmp/zookeeper 18 | nosql: 19 | image: mongo:3.2 20 | networks: 21 | - back-tier 22 | volumes: 23 | - nosql-data:/data/db 24 | kaa: 25 | image: cburr25/kaa:0.9.0 26 | # build: . 27 | env_file: ../kaa-example.env 28 | environment: 29 | - SQL_PROVIDER_NAME=mariadb 30 | - NOSQL_PROVIDER_NAME=mongodb # (optional, default: mongodb) 31 | - SERVICES_WAIT_TIMEOUT=-1 # Wait forever for Zookeeper and SQL 32 | depends_on: 33 | - sql 34 | - nosql 35 | - zookeeper 36 | networks: 37 | - back-tier 38 | - front-tier 39 | ports: 40 | - "8080:8080" 41 | - "9888:9888" 42 | - "9889:9889" 43 | - "9997:9997" 44 | - "9999:9999" 45 | networks: 46 | back-tier: 47 | driver: bridge # overlay for Swarm (unreleased update) 48 | front-tier: 49 | driver: bridge # overlay for Swarm (unreleased update) 50 | volumes: 51 | sql-data: 52 | nosql-data: 53 | zookeeper-data: 54 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/mariadb-mongodb/launch-kaa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot up -------------------------------------------------------------------------------- /0.9/examples/using-compose/mariadb-mongodb/mariadb-example.env: -------------------------------------------------------------------------------- 1 | MYSQL_USER=jdbcuser 2 | MYSQL_PASSWORD=jdbcpw 3 | MYSQL_DATABASE=kaa 4 | MYSQL_ROOT_PASSWORD=jdbcrootpw -------------------------------------------------------------------------------- /0.9/examples/using-compose/mariadb-mongodb/view-errors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot exec kaa cat /var/log/kaa/* | grep ERROR 4 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/mariadb-mongodb/view-kaa-node-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot exec kaa sh /kaa/tail-node.sh 4 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/postgresql-mongodb/destroy-kaa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot down && \ 4 | docker volume rm kaaiot_sql-data kaaiot_nosql-data kaaiot_zookeeper-data 5 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/postgresql-mongodb/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Run Kaa IoT using PostgreSQL and MongoDB 2 | 3 | # Note: you may ignore the Postgres error resembling: "ERROR: constraint "...." of relation "...." does not exist" 4 | 5 | version: '2' 6 | services: 7 | sql: 8 | image: postgres:9.4 9 | networks: 10 | - back-tier 11 | volumes: 12 | - sql-data:/var/lib/postgresql/data/kaa-pgdata 13 | env_file: postgres-example.env 14 | environment: 15 | - PGDATA=/var/lib/postgresql/data/kaa-pgdata # Fixes FS volume issues 16 | zookeeper: 17 | image: jplock/zookeeper:3.4.8 18 | networks: 19 | - back-tier 20 | volumes: 21 | - zookeeper-data:/tmp/zookeeper 22 | nosql: 23 | image: mongo:3.2 24 | networks: 25 | - back-tier 26 | volumes: 27 | - nosql-data:/data/db 28 | kaa: 29 | image: cburr25/kaa:0.9.0 30 | # build: . 31 | env_file: ../kaa-example.env 32 | environment: 33 | - SQL_PROVIDER_NAME=postgresql 34 | - SERVICES_WAIT_TIMEOUT=-1 # Wait forever for Zookeeper and SQL 35 | depends_on: 36 | - sql 37 | - nosql 38 | - zookeeper 39 | networks: 40 | - back-tier 41 | - front-tier 42 | ports: 43 | - "8080:8080" 44 | - "9888:9888" 45 | - "9889:9889" 46 | - "9997:9997" 47 | - "9999:9999" 48 | networks: 49 | back-tier: 50 | driver: bridge # overlay for Swarm (unreleased update) 51 | front-tier: 52 | driver: bridge # overlay for Swarm (unreleased update) 53 | volumes: 54 | sql-data: 55 | nosql-data: 56 | zookeeper-data: 57 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/postgresql-mongodb/launch-kaa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot up -------------------------------------------------------------------------------- /0.9/examples/using-compose/postgresql-mongodb/postgres-example.env: -------------------------------------------------------------------------------- 1 | POSTGRES_USER=jdbcuser 2 | POSTGRES_PASSWORD=jdbcpw 3 | POSTGRES_DB=kaa 4 | LC_ALL=C.UTF-8 -------------------------------------------------------------------------------- /0.9/examples/using-compose/postgresql-mongodb/view-errors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot exec kaa cat /var/log/kaa/* | grep ERROR 4 | -------------------------------------------------------------------------------- /0.9/examples/using-compose/postgresql-mongodb/view-kaa-node-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker-compose -p kaaiot exec kaa sh /kaa/tail-node.sh 4 | -------------------------------------------------------------------------------- /0.9/examples/without-compose/docker-run-kaa-0.9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ! -> A newer, better example using docker-compose can be found under examples/using-compose/ 4 | # ! -> You must link containers yourself for this example! 5 | 6 | # Suggestion to run: 7 | # - Link containers using Docker network (recommended) 8 | # - Link containers using --link (deprecated) 9 | 10 | # Dependencies: 11 | # - Zookeeper 3.4.8 12 | # - MongoDB 3.2.6 OR Cassandra 2.2.5 13 | # - MariaDB 5.5 OR PostgreSQL 9.4 14 | 15 | docker run \ 16 | -d \ 17 | --name kaa \ 18 | --net=kaa \ 19 | --env-file example-env.dockerenv \ 20 | -p 8080:8080 \ 21 | -p 9888:9888 \ 22 | -p 9889:9889 \ 23 | -p 9997:9997 \ 24 | -p 9997:9997 \ 25 | cburr25/kaa:0.9.0 26 | 27 | # To view logs: 28 | # $ docker logs kaa 29 | -------------------------------------------------------------------------------- /0.9/examples/without-compose/example-env.dockerenv: -------------------------------------------------------------------------------- 1 | # Example environment file for Kaa docker image 2 | # If nothing is specified, all settings revert to Kaa defaults 3 | 4 | # In this example, linked containers are used to specify hosts 5 | 6 | JDBC_HOST=mariadb 7 | JDBC_PORT=3306 8 | JDBC_USERNAME=YOURJDBCUSERNAME 9 | JDBC_PASSWORD=YOURJDBCPASSWORD 10 | 11 | MONGODB_NODE_LIST=mongo:27017 12 | ZOOKEEPER_HOST=zookeeper 13 | 14 | # "localhost" if not specified 15 | #TRANSPORT_PUBLIC_INTERFACE=YOURPUBLICINTERFACE 16 | -------------------------------------------------------------------------------- /0.9/examples/without-compose/view-errors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker exec kaa cat /var/log/kaa/* | grep ERROR -------------------------------------------------------------------------------- /0.9/examples/without-compose/view-kaa-node-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker exec kaa sh /kaa/tail-node.sh -------------------------------------------------------------------------------- /0.9/install/conf/admin-dao.properties.template: -------------------------------------------------------------------------------- 1 | # specify hibernate sql dialect 2 | hibernate_dialect={{HIBERNATE_DIALECT}} 3 | 4 | # specify if hibernate will format sql request 5 | hibernate_format_sql=false 6 | 7 | # specify if show hibernate sql request 8 | hibernate_show_sql=false 9 | 10 | # specify hibernate hbm2ddl strategy 11 | hibernate_hbm2ddl_auto=update 12 | 13 | # specify jdbc driver class 14 | jdbc_driver_className={{JDBC_DRIVER_CLASSNAME}} 15 | 16 | # specify jdbc database user name 17 | jdbc_username={{JDBC_USERNAME}} 18 | 19 | # specify jdbc database password 20 | jdbc_password={{JDBC_PASSWORD}} 21 | 22 | # specify jdbc database url 23 | jdbc_url={{JDBC_URL}} -------------------------------------------------------------------------------- /0.9/install/conf/common-dao-cassandra.properties.template: -------------------------------------------------------------------------------- 1 | # Specify cassandra cluster name 2 | cluster_name={{CASSANDRA_CLUSTER_NAME}} 3 | 4 | # Specify keyspace name 5 | keyspace_name={{CASSANDRA_KEYSPACE_NAME}} 6 | 7 | # Specify node list 8 | node_list={{CASSANDRA_NODE_LIST}} 9 | 10 | # Use ssl connection 11 | use_ssl={{CASSANDRA_USE_SSL}} 12 | 13 | # Use jmx monitoring 14 | use_jmx={{CASSANDRA_USE_JMX}} 15 | 16 | # NONE SNAPPY LZ4 17 | compression=none 18 | 19 | # Disables metrics collection for the created cluster (metrics are enabled by default otherwise). 20 | disable_metrics=false 21 | 22 | ### Credential parameters ### 23 | 24 | use_credentials={{CASSANDRA_USE_CREDENTIALS}} 25 | 26 | # Specify your username 27 | username={{CASSANDRA_USERNAME}} 28 | 29 | # Specify your password 30 | password={{CASSANDRA_PASSWORD}} 31 | 32 | ### Cassandra client socket parameters ### 33 | 34 | # Connection time out in milliseconds 35 | socket_connect_timeout=5000 36 | 37 | # Read socket timeout in milliseconds 38 | socket_read_timeout=12000 39 | 40 | # Use keep alive for client connection 41 | socket_keep_alive=true 42 | 43 | # Reuse address 44 | socket_reuse_address=true 45 | 46 | # The value of this socket option is an Integer that controls the action taken when unsent data is queued on the socket and a method to close the socket is invoked 47 | socket_so_linger= 48 | 49 | # Use tcp socket no delay flag 50 | socket_tcp_no_delay=false 51 | 52 | # Specify receive buffer size 53 | socket_receive_buffer_size= 54 | 55 | # Specify send buffer size 56 | socket_send_buffer_size= 57 | 58 | ### Cassandra client query parameters ### 59 | 60 | # Specify consistency level for client requests. Example ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, SERIAL, LOCAL_SERIAL, LOCAL_ONE 61 | query_consistency_level=ONE 62 | 63 | # Specify max fetch size for query result 64 | query_default_fetch_size=2000 65 | 66 | # Specify batch type for cassandra request. Only two types LOGGED, UNLOGGED 67 | batch_type=LOGGED 68 | 69 | # Specify consistency level for read requests. Example ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, SERIAL, LOCAL_SERIAL, LOCAL_ONE 70 | read_consistency_level=ONE 71 | 72 | # Specify consistency level for write requests. Example ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, SERIAL, LOCAL_SERIAL, LOCAL_ONE 73 | write_consistency_level=ONE -------------------------------------------------------------------------------- /0.9/install/conf/common-dao-mongodb.properties.template: -------------------------------------------------------------------------------- 1 | # Mongodb configurations 2 | # list of mongodb nodes, possible to use multiply servers 3 | servers={{MONGODB_NODE_LIST}} 4 | 5 | # mongodb database name 6 | db_name={{MONGODB_DB_NAME}} 7 | 8 | # write concern for mongodb write operations 9 | write_concern={{MONGODB_WRITE_CONCERN}} 10 | 11 | #The number of connections allowed per host (the pool size, per host) 12 | connections_per_host=100 13 | 14 | # The max wait time for a blocking thread for a connection from the pool in ms_ 15 | max_wait_time=120000 16 | 17 | # The connection timeout in milliseconds 18 | connection_timeout=5000 19 | 20 | # The socket timeout_ A timeout of zero is interpreted as an infinite timeout. 21 | socket_timeout=0 22 | 23 | # This controls whether or not to have socket keep alive turned on 24 | socket_keepalive=false 25 | -------------------------------------------------------------------------------- /0.9/install/conf/kaa-node.properties.template: -------------------------------------------------------------------------------- 1 | # Enabled Servers configuration 2 | 3 | # Specifies if Control Server is enabled. 4 | control_server_enabled={{CONTROL_SERVER_ENABLED}} 5 | 6 | # Specifies if Bootstrap Server is enabled. 7 | bootstrap_server_enabled={{BOOTSTRAP_SERVER_ENABLED}} 8 | 9 | # Specifies if Operations Server is enabled. 10 | operations_server_enabled={{OPERATIONS_SERVER_ENABLED}} 11 | 12 | # Thrift configurations (more information about thrift look at http://thrift.apache.org/) 13 | # The Control Server notifies every Operations/Bootstrap Server on most data updates via a Thrift-based protocol. 14 | 15 | # Thrift server host 16 | thrift_host={{THRIFT_HOST}} 17 | 18 | # Thrift server port 19 | thrift_port={{THRIFT_PORT}} 20 | 21 | # Kaa Admin Web server port 22 | admin_port={{ADMIN_PORT}} 23 | 24 | # Zookeeper service configuration 25 | # Each Kaa cluster node (Kaa server) reports its state to Apache Zookeeper. 26 | # Every node in the deployment can always obtain location of the active Control Server 27 | # and the list of active Bootstrap and Operations Servers. 28 | 29 | # Specifies if need to use zookeeper service. This is property have to be always "true". 30 | # It is possible to change it for development or debug process. 31 | zk_enabled=true 32 | 33 | # Zookeeper service url list. 34 | zk_host_port_list={{ZOOKEEPER_NODE_LIST}} 35 | 36 | # The max retry time in milliseconds. 37 | zk_max_retry_time=3000 38 | 39 | # Time to sleep in milliseconds between searches for work. 40 | zk_sleep_time=1000 41 | 42 | # Specifies if need to throw runtime exception during registration control zookeeper node. 43 | zk_ignore_errors=true 44 | 45 | # Minimum difference between amount of endpoints that need to be present in 46 | # order to trigger rebalancing 47 | loadmgmt_min_diff=10000 48 | 49 | # Maximum redirect probability for new sessions 50 | loadmgmt_max_init_redirect_probability=0.75 51 | 52 | # Maximum redirect probability for existing sessions 53 | loadmgmt_max_session_redirect_probability=0.0 54 | 55 | # Recalculate period in seconds for Operations server load process. 56 | recalculation_period=10 57 | 58 | # Specify hash partitions count for each server node 59 | user_hash_partitions=10 60 | 61 | # Specify the max number of neighbor connections 62 | max_number_neighbor_connections=3 63 | 64 | # Default TTL in seconds for historical information about Operations server load. 65 | ops_server_history_ttl=3600 66 | 67 | 68 | # Handler thread pool executor size 69 | worker_thread_pool=8 70 | 71 | # Bootstrap server keys configurations. 72 | # Each client have to know bootstrap public key to make successful connection to bootstrap server. 73 | 74 | # Path to Bootstrap server private key 75 | bootstrap_keys_private_key_location=keys/bootstrap/private.key 76 | 77 | # Path to Bootstrap server public key 78 | bootstrap_keys_public_key_location=keys/bootstrap/public.key 79 | 80 | # Operations server keys configurations. 81 | 82 | # Path to Operations server private key 83 | operations_keys_private_key_location=keys/operations/private.key 84 | 85 | # Path to Operations server public key 86 | operations_keys_public_key_location=keys/operations/public.key 87 | 88 | # Specify if support unencrypted connection 89 | support_unencrypted_connection={{SUPPORT_UNENCRYPTED_CONNECTION}} 90 | 91 | # Interface that will be used by all transports 92 | transport_bind_interface={{TRANSPORT_BIND_INTERFACE}} 93 | 94 | # Interface that will be reported by all transports 95 | transport_public_interface={{TRANSPORT_PUBLIC_INTERFACE}} 96 | 97 | # Metrics collect enabled 98 | metrics_enabled={{METRICS_ENABLED}} 99 | 100 | # Path to logs root directory 101 | logs_root_dir=/kaa_log_uploads 102 | 103 | # Date pattern for file log appender 104 | date_pattern='.'yyyy-MM-dd-HH-mm 105 | 106 | # Layout pattern for file log appender 107 | layout_pattern=%m%n 108 | 109 | # Path to tmp keys directory 110 | tmp_keys=/home/kaa/tmp_keys 111 | 112 | # Frequency of load status check 113 | load_stats_update_frequency=10000 114 | 115 | # specify additional package to scan kaa plugins configuration 116 | additional_plugins_scan_package= 117 | -------------------------------------------------------------------------------- /0.9/install/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | ${server_log_dir:-./logs}/kaa-node${server_log_sufix}.log 25 | 26 | 27 | ${server_log_dir:-./logs}/kaa-node.log 28 | 29 | 30 | 31 | ${server_log_dir}/kaa-operations-server${server_log_sufix}-%d{yyyy-MM-dd}.%i.log 32 | 33 | 100MB 34 | 35 | 30 36 | 37 | 38 | %d{ISO8601} [%thread] %-5level %logger{36} - %msg%n 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /0.9/install/conf/logging.properties: -------------------------------------------------------------------------------- 1 | handlers = org.slf4j.bridge.SLF4JBridgeHandler 2 | .level=SEVERE -------------------------------------------------------------------------------- /0.9/install/conf/mariadb-dao.properties.template: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 CyberVision, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | # specify hibernate sql dialect 18 | hibernate_dialect=org.hibernate.dialect.MySQL5InnoDBDialect 19 | 20 | # specify if hibernate will format sql request 21 | hibernate_format_sql=false 22 | 23 | # specify if show hibernate sql request 24 | hibernate_show_sql=false 25 | 26 | # specify hibernate hbm2ddl strategy 27 | hibernate_hbm2ddl_auto=update 28 | 29 | # specify jdbc driver class 30 | jdbc_driver_className=org.mariadb.jdbc.Driver 31 | 32 | # specify jdbc database user name 33 | jdbc_username={{JDBC_USERNAME}} 34 | 35 | # specify jdbc database password 36 | jdbc_password={{JDBC_PASSWORD}} 37 | 38 | # specify jdbc database url 39 | jdbc_url={{JDBC_URL}} -------------------------------------------------------------------------------- /0.9/install/conf/nosql-dao.properties.template: -------------------------------------------------------------------------------- 1 | # NoSQL database provider name, autogenerated when mongo-dao or cassandra-dao profile is activated 2 | # Possible options: mongodb, cassandra 3 | nosql_db_provider_name={{NOSQL_PROVIDER_NAME}} -------------------------------------------------------------------------------- /0.9/install/conf/postgresql-dao.properties.template: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 CyberVision, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | # specify hibernate sql dialect 18 | hibernate_dialect=org.hibernate.dialect.PostgreSQL82Dialect 19 | 20 | # specify if hibernate will format sql request 21 | hibernate_format_sql=false 22 | 23 | # specify if show hibernate sql request 24 | hibernate_show_sql=false 25 | 26 | # specify hibernate hbm2ddl strategy 27 | hibernate_hbm2ddl_auto=update 28 | 29 | # specify jdbc driver class 30 | jdbc_driver_className=org.postgresql.Driver 31 | 32 | # specify jdbc database user name 33 | jdbc_username={{JDBC_USERNAME}} 34 | 35 | # specify jdbc database password 36 | jdbc_password={{JDBC_PASSWORD}} 37 | 38 | # specify jdbc database url 39 | jdbc_url={{JDBC_URL}} -------------------------------------------------------------------------------- /0.9/install/conf/sql-dao.properties.template: -------------------------------------------------------------------------------- 1 | # Database name 2 | db_name={{JDBC_DB_NAME}} 3 | 4 | # Specific configurations for DAO layer 5 | # Max wait time in seconds for history dao class. Custom property for Kaa History Service. 6 | dao_max_wait_time=5 7 | 8 | # specify hibernate sql dialect for mariaDB 9 | hibernate_dialect={{HIBERNATE_DIALECT}} 10 | 11 | # specify if hibernate will format sql request 12 | hibernate_format_sql=false 13 | 14 | # specify if show hibernate sql request 15 | hibernate_show_sql=false 16 | 17 | # specify hibernate hbm2ddl strategy 18 | hibernate_hbm2ddl_auto=update 19 | 20 | # specify jdbc mariaDB driver class 21 | jdbc_driver_className={{JDBC_DRIVER_CLASSNAME}} 22 | 23 | # specify jdbc database user name 24 | jdbc_username={{JDBC_USERNAME}} 25 | 26 | # specify jdbc mariaDB database password root 27 | jdbc_password={{JDBC_PASSWORD}} 28 | 29 | # specify jdbc database hosts and ports 30 | jdbc_host_port={{JDBC_HOST}}:{{JDBC_PORT}} 31 | 32 | # specify jdbc database provider name 33 | sql_provider_name={{SQL_PROVIDER_NAME}} -------------------------------------------------------------------------------- /0.9/kaa/cat-error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd /var/log/kaa && cat * | grep ERROR -------------------------------------------------------------------------------- /0.9/kaa/configure-kaa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | ## Kaa Docker configurator 4 | ## - Christopher Burroughs @ xMight Inc. 5 | 6 | # Check if JDBC host:port + DB name are provided, use defaults otherwise 7 | [ -n "$JDBC_HOST" ] || JDBC_HOST="localhost" 8 | [ -n "$JDBC_DB_NAME" ] || JDBC_DB_NAME="kaa" 9 | 10 | # Determine JDBC url and driver 11 | # SQL_PROVIDER_NAME is a mandatory environment variable 12 | [ -n "$SQL_PROVIDER_NAME" ] || SQL_PROVIDER_NAME="mariadb" 13 | if [ $SQL_PROVIDER_NAME = "mariadb" ] 14 | then 15 | 16 | echo -e "Using MariaDB as SQL provider." 17 | SQL_PROVIDER_NAME="mysql:failover" 18 | HIBERNATE_DIALECT="org.hibernate.dialect.MySQL5InnoDBDialect" 19 | JDBC_DRIVER_CLASSNAME="org.mariadb.jdbc.Driver" 20 | [ -n "$JDBC_PORT" ] || JDBC_PORT="3306" 21 | JDBC_URL="jdbc:mysql:failover://${JDBC_HOST}:${JDBC_PORT}/${JDBC_DB_NAME}" 22 | 23 | elif [ $SQL_PROVIDER_NAME = "postgresql" ] 24 | then 25 | 26 | echo -e "Using PostgreSQL as SQL provider." 27 | SQL_PROVIDER_NAME="postgresql" 28 | HIBERNATE_DIALECT="org.hibernate.dialect.PostgreSQL82Dialect" 29 | JDBC_DRIVER_CLASSNAME="org.postgresql.Driver" 30 | [ -n "$JDBC_PORT" ] || JDBC_PORT="5432" 31 | JDBC_URL="jdbc:postgresql://${JDBC_HOST}:${JDBC_PORT}/${JDBC_DB_NAME}" 32 | 33 | else 34 | echo -e "\nIncorrect SQL provider name: '${SQL_PROVIDER_NAME}'\nValid options: 'mariadb' , 'postgresql'\nConfiguration exiting now..." 35 | exit 1 36 | fi 37 | 38 | ## Process configuration templates ## 39 | 40 | # > admin-dao.properties 41 | cat /usr/lib/kaa-node/conf/admin-dao.properties.template | sed \ 42 | -e "s|{{HIBERNATE_DIALECT}}|${HIBERNATE_DIALECT}|g" \ 43 | -e "s|{{JDBC_DRIVER_CLASSNAME}}|${JDBC_DRIVER_CLASSNAME}|g" \ 44 | -e "s|{{JDBC_USERNAME}}|${JDBC_USERNAME:-sqladmin}|g" \ 45 | -e "s|{{JDBC_PASSWORD}}|${JDBC_PASSWORD:-admin}|g" \ 46 | -e "s|{{JDBC_URL}}|${JDBC_URL}|g" \ 47 | > /usr/lib/kaa-node/conf/admin-dao.properties 48 | 49 | # > sql-dao.properties 50 | cat /usr/lib/kaa-node/conf/sql-dao.properties.template | sed \ 51 | -e "s|{{JDBC_DB_NAME}}|${JDBC_DB_NAME}|g" \ 52 | -e "s|{{HIBERNATE_DIALECT}}|${HIBERNATE_DIALECT}|g" \ 53 | -e "s|{{JDBC_DRIVER_CLASSNAME}}|${JDBC_DRIVER_CLASSNAME}|g" \ 54 | -e "s|{{JDBC_USERNAME}}|${JDBC_USERNAME:-sqladmin}|g" \ 55 | -e "s|{{JDBC_PASSWORD}}|${JDBC_PASSWORD:-admin}|g" \ 56 | -e "s|{{JDBC_HOST}}|${JDBC_HOST}|g" \ 57 | -e "s|{{JDBC_PORT}}|${JDBC_PORT}|g" \ 58 | -e "s|{{SQL_PROVIDER_NAME}}|${SQL_PROVIDER_NAME}|g" \ 59 | > /usr/lib/kaa-node/conf/sql-dao.properties 60 | 61 | # > mariadb-dao.properties 62 | cat /usr/lib/kaa-node/conf/mariadb-dao.properties.template | sed \ 63 | -e "s|{{JDBC_USERNAME}}|${JDBC_USERNAME:-sqladmin}|g" \ 64 | -e "s|{{JDBC_PASSWORD}}|${JDBC_PASSWORD:-admin}|g" \ 65 | -e "s|{{JDBC_URL}}|${JDBC_URL}|g" \ 66 | > /usr/lib/kaa-node/conf/mariadb-dao.properties 67 | 68 | # > postgresql-dao.properties 69 | cat /usr/lib/kaa-node/conf/postgresql-dao.properties.template | sed \ 70 | -e "s|{{JDBC_USERNAME}}|${JDBC_USERNAME:-postgres}|g" \ 71 | -e "s|{{JDBC_PASSWORD}}|${JDBC_PASSWORD:-admin}|g" \ 72 | -e "s|{{JDBC_URL}}|${JDBC_URL}|g" \ 73 | > /usr/lib/kaa-node/conf/postgresql-dao.properties 74 | 75 | # > common-dao-cassandra.properties 76 | [ -n "$CASSANDRA_NODE_LIST" ] || CASSANDRA_NODE_LIST="localhost:9042" 77 | cat /usr/lib/kaa-node/conf/common-dao-cassandra.properties.template | sed \ 78 | -e "s|{{CASSANDRA_CLUSTER_NAME}}|${CASSANDRA_CLUSTER_NAME:-Kaa Cluster}|g" \ 79 | -e "s|{{CASSANDRA_KEYSPACE_NAME}}|${CASSANDRA_KEYSPACE_NAME:-kaa}|g" \ 80 | -e "s|{{CASSANDRA_NODE_LIST}}|${CASSANDRA_NODE_LIST}|g" \ 81 | -e "s|{{CASSANDRA_USE_SSL}}|${CASSANDRA_USE_SSL:-false}|g" \ 82 | -e "s|{{CASSANDRA_USE_JMX}}|${CASSANDRA_USE_JMX:-true}|g" \ 83 | -e "s|{{CASSANDRA_USE_CREDENTIALS}}|${CASSANDRA_USE_CREDENTIALS:-false}|g" \ 84 | -e "s|{{CASSANDRA_USERNAME}}|${CASSANDRA_USERNAME:-}|g" \ 85 | -e "s|{{CASSANDRA_PASSWORD}}|${CASSANDRA_PASSWORD:-}|g" \ 86 | > /usr/lib/kaa-node/conf/common-dao-cassandra.properties 87 | 88 | # > common-dao-mongodb.properties 89 | [ -n "$MONGODB_NODE_LIST" ] || MONGODB_NODE_LIST="localhost:27017" 90 | cat /usr/lib/kaa-node/conf/common-dao-mongodb.properties.template | sed \ 91 | -e "s|{{MONGODB_NODE_LIST}}|${MONGODB_NODE_LIST}|g" \ 92 | -e "s|{{MONGODB_DB_NAME}}|${MONGODB_DB_NAME:-kaa}|g" \ 93 | -e "s|{{MONGODB_WRITE_CONCERN}}|${MONGODB_WRITE_CONCERN:-acknowledged}|g" \ 94 | > /usr/lib/kaa-node/conf/common-dao-mongodb.properties 95 | 96 | # > nosql-dao.properties 97 | [ -n "$NOSQL_PROVIDER_NAME" ] || NOSQL_PROVIDER_NAME="mongodb" 98 | # Fail early if invalid provider name 99 | if ! [[ "$NOSQL_PROVIDER_NAME" =~ ^(mongodb|cassandra)$ ]]; 100 | then 101 | echo -e "\nIncorrect NoSQL provider name: '${NOSQL_PROVIDER_NAME}'\nValid options: 'mongodb' , 'cassandra'\nConfiguration exiting now..."; 102 | exit 1 103 | fi 104 | cat /usr/lib/kaa-node/conf/nosql-dao.properties.template | sed \ 105 | -e "s|{{NOSQL_PROVIDER_NAME}}|${NOSQL_PROVIDER_NAME}|g" \ 106 | > /usr/lib/kaa-node/conf/nosql-dao.properties 107 | 108 | # > kaa-node.properties 109 | [ -n "$ZOOKEEPER_NODE_LIST" ] || ZOOKEEPER_NODE_LIST="localhost:2181" 110 | cat /usr/lib/kaa-node/conf/kaa-node.properties.template | sed \ 111 | -e "s|{{CONTROL_SERVER_ENABLED}}|${CONTROL_SERVER_ENABLED:-true}|g" \ 112 | -e "s|{{BOOTSTRAP_SERVER_ENABLED}}|${BOOTSTRAP_SERVER_ENABLED:-true}|g" \ 113 | -e "s|{{OPERATIONS_SERVER_ENABLED}}|${OPERATIONS_SERVER_ENABLED:-true}|g" \ 114 | -e "s|{{THRIFT_HOST}}|${THRIFT_HOST:-localhost}|g" \ 115 | -e "s|{{THRIFT_PORT}}|${THRIFT_PORT:-9090}|g" \ 116 | -e "s|{{ADMIN_PORT}}|${ADMIN_PORT:-8080}|g" \ 117 | -e "s|{{ZOOKEEPER_NODE_LIST}}|${ZOOKEEPER_NODE_LIST}|g" \ 118 | -e "s|{{SUPPORT_UNENCRYPTED_CONNECTION}}|${SUPPORT_UNENCRYPTED_CONNECTION:-true}|g" \ 119 | -e "s|{{TRANSPORT_BIND_INTERFACE}}|${TRANSPORT_BIND_INTERFACE:-0.0.0.0}|g" \ 120 | -e "s|{{TRANSPORT_PUBLIC_INTERFACE}}|${TRANSPORT_PUBLIC_INTERFACE:-localhost}|g" \ 121 | -e "s|{{METRICS_ENABLED}}|${METRICS_ENABLED:-true}|g" \ 122 | > /usr/lib/kaa-node/conf/kaa-node.properties 123 | -------------------------------------------------------------------------------- /0.9/kaa/docker-entry.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | touch /var/log/kaa/kaa-node.log; 4 | 5 | . /kaa/configure-kaa.sh || exit 1; 6 | echo "Kaa configured!" 7 | 8 | # Determine wait time: 9 | # > 0 seconds 10 | # = 0 don't wait 11 | # < 0 wait forever 12 | [[ $SERVICES_WAIT_TIMEOUT == ?(-)+([0-9]) ]] || SERVICES_WAIT_TIMEOUT=-1; 13 | 14 | # Loop through all ZK nodes 15 | # Passes if one node is reachable 16 | isZKReachable() { 17 | OIFS="$IFS" 18 | IFS="," read -r -a ZNODE <<< $ZOOKEEPER_NODE_LIST 19 | for i in "${!ZNODE[@]}" 20 | do 21 | # echo "Reaching node #$i: ${ZNODE[i]}" 22 | HOST=$(echo ${ZNODE[i]} | cut -f1 -d:) 23 | PORT=$(echo ${ZNODE[i]} | cut -f2 -d:) 24 | bash -c "until [[ $(echo ruok | nc -q 2 $HOST $PORT) = imok ]]; do sleep 0.1; done;" >/dev/null 2>/dev/null && return 0; 25 | done 26 | IFS=OIFS; 27 | 28 | # No ZK nodes were reachable 29 | return 1; 30 | } 31 | 32 | # Exit if ZK not reachable after $SERVICE_WAIT_TIMEOUT 33 | waitForZK() { 34 | echo "Waiting for Zookeeper nodes: $ZOOKEEPER_NODE_LIST" 35 | 36 | local I=0 37 | until [ ! $SERVICES_WAIT_TIMEOUT -lt 0 ] && [ $I -gt $SERVICES_WAIT_TIMEOUT ]; do 38 | isZKReachable && echo "Zookeeper is reachable, proceeding..." && return 0; 39 | 40 | sleep 1; 41 | let I=I+1; 42 | done; 43 | 44 | echo "Zookeeper is unreachable, aborting!"; 45 | exit 1; 46 | } 47 | 48 | isSQLReachable() { 49 | bash -c "cat < /dev/null > /dev/tcp/${JDBC_HOST}/${JDBC_PORT}" >/dev/null 2>/dev/null \ 50 | && return 0 \ 51 | || return 1; 52 | } 53 | 54 | # Exit if ZK not reachable after $SERVICE_WAIT_TIMEOUT 55 | waitForSQL() { 56 | echo "Waiting for SQL ($JDBC_HOST:$JDBC_PORT)" 57 | 58 | local I=0 59 | until [ ! $SERVICES_WAIT_TIMEOUT -lt 0 ] && [ $I -gt $SERVICES_WAIT_TIMEOUT ]; do 60 | isSQLReachable && echo "SQL is reachable, proceeding..." && return 0; 61 | 62 | sleep 1; 63 | let I=I+1; 64 | done; 65 | 66 | echo "SQL is unreachable, aborting!"; 67 | exit 1; 68 | } 69 | 70 | # Loop through all Mongo nodes 71 | # Passes if one node is reachable 72 | isMongoReachable() { 73 | OIFS="$IFS" 74 | IFS="," read -r -a MDB_NODES <<< $MONGODB_NODE_LIST 75 | for i in "${!MDB_NODES[@]}" 76 | do 77 | # echo "Reaching node #$i: ${MDB_NODES[i]}" 78 | HOST=$(echo ${MDB_NODES[i]} | cut -f1 -d:) 79 | PORT=$(echo ${MDB_NODES[i]} | cut -f2 -d:) 80 | bash -c "cat < /dev/null > /dev/tcp/$HOST/$PORT" >/dev/null 2>/dev/null && return 0 81 | done 82 | IFS=OIFS; 83 | 84 | # No MongoDB nodes were reachable 85 | return 1; 86 | } 87 | 88 | # Exit if Mongo not reachable after $SERVICE_WAIT_TIMEOUT 89 | waitForMongo() { 90 | echo "Waiting for MongoDB nodes: $MONGODB_NODE_LIST" 91 | 92 | local I=0 93 | until [ ! $SERVICES_WAIT_TIMEOUT -lt 0 ] && [ $I -gt $SERVICES_WAIT_TIMEOUT ]; do 94 | isMongoReachable && echo "MongoDB is reachable, proceeding..." && return 0; 95 | 96 | sleep 1; 97 | let I=I+1; 98 | done; 99 | 100 | echo "MongoDB is unreachable, aborting!"; 101 | exit 1; 102 | } 103 | 104 | if [ $SERVICES_WAIT_TIMEOUT -ne 0 ] 105 | then 106 | # Wait for ZK 107 | waitForZK 108 | # Wait for MariaDB | PostgreSQL 109 | waitForSQL 110 | # Wait for MongoDB | Cassandra 111 | if [[ "$NOSQL_PROVIDER_NAME" = "mongodb" ]]; then waitForMongo; fi; 112 | # else waitForCassandra; fi; # (unreleased) 113 | else 114 | echo "Not waiting for dependent services and immediately starting kaa-node." 115 | fi 116 | 117 | service kaa-node start & 118 | . /kaa/tail-node.sh 119 | 120 | /bin/bash 121 | exit 0; -------------------------------------------------------------------------------- /0.9/kaa/tail-node.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | tail -f /var/log/kaa/kaa-node.log -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ============================================================== 2 | 3 | *Version 0.10 and above:* 4 | 5 | This image is now the official Docker image for Kaa. If you are looking to deploy Kaa 0.10 and above, please visit the Kaa project documentation for Docker deployment: 6 | 7 | http://kaaproject.github.io/kaa/docs/v0.10.0/Administration-guide/System-installation/Docker-deployment/ 8 | 9 | Of course, the Kaa team took my contribution and improved it a lot, it's therefore bound to be better than what I made! Enjoy! 10 | 11 | ============================================================== 12 | 13 | Greetings! Thanks for checking out this repository. You will find here an easy-to-use Docker image to launch a Kaa IoT server in a single command. If you don't already know about Kaa, check out their home page at: http://www.kaaproject.org. 14 | 15 | ![](http://www.kaaproject.org/wp-content/themes/jupiter/images/logo-kaa-with-eyebrows-01.svg?cd593a) 16 | 17 | "Kaa is a feature-rich, open-source IoT middleware platform for rapid development of the Internet of Things solutions, IoT applications, and smart products." 18 | 19 |
20 | 21 | # Why use this image 22 | 23 | While the Kaa sandbox offers great use-case examples, this image will dramatically increase your development and deployment speed! 24 | 25 | - Extremely easy to configure 26 | - Easily switch between MariaDB and PostgreSQL (no Postgres driver bug!) 27 | - Easily switch between MongoDB and Cassandra 28 | - Kaa-node starts only after Zookeeper nodes, SQL and NoSQL containers are ready 29 | 30 | - Cluster deployment will be implemented soon! 31 | 32 | I suggest you first checkout Kaa's official installation guide before using this image: 33 | -> http://docs.kaaproject.org/display/KAA/Installation+guide 34 | 35 | Kaa IoT requires the following dependencies to run: 36 | 37 | - Zookeeper 3.4.5 38 | - MariaDB 5.5 or PostgreSQL 9.4 39 | - MongoDB 3.2.6 or Cassandra 2.2.5 40 | 41 | It is recommended to use the versions specified above. Try later versions at your own risk! 42 | 43 |
44 | 45 | ## Most recent updates: 46 | 47 | - 07/03: MariaDB is default SQL provider. 48 | - 06/16: Added health check for MongoDB 49 | - 06/14: Added health checks for Zookeeper, MariaDB/Postgres 50 | 51 | 52 | ## Quick and easy run 53 | 54 | I have provided two examples runs using docker-compose. Simply run launch-kaa.sh in either: 55 | 56 | Using MariaDB + MongoDB: 57 | - examples/using-compose/mariadb-mongodb/ 58 | 59 | Using PostgreSQL + MongoDB: 60 | - examples/using-compose/postgresql-mongodb/ 61 | 62 | Running a single command, you will easily deploy a single-node Kaa IoT server. Unreleased: easy cluster deployment! 63 | 64 | ## Run-it-yourself (RIY) 65 | 66 | Obtain the image in two ways: 67 | 68 | Docker hub (recommended) 69 | 70 | cburr25/kaa:0.9.0 71 | 72 | Docker build 73 | 74 | 1. Download Kaa's debian package at: http://www.kaaproject.org/download-kaa/ and place it inside 'install/', or anywhere else. 75 | 76 | 2. Build, specifying the debian package location: 77 | $ docker build --build-arg setupfile=<KAA_DEB_PACKAGE> -t cburr25/kaa:0.9.0 . 78 | 79 | Then follow these steps to run the image: 80 | 81 | (1) Run Zookeeper (3.4.8), MariaDB (5.5)/PostgreSQL (9.4) and MongoDB (3.2.6)/Cassandra (2.2.5) 82 | 83 | (2) Write up a Docker environment file to configure your server, see examples/using-compose/kaa-example.env. You must specify SQL_PROVIDER_NAME. 84 | 85 | List of available environment variables: 86 | 87 | | VARIABLE | DEFAULT | NOTE / POSSIBLE VALUES 88 | | ----------------------------- |-------------------------- | ---------------------------- 89 | | SERVICES_WAIT_TIMEOUT | -1 (forever) | Seconds (integer) before timeout while waiting for ZK/SQL/NoSQL to be ready, otherwise abort.
10: wait 10 seconds.
0: don't wait
-1: wait forever. 90 | | | | 91 | | ZOOKEEPER_NODE_LIST | localhost:2181 | comma separated list 92 | | | | 93 | | SQL_PROVIDER_NAME | mariadb | mariadb , postgresql 94 | | JDBC_HOST | localhost | 95 | | JDBC_PORT | if mariadb: 3306
if postgresql: 5432 | 96 | | JDBC_USERNAME | sqladmin | 97 | | JDBC_PASSWORD | admin | 98 | | JDBC_DB_NAME | kaa | 99 | | | 100 | | CASSANDRA_CLUSTER_NAME | Kaa Cluster | 101 | | CASSANDRA_KEYSPACE_NAME | kaa | 102 | | CASSANDRA_NODE_LIST | localhost:9042 | comma separated list 103 | | CASSANDRA_USE_SSL | false | 104 | | CASSANDRA_USE_JMX | true | 105 | | CASSANDRA_USE_CREDENTIALS | false | 106 | | CASSANDRA_USERNAME | (empty) | 107 | | CASSANDRA_PASSWORD | (empty) | 108 | | | | 109 | | MONGODB_NODE_LIST | localhost:27017 | 110 | | MONGODB_DB_NAME | kaa | 111 | | MONGODB_WRITE_CONCERN | acknowledged | 112 | | | | 113 | | NOSQL_PROVIDER_NAME | mongodb | mongodb , cassandra 114 | | | | 115 | | CONTROL_SERVER_ENABLED | true | true/false 116 | | BOOTSTRAP_SERVER_ENABLED | true | true/false 117 | | OPERATIONS_SERVER_ENABLED | true | true/false 118 | | THRIFT_HOST | localhost | 119 | | THRIFT_PORT | 9090 | 120 | | ADMIN_PORT | 8080 | 121 | | SUPPORT_UNENCRYPTED_CONNECTION | true | true/false 122 | | TRANSPORT_BIND_INTERFACE | 0.0.0.0 | 123 | | TRANSPORT_PUBLIC_INTERFACE | localhost | 124 | | METRICS_ENABLED | true | true/false 125 | 126 | (3) Run this image, link the containers however you want. See 'docker-run-kaa-0.9.sh' for an example. 127 | 128 | UPCOMING UPDATE: A more complete set of examples will be included soon, including running with Cassandra and easy cluster deployment. Watch out for updates! 129 | 130 | ## Logs 131 | 132 | If you run your Docker container as a daemon, you won't see its output. That's okay, just run: 133 | 134 | $ docker exec <container-name> tail -f /var/log/kaa/kaa-node.log 135 | 136 | Or simply run the shortcut script 'view-kaa-node-logs.sh' in the examples ! 137 | 138 | ## Notes 139 | 140 | This image was originally written to ease deployment and testing. If you find any bugs or misplaced stuff, help us tidy-up with a pull request! 141 | 142 | 143 | -- 144 | Maintainer: Christopher Burroughs, 145 | lead software engineer & architect at xMight Inc., an energy management IoT startup. 146 | --------------------------------------------------------------------------------