devicehive #13

Supports: trusty

Add to new model

Description

DeviceHive makes any connected device part of the Internet of Things. It provides the communication layer, control software and multi-platform libraries to bootstrap development of smart energy, home automation, remote sensing, telemetry, remote control and monitoring software, and much more. Leave communications to DeviceHive and focus on product and innovation. Learn more at: http://devicehive.com


Quick overview:

DeviceHive node for big and high loaded installations.
Charm must be deployed in the bundle with postgresql-dh, kafka-dh, zookeeper-dh and nginx-dh charms.

Deploying:

If you use Amazon cloud you have to deploy devicehive cluster withing the VPC, so all hosts can be reachable using their private ip addresses.

juju deploy cs:~x3v947pl/trusty/devicehive -n 2
juju deploy cs:~x3v947pl/trusty/zookeeper-dh -n 2
juju deploy cs:~x3v947pl/trusty/kafka-dh -n 2
juju deploy cs:~x3v947pl/trusty/postgresql-dh
juju deploy cs:~x3v947pl/trusty/nginx-dh

If you use Azure cloud you might need to open tcp ports before making relations or they will fail. In case of Amazon cloud you will need to expose just nginx-dh service.

juju expose zookeper-dh
juju expose kafka-dh
juju expose postgresql-dh
juju expose devicehive
juju expose nginx-dh

juju add-relation zookeper-dh kafka-dh
juju add-relation devicehive zookeper-dh
juju add-relation devicehive kafka-dh
juju add-relation devicehive postgresql-dh
juju add-relation devicehive nginx-dh

When deployment is finished you will get a picture similar to this:

$ juju status --format=tabular
[Services]
NAME          STATUS  EXPOSED CHARM
devicehive    unknown false   local:trusty/devicehive-1
kafka-dh      unknown false   local:trusty/kafka-dh-1
nginx-dh      unknown true    local:trusty/nginx-dh-1
postgresql-dh unknown false   local:trusty/postgresql-dh-1
zookeeper-dh  unknown false   local:trusty/zookeeper-dh-1

[Units]
ID              WORKLOAD-STATE AGENT-STATE VERSION  MACHINE PORTS                      PUBLIC-ADDRESS MESSAGE
devicehive/0    unknown        idle        1.24.5.1 26      5701/tcp,8080/tcp          10.0.3.57
devicehive/1    unknown        idle        1.24.5.1 33      5701/tcp,8080/tcp          10.0.3.27
kafka-dh/0      unknown        idle        1.24.5.1 28      9092/tcp                   10.0.3.248
kafka-dh/1      unknown        idle        1.24.5.1 30      9092/tcp                   10.0.3.82
nginx-dh/0      unknown        idle        1.24.5.1 32      80/tcp                     10.0.3.174
postgresql-dh/0 unknown        idle        1.24.5.1 27      5432/tcp                   10.0.3.5
zookeeper-dh/0  unknown        idle        1.24.5.1 29      2181/tcp,2888/tcp,3888/tcp 10.0.3.172
zookeeper-dh/1  unknown        idle        1.24.5.1 31      2181/tcp,2888/tcp,3888/tcp 10.0.3.189

[Machines]
ID         STATE   VERSION  DNS        INS-ID               SERIES HARDWARE
0          started 1.24.5.1 localhost  localhost            vivid
26         started 1.24.5.1 10.0.3.57  s90-local-machine-26 trusty arch=amd64
27         started 1.24.5.1 10.0.3.5   s90-local-machine-27 trusty arch=amd64
28         started 1.24.5.1 10.0.3.248 s90-local-machine-28 trusty arch=amd64
29         started 1.24.5.1 10.0.3.172 s90-local-machine-29 trusty arch=amd64
30         started 1.24.5.1 10.0.3.82  s90-local-machine-30 trusty arch=amd64
31         started 1.24.5.1 10.0.3.189 s90-local-machine-31 trusty arch=amd64
32         started 1.24.5.1 10.0.3.174 s90-local-machine-32 trusty arch=amd64
33         started 1.24.5.1 10.0.3.27  s90-local-machine-33 trusty arch=amd64

Using:

After successfull deployment go to http://<ip/domain>/api/rest/info to see api endpoints.
Admin console is available here http://<ip/domain>/admin.
Login/password by default are dhadmin/dhadmin_#911.