From 17483c9298bc1cd942a24c27805e9c5f16d96e65 Mon Sep 17 00:00:00 2001 From: abattagl Date: Fri, 18 Sep 2020 09:29:05 +0200 Subject: [PATCH] Added edge server docker-compose file Added tag to qiot-edge and qiot-edge-server images fixes --- comp/docker-compose.yaml | 74 ------------------- edge-server/application/docker-compose.yaml | 35 +++++++++ edge-server/sensors/docker-compose.yaml | 39 ++++++++++ .../sensors/volumes/rabbitmq/.gitignore | 1 + .../sensors/volumes/rabbitmq/enable_plugins | 1 + edge/{ => application}/docker-compose.yaml | 6 +- edge/prod/docker-compose.yaml | 12 +-- {sensor => edge/sensors}/docker-compose.yaml | 4 +- influxdbtest/docker-compose.yaml | 36 +++++++++ mongotest/.gitignore | 1 - mongotest/docker-compose.yaml | 35 --------- registrationtest/docker-compose.yaml | 14 ---- 12 files changed, 122 insertions(+), 136 deletions(-) delete mode 100644 comp/docker-compose.yaml create mode 100644 edge-server/application/docker-compose.yaml create mode 100644 edge-server/sensors/docker-compose.yaml create mode 100644 edge-server/sensors/volumes/rabbitmq/.gitignore create mode 100644 edge-server/sensors/volumes/rabbitmq/enable_plugins rename edge/{ => application}/docker-compose.yaml (91%) rename {sensor => edge/sensors}/docker-compose.yaml (64%) create mode 100644 influxdbtest/docker-compose.yaml delete mode 100644 mongotest/.gitignore delete mode 100644 mongotest/docker-compose.yaml delete mode 100644 registrationtest/docker-compose.yaml diff --git a/comp/docker-compose.yaml b/comp/docker-compose.yaml deleted file mode 100644 index 2666bf9..0000000 --- a/comp/docker-compose.yaml +++ /dev/null @@ -1,74 +0,0 @@ -version: '3' -services: - activemq: - image: vromero/activemq-artemis:2-alpine-latest - container_name: "activemq" - restart: "no" - ports: - - "8161:8161" - - "61616:61616" - - "5672:5672" - - "1883:1883" - environment: - ARTEMIS_USERNAME: "quarkus" - ARTEMIS_PASSWORD: "quarkus" - kafdrop: - image: obsidiandynamics/kafdrop - container_name: "kafkadrop" - restart: "no" - ports: - - "9000:9000" - environment: - KAFKA_BROKERCONNECT: "kafka:29092" - JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify" - depends_on: - - "kafka" - kafka: - image: obsidiandynamics/kafka - container_name: "kafka" - restart: "no" - ports: - - "2181:2181" - - "9092:9092" - environment: - KAFKA_LISTENERS: "INTERNAL://:29092,EXTERNAL://kafka:9092" - KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:29092,EXTERNAL://kafka:9092" - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT" - KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL" - KAFKA_ZOOKEEPER_SESSION_TIMEOUT: "6000" - KAFKA_RESTART_ATTEMPTS: "10" - KAFKA_RESTART_DELAY: "5" - ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: "0" -# influxdb: -# image: influxdb -# restart: "no" -# ports: -# - "9999:9999" - mongo: - image: "mongo" - container_name: "mongo" - environment: - MONGO_INITDB_DATABASE: "qiot" - #MONGO_INITDB_ROOT_USERNAME: "root" - #MONGO_INITDB_ROOT_PASSWORD: "root" - volumes: - #- ./init-mongo.js: /docker-entrypoint-initdb.d/init-mongo.js:ro - - ./volumes/mongo:/data/db - ports: - - "27017-27019:27017-27019" - mongo-express: - image: mongo-express - container_name: mongo-express - environment: - ME_CONFIG_MONGODB_SERVER: "mongo" - ME_CONFIG_MONGODB_PORT: "27017" - #ME_CONFIG_MONGODB_ENABLE_ADMIN: "false" - #ME_CONFIG_MONGODB_AUTH_DATABASE: "qiot" - #ME_CONFIG_MONGODB_AUTH_USERNAME: "qiot" - #ME_CONFIG_MONGODB_AUTH_PASSWORD: "qiot" - ports: - - "8081:8081" -networks: - default: - external: - name: qiot \ No newline at end of file diff --git a/edge-server/application/docker-compose.yaml b/edge-server/application/docker-compose.yaml new file mode 100644 index 0000000..d723950 --- /dev/null +++ b/edge-server/application/docker-compose.yaml @@ -0,0 +1,35 @@ +version: '3' +services: + edge-integrator: + image: quay.io/qiot/qiot-edge-integrator:1-x86_64 + container_name: "edge-integrator" + restart: "no" + environment: + AMQPHOST: "edge-messaging" + AMQPPORT: 5672 + AMQPUSERNAME: "qiot" + AMQPPASSWORD: "qiot" + SENSORSURL: "http://edge-sensors:5000/" + edge-server-01: + image: quay.io/qiot/qiot-edge-server:1-x86_64 + container_name: "edge-server-01" + restart: "no" + ports: + - "8091:8080" + environment: + AMQPHOST: "edge-messaging" + AMQPPORT: 5672 + AMQPUSERNAME: "qiot" + AMQPPASSWORD: "qiot" + STATIONSERIAL: "teststationserial01" + STATIONNAME: "teststation01" + STATIONADDRESS: "viale john fitzgerald kennedy 2/D vibo valentia" + SENSORSURL: "http://edge-sensors:5000/" + DATAHUBURL: "http://datahub-registration:5016/" + MQTTURL: "activemq" + ENABLESSL: "false" + MQTTPORT: "1883" +networks: + default: + external: + name: qiot \ No newline at end of file diff --git a/edge-server/sensors/docker-compose.yaml b/edge-server/sensors/docker-compose.yaml new file mode 100644 index 0000000..665181c --- /dev/null +++ b/edge-server/sensors/docker-compose.yaml @@ -0,0 +1,39 @@ +version: '3' +services: + edge-messaging: + image: rabbitmq:3 + container_name: edge-messaging + volumes: +# - ./volumes/rabbitmq/etc/:/etc/rabbitmq/ + - ./volumes/rabbitmq/data/:/var/lib/rabbitmq/ + - ./volumes/rabbitmq/logs/:/var/log/rabbitmq/ + - ./volumes/rabbitmq/enable_plugins:/etc/rabbitmq/enabled_plugins + environment: +# RABBITMQ_ERLANG_COOKIE: ${RABBITMQ_ERLANG_COOKIE} + RABBITMQ_DEFAULT_USER: qiot + RABBITMQ_DEFAULT_PASS: qiot + ports: + - 5673:5672 + - 15672:15672 + expose: + - "5672" + edge-sensors: + image: quay.io/qiot/qiot-sensors-emulator + container_name: "edge-sensors" + restart: "no" + ports: + - "5000:5000" + environment: + QUARKUS_PROFILE: "staging" + edge-sensors: + image: quay.io/qiot/qiot-sensors-emulator + container_name: "edge-sensors" + restart: "no" + ports: + - "5000:5000" + environment: + QUARKUS_PROFILE: "staging" +networks: + default: + external: + name: qiot \ No newline at end of file diff --git a/edge-server/sensors/volumes/rabbitmq/.gitignore b/edge-server/sensors/volumes/rabbitmq/.gitignore new file mode 100644 index 0000000..82f0c3a --- /dev/null +++ b/edge-server/sensors/volumes/rabbitmq/.gitignore @@ -0,0 +1 @@ +/data/ diff --git a/edge-server/sensors/volumes/rabbitmq/enable_plugins b/edge-server/sensors/volumes/rabbitmq/enable_plugins new file mode 100644 index 0000000..c5f2ce4 --- /dev/null +++ b/edge-server/sensors/volumes/rabbitmq/enable_plugins @@ -0,0 +1 @@ +[rabbitmq_amqp1_0,rabbitmq_management,rabbitmq_web_dispatch,rabbitmq_management_agent]. diff --git a/edge/docker-compose.yaml b/edge/application/docker-compose.yaml similarity index 91% rename from edge/docker-compose.yaml rename to edge/application/docker-compose.yaml index efe0b29..de0a960 100644 --- a/edge/docker-compose.yaml +++ b/edge/application/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: edge-service-01: - image: quay.io/qiot/qiot-service + image: quay.io/qiot/qiot-service:1-x86_64 container_name: "edge-service-01" restart: "no" ports: @@ -17,7 +17,7 @@ services: ENABLESSL: "false" MQTTPORT: "1883" edge-service-02: - image: quay.io/qiot/qiot-service + image: quay.io/qiot/qiot-service:1-x86_64 container_name: "edge-service-02" restart: "no" ports: @@ -33,7 +33,7 @@ services: ENABLESSL: "false" MQTTPORT: "1883" edge-service-03: - image: quay.io/qiot/qiot-service + image: quay.io/qiot/qiot-service:1-x86_64 container_name: "edge-service-03" restart: "no" ports: diff --git a/edge/prod/docker-compose.yaml b/edge/prod/docker-compose.yaml index 89d21e1..3a1e6cf 100644 --- a/edge/prod/docker-compose.yaml +++ b/edge/prod/docker-compose.yaml @@ -1,8 +1,8 @@ version: '3' services: - edge-service-01: + edge-service-prod-01: image: quay.io/qiot/qiot-service - container_name: "edge-service-01" + container_name: "edge-service-prod-01" restart: "no" ports: - "8091:8080" @@ -15,9 +15,9 @@ services: #MQTTHOST: "activemq" #ENABLESSL: "false" #MQTTPORT: "1883" - edge-service-02: + edge-service-prod-02: image: quay.io/qiot/qiot-service - container_name: "edge-service-02" + container_name: "edge-service-prod-02" restart: "no" ports: - "8092:8080" @@ -30,9 +30,9 @@ services: #MQTTHOST: "activemq" #ENABLESSL: "false" #MQTTPORT: "1883" - edge-service-03: + edge-service-prod-03: image: quay.io/qiot/qiot-service - container_name: "edge-service-03" + container_name: "edge-service-prod-03" restart: "no" ports: - "8093:8080" diff --git a/sensor/docker-compose.yaml b/edge/sensors/docker-compose.yaml similarity index 64% rename from sensor/docker-compose.yaml rename to edge/sensors/docker-compose.yaml index da97711..d3d2246 100644 --- a/sensor/docker-compose.yaml +++ b/edge/sensors/docker-compose.yaml @@ -1,13 +1,11 @@ version: '3' services: edge-sensors: - image: quay.io/qiot/qiot-sensors-emulator + image: quay.io/qiot/qiot-sensors-emulator:1-x86_64 container_name: "edge-sensors" restart: "no" ports: - "5000:5000" - environment: - QUARKUS_PROFILE: "staging" networks: default: external: diff --git a/influxdbtest/docker-compose.yaml b/influxdbtest/docker-compose.yaml new file mode 100644 index 0000000..6c6179f --- /dev/null +++ b/influxdbtest/docker-compose.yaml @@ -0,0 +1,36 @@ +version: '3' +services: + influxdb: + image: influxdb:1.8.2 + container_name: "influxdb" + ports: + - "9999:9999" + - "8086:8086" + volumes: + - ./volumes/influxdb:/data/db + + chronograph: + image: quay.io/influxdb/chronograf:1.8.6 + container_name: "chronograph" + entrypoint: 'chronograf --kapacitor-url=http://kapacitor:9092 --influxdb-url=http://influxdb:8086' + depends_on: + - "influxdb" + - "kapacitor" + ports: + - "8888:8888" + volumes: + - ./volumes/influxdb:/var/lib/chronograf + + kapacitor: + image: kapacitor + container_name: "kapacitor" + depends_on: + - "influxdb" + environment: + - KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086 + - KAPACITOR_HOSTNAME=kapacitor +networks: + default: + external: + name: influxdb + #9340172063e48e0f5473ff47b5b05403c03d2f43c0b107d710dd3e014b966b06 \ No newline at end of file diff --git a/mongotest/.gitignore b/mongotest/.gitignore deleted file mode 100644 index eaf90e9..0000000 --- a/mongotest/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/volumes/ diff --git a/mongotest/docker-compose.yaml b/mongotest/docker-compose.yaml deleted file mode 100644 index 280a939..0000000 --- a/mongotest/docker-compose.yaml +++ /dev/null @@ -1,35 +0,0 @@ -version: "2" -services: - mongo: - image: mongo - container_name: mongo - restart: always - environment: - - MONGO_INITDB_DATABASE=qiot - #- MONGO_INITDB_ROOT_USERNAME: root - #- MONGO_INITDB_ROOT_PASSWORD: password - ports: - - 27017-27019:27017-27019 - volumes: - #- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro - - ./volumes/mongo:/data/db - - mongo-express: - image: mongo-express - container_name: mongo-express - environment: - ME_CONFIG_MONGODB_SERVER: "mongo" - ME_CONFIG_MONGODB_PORT: "27017" - #ME_CONFIG_MONGODB_ENABLE_ADMIN: "false" - #ME_CONFIG_MONGODB_AUTH_DATABASE: "qiot" - #ME_CONFIG_MONGODB_AUTH_USERNAME: "qiot" - #ME_CONFIG_MONGODB_AUTH_PASSWORD: "qiot" - ports: - - 8081:8081 - -volumes: - db-data: -networks: - default: - external: - name: qiot \ No newline at end of file diff --git a/registrationtest/docker-compose.yaml b/registrationtest/docker-compose.yaml deleted file mode 100644 index 0cd0803..0000000 --- a/registrationtest/docker-compose.yaml +++ /dev/null @@ -1,14 +0,0 @@ -version: '3' -services: - datahub-registration: - image: quay.io/qiot/qiot-datahub-registration - container_name: "datahub-registration" - restart: "no" - ports: - - "5016:5016" - environment: - MONGODBURL: "mongo:27017" -networks: - default: - external: - name: qiot \ No newline at end of file