From 601dafda48218d4f22261dd4651f602ab31cd4ab Mon Sep 17 00:00:00 2001 From: Just van den Broecke Date: Tue, 10 Nov 2015 17:05:34 +0100 Subject: [PATCH] #24 FIWARE extended Orion version with Rush --- src/fiware/docker/iota.yaml | 2 +- .../docker/{ => iotagentcpp}/Dockerfile | 0 .../docker/{ => iotagentcpp}/config.json | 0 .../{ => iotagentcpp}/docker-entrypoint.sh | 0 src/fiware/docker/{ => iotagentcpp}/readme.md | 0 src/fiware/docker/iotarush.yaml | 31 +++++++++++++++++++ src/fiware/docker/orionrush/Dockerfile | 2 +- .../docker/orionrush/docker-entrypoint.sh | 2 +- 8 files changed, 34 insertions(+), 3 deletions(-) rename src/fiware/docker/{ => iotagentcpp}/Dockerfile (100%) rename src/fiware/docker/{ => iotagentcpp}/config.json (100%) rename src/fiware/docker/{ => iotagentcpp}/docker-entrypoint.sh (100%) rename src/fiware/docker/{ => iotagentcpp}/readme.md (100%) create mode 100644 src/fiware/docker/iotarush.yaml diff --git a/src/fiware/docker/iota.yaml b/src/fiware/docker/iota.yaml index 66f6e06..9057b4b 100644 --- a/src/fiware/docker/iota.yaml +++ b/src/fiware/docker/iota.yaml @@ -19,7 +19,7 @@ orion: - mongodb ports: - "1026:1026" - command: -dbhost mongodb -rush localhost:5001 -logDir /var/log/contextBroker + command: -dbhost mongodb -logDir /var/log/contextBroker iotacpp: image: telefonicaiot/iotacpp diff --git a/src/fiware/docker/Dockerfile b/src/fiware/docker/iotagentcpp/Dockerfile similarity index 100% rename from src/fiware/docker/Dockerfile rename to src/fiware/docker/iotagentcpp/Dockerfile diff --git a/src/fiware/docker/config.json b/src/fiware/docker/iotagentcpp/config.json similarity index 100% rename from src/fiware/docker/config.json rename to src/fiware/docker/iotagentcpp/config.json diff --git a/src/fiware/docker/docker-entrypoint.sh b/src/fiware/docker/iotagentcpp/docker-entrypoint.sh similarity index 100% rename from src/fiware/docker/docker-entrypoint.sh rename to src/fiware/docker/iotagentcpp/docker-entrypoint.sh diff --git a/src/fiware/docker/readme.md b/src/fiware/docker/iotagentcpp/readme.md similarity index 100% rename from src/fiware/docker/readme.md rename to src/fiware/docker/iotagentcpp/readme.md diff --git a/src/fiware/docker/iotarush.yaml b/src/fiware/docker/iotarush.yaml new file mode 100644 index 0000000..ef2f2e0 --- /dev/null +++ b/src/fiware/docker/iotarush.yaml @@ -0,0 +1,31 @@ +mongodbdata: + image: mongo:2.6 + volumes: + - /data/db + restart: "no" + command: /bin/echo "Data-only container for mongodb." + +mongodb: + image: mongo:2.6 + volumes_from: + - mongodbdata + expose: + - "27017" + command: --smallfiles + +orion: + image: geonovum/orionrush + links: + - mongodb + ports: + - "1026:1026" + +iotacpp: + image: telefonicaiot/iotacpp + links: + - mongodb + - orion + ports: + - "185.21.189.59:8000:8080" + - "185.21.189.59:8081:8081" + - "185.21.189.59:1883:1883" diff --git a/src/fiware/docker/orionrush/Dockerfile b/src/fiware/docker/orionrush/Dockerfile index ad2c8f7..9aac6c7 100644 --- a/src/fiware/docker/orionrush/Dockerfile +++ b/src/fiware/docker/orionrush/Dockerfile @@ -24,7 +24,7 @@ RUN \ curl https://codeload.github.com/telefonicaid/Rush/tar.gz/${RUSH_VERSION} > Rush-${RUSH_VERSION}.tar.gz && \ tar xzvf Rush-${RUSH_VERSION}.tar.gz && \ cd Rush-${RUSH_VERSION} && \ - npm install --production && \ + npm install --production # set mongodb host as linked in docker-compose iota.yml # export RUSH_GEN_MONGO=${MONGODB_HOST} # bin/listener diff --git a/src/fiware/docker/orionrush/docker-entrypoint.sh b/src/fiware/docker/orionrush/docker-entrypoint.sh index a572c49..bcc6f59 100644 --- a/src/fiware/docker/orionrush/docker-entrypoint.sh +++ b/src/fiware/docker/orionrush/docker-entrypoint.sh @@ -11,6 +11,6 @@ export RUSH_GEN_MONGO=${MONGODB_HOST} bin/listener > /var/log/rush-listener.log 2>&1 & bin/consumer > /var/log/rush-consumer.log 2>&1 & -/usr/bin/contextBroker -fg -multiservice -rush localhost:5001 -logDir /var/log/contextBroker +/usr/bin/contextBroker -dbhost ${MONGODB_HOST} -fg -multiservice -rush localhost:5001 -logDir /var/log/contextBroker