Skip to content

Commit

Permalink
Update README files
Browse files Browse the repository at this point in the history
  • Loading branch information
sitnik committed May 25, 2017
1 parent 78f8be7 commit ede3eaf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 32 deletions.
47 changes: 33 additions & 14 deletions rdbms-image/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Installation
[DeviceHive](https://github.com/devicehive/devicehive-java-server) docker container accepts the following environment variables which enable persistent storage in PostgreSQL, message bus support through Apache Kafka and scalable storage of device messages using Apache Cassandra.
[DeviceHive](https://github.com/devicehive/devicehive-java-server) Docker containers accept the following environment variables which enable persistent storage in PostgreSQL, message bus support through Apache Kafka and scalable storage of device messages using Apache Cassandra.

## Configure
### PostgreSQL
Expand All @@ -22,7 +22,7 @@ To enable DeviceHive to communicate over Apache Kafka message bus to scale out a
More configurable parameters at [devicehive-start.sh](devicehive-frontend/devicehive-start.sh) and [devicehive-start.sh](devicehive-backend/devicehive-start.sh).

## Run
In order to run DeviceHive from docker container, define environment variables as per your requirements and run:
In order to run DeviceHive stack in Docker containers, define environment variables as per your requirements and run:
```
docker-compose up
```
Expand All @@ -38,43 +38,45 @@ docker run -p 80:80 -v ./config.xml:/opt/devicehive/config.xml -e _JAVA_OPTIONS=

## Docker-Compose

Below is an example of linking containers with services using [docker-compose](https://docs.docker.com/compose/compose-file/#/version-2).
Below is an example of linking containers with services using [docker-compose](https://docs.docker.com/compose/compose-file/#/version-3).

```
version: "2"
version: "3"
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:0.10.0.1
image: devicehive/devicehive-kafka
ports:
- "9092:9092"
depends_on:
links:
- "zookeeper"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
DH_ZK_ADDRESS: zookeeper
DH_ZK_PORT: 2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
postgres:
image: postgres:9.4.4
image: postgres:9.4
ports:
- "5432:5432"
dh_admin:
build: ../devicehive-admin
image: devicehive/admin-console
ports:
- "80:80"
- "80:8080"
depends_on:
- "dh_frontend"
environment:
DH_HOST: dh_frontend
DH_PORT: 8080
dh_frontend:
build: ./devicehive-frontend
image: devicehive/devicehive-frontend-rdbms
ports:
- "8080:8080"
depends_on:
Expand All @@ -90,10 +92,27 @@ services:
DH_POSTGRES_PORT: 5432
DH_POSTGRES_USERNAME: "postgres"
DH_POSTGRES_PASSWORD: "mysecretpassword"
DH_POSTGRES_DB: "postgres"
DH_BACKEND_ADDRESS: dh_backend
DH_BACKEND_HAZELCAST_PORT: 5701
dh_backend:
image: devicehive/devicehive-backend-rdbms
depends_on:
- "postgres"
- "kafka"
- "zookeeper"
environment:
DH_ZK_ADDRESS: zookeeper
DH_ZK_PORT: 2181
DH_KAFKA_ADDRESS: kafka
DH_KAFKA_PORT: 9092
DH_POSTGRES_ADDRESS: postgres
DH_POSTGRES_PORT: 5432
DH_POSTGRES_USERNAME: "postgres"
DH_POSTGRES_PASSWORD: "mysecretpassword"
DH_POSTGRES_DB: "postgres"
```

Enjoy!




35 changes: 17 additions & 18 deletions riak-image/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Installation
[DeviceHive](https://github.com/devicehive/devicehive-java-server) docker container accepts the following environment variables which enable persistent storage in Riak TS, message bus support through Apache Kafka and scalable storage of device messages using Apache Cassandra.
[DeviceHive](https://github.com/devicehive/devicehive-java-server) Docker containers accept the following environment variables which enable persistent storage in Riak TS, message bus support through Apache Kafka and scalable storage of device messages using Apache Cassandra.

## Configure
### Riak TS
Expand All @@ -20,7 +20,7 @@ To enable DeviceHive to communicate over Apache Kafka message bus to scale out a
More configurable parameters at [devicehive-start.sh](devicehive-frontend/devicehive-start.sh) and [devicehive-start.sh](devicehive-backend/devicehive-start.sh).

## Run
In order to run DeviceHive from docker container, define environment variables as per your requirements and run:
In order to run DeviceHive stack in Docker containers, define environment variables as per your requirements and run:
```
docker-compose up
```
Expand All @@ -36,39 +36,38 @@ docker run -p 80:80 -v ./config.xml:/opt/devicehive/config.xml -e _JAVA_OPTIONS=

## Docker-Compose

Below is an example of linking containers with services using [docker-compose](https://docs.docker.com/compose/compose-file/#version-2).
Below is an example of linking containers with services using [docker-compose](https://docs.docker.com/compose/compose-file/#version-3).
```
version: "2"
version: "3"
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:0.10.0.1
image: devicehive/devicehive-kafka
ports:
- "9092:9092"
depends_on:
links:
- "zookeeper"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
DH_ZK_ADDRESS: zookeeper
DH_ZK_PORT: 2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
coordinator:
image: basho/riak-ts:1.4.0
image: devicehive/devicehive-riakts
ports:
- "8087:8087"
- "8098:8098"
environment:
- CLUSTER_NAME=riakts
labels:
- "com.basho.riak.cluster.name=riakts"
volumes:
- ./schemas:/etc/riak/schemas
member:
image: basho/riak-ts:1.4.0
image: devicehive/devicehive-riakts
ports:
- "8087"
- "8098"
Expand All @@ -84,17 +83,17 @@ services:
- COORDINATOR_NODE=coordinator
dh_admin:
build: ../devicehive-admin
image: devicehive/admin-console
ports:
- "80:80"
- "80:8080"
depends_on:
- "dh_frontend"
environment:
DH_HOST: dh_frontend
DH_PORT: 8080
dh_frontend:
build: ./devicehive-frontend
image: devicehive/devicehive-frontend-riak
ports:
- "8080:8080"
depends_on:
Expand All @@ -110,9 +109,11 @@ services:
DH_RIAK_HOST: coordinator
DH_RIAK_PORT: 8087
DH_RIAK_HTTP_PORT: 8098
DH_BACKEND_ADDRESS: dh_backend
DH_BACKEND_HAZELCAST_PORT: 5701
dh_backend:
build: ./devicehive-backend
image: devicehive/devicehive-backend-riak
depends_on:
- "zookeeper"
- "kafka"
Expand All @@ -126,6 +127,7 @@ services:
DH_RIAK_HOST: coordinator
DH_RIAK_PORT: 8087
DH_RIAK_HTTP_PORT: 8098
DH_RIAK_HOST_MEMBER: member
volumes:
schemas:
Expand All @@ -134,6 +136,3 @@ volumes:

Enjoy!




0 comments on commit ede3eaf

Please sign in to comment.