Commit 95ddde3e38729eae530b67d069bdfdbbd08e1055

Authored by YevhenBondarenko
Committed by Andrew Shvayka
1 parent 7e66fd26

added docker-compose and environment for queues

  1 +TB_QUEUE_TYPE=kafka
1 2
2 DOCKER_REPO=thingsboard 3 DOCKER_REPO=thingsboard
3 4
@@ -32,6 +32,32 @@ function additionalComposeArgs() { @@ -32,6 +32,32 @@ function additionalComposeArgs() {
32 echo $ADDITIONAL_COMPOSE_ARGS 32 echo $ADDITIONAL_COMPOSE_ARGS
33 } 33 }
34 34
  35 +function additionalComposeQueueArgs() {
  36 + source .env
  37 + ADDITIONAL_COMPOSE_QUEUE_ARGS=""
  38 + case $TB_QUEUE_TYPE in
  39 + kafka)
  40 + ADDITIONAL_COMPOSE_QUEUE_ARGS="-f docker-compose.kafka.yml"
  41 + ;;
  42 + aws-sqs)
  43 + ADDITIONAL_COMPOSE_QUEUE_ARGS="-f docker-compose.aws-sqs.yml"
  44 + ;;
  45 + pubsub)
  46 + ADDITIONAL_COMPOSE_QUEUE_ARGS="-f docker-compose.pubsub.yml"
  47 + ;;
  48 + rabbitmq)
  49 + ADDITIONAL_COMPOSE_QUEUE_ARGS="-f docker-compose.rabbitmq.yml"
  50 + ;;
  51 + service-bus)
  52 + ADDITIONAL_COMPOSE_QUEUE_ARGS="-f docker-compose.service-bus.yml"
  53 + ;;
  54 + *)
  55 + echo "Unknown Queue service value specified: '${TB_QUEUE_TYPE}'. Should be either kafka or aws-sqs or pubsub or rabbitmq or service-bus." >&2
  56 + exit 1
  57 + esac
  58 + echo $ADDITIONAL_COMPOSE_QUEUE_ARGS
  59 +}
  60 +
35 function additionalStartupServices() { 61 function additionalStartupServices() {
36 source .env 62 source .env
37 ADDITIONAL_STARTUP_SERVICES="" 63 ADDITIONAL_STARTUP_SERVICES=""
  1 +#
  2 +# Copyright © 2016-2020 The Thingsboard Authors
  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 +version: '2.2'
  18 +
  19 +services:
  20 + tb-js-executor:
  21 + env_file:
  22 + - queue-aws-sqs.env
  23 + tb-core1:
  24 + env_file:
  25 + - queue-aws-sqs.env
  26 + depends_on:
  27 + - zookeeper
  28 + - redis
  29 + tb-core2:
  30 + env_file:
  31 + - queue-aws-sqs.env
  32 + depends_on:
  33 + - zookeeper
  34 + - redis
  35 + tb-rule-engine1:
  36 + env_file:
  37 + - queue-aws-sqs.env
  38 + depends_on:
  39 + - zookeeper
  40 + - redis
  41 + tb-rule-engine2:
  42 + env_file:
  43 + - queue-aws-sqs.env
  44 + depends_on:
  45 + - zookeeper
  46 + - redis
  47 + tb-mqtt-transport1:
  48 + env_file:
  49 + - queue-aws-sqs.env
  50 + depends_on:
  51 + - zookeeper
  52 + tb-mqtt-transport2:
  53 + env_file:
  54 + - queue-aws-sqs.env
  55 + depends_on:
  56 + - zookeeper
  57 + tb-http-transport1:
  58 + env_file:
  59 + - queue-aws-sqs.env
  60 + depends_on:
  61 + - zookeeper
  62 + tb-http-transport2:
  63 + env_file:
  64 + - queue-aws-sqs.env
  65 + depends_on:
  66 + - zookeeper
  67 + tb-coap-transport:
  68 + env_file:
  69 + - queue-aws-sqs.env
  70 + depends_on:
  71 + - zookeeper
@@ -28,27 +28,27 @@ services: @@ -28,27 +28,27 @@ services:
28 env_file: 28 env_file:
29 - tb-node.cassandra.env 29 - tb-node.cassandra.env
30 depends_on: 30 depends_on:
31 - - kafka 31 + - zookeeper
32 - redis 32 - redis
33 - cassandra 33 - cassandra
34 tb-core2: 34 tb-core2:
35 env_file: 35 env_file:
36 - tb-node.cassandra.env 36 - tb-node.cassandra.env
37 depends_on: 37 depends_on:
38 - - kafka 38 + - zookeeper
39 - redis 39 - redis
40 - cassandra 40 - cassandra
41 tb-rule-engine1: 41 tb-rule-engine1:
42 env_file: 42 env_file:
43 - tb-node.cassandra.env 43 - tb-node.cassandra.env
44 depends_on: 44 depends_on:
45 - - kafka 45 + - zookeeper
46 - redis 46 - redis
47 - cassandra 47 - cassandra
48 tb-rule-engine2: 48 tb-rule-engine2:
49 env_file: 49 env_file:
50 - tb-node.cassandra.env 50 - tb-node.cassandra.env
51 depends_on: 51 depends_on:
52 - - kafka 52 + - zookeeper
53 - redis 53 - redis
54 - cassandra 54 - cassandra
  1 +#
  2 +# Copyright © 2016-2020 The Thingsboard Authors
  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 +version: '2.2'
  18 +
  19 +services:
  20 + kafka:
  21 + restart: always
  22 + image: "wurstmeister/kafka:2.12-2.3.0"
  23 + ports:
  24 + - "9092:9092"
  25 + env_file:
  26 + - kafka.env
  27 + depends_on:
  28 + - zookeeper
  29 + tb-js-executor:
  30 + env_file:
  31 + - queue-kafka.env
  32 + depends_on:
  33 + - kafka
  34 + tb-core1:
  35 + env_file:
  36 + - queue-kafka.env
  37 + depends_on:
  38 + - kafka
  39 + - redis
  40 + tb-core2:
  41 + env_file:
  42 + - queue-kafka.env
  43 + depends_on:
  44 + - kafka
  45 + - redis
  46 + tb-rule-engine1:
  47 + env_file:
  48 + - queue-kafka.env
  49 + depends_on:
  50 + - kafka
  51 + - redis
  52 + tb-rule-engine2:
  53 + env_file:
  54 + - queue-kafka.env
  55 + depends_on:
  56 + - kafka
  57 + - redis
  58 + tb-mqtt-transport1:
  59 + env_file:
  60 + - queue-kafka.env
  61 + depends_on:
  62 + - kafka
  63 + tb-mqtt-transport2:
  64 + env_file:
  65 + - queue-kafka.env
  66 + depends_on:
  67 + - kafka
  68 + tb-http-transport1:
  69 + env_file:
  70 + - queue-kafka.env
  71 + depends_on:
  72 + - kafka
  73 + tb-http-transport2:
  74 + env_file:
  75 + - queue-kafka.env
  76 + depends_on:
  77 + - kafka
  78 + tb-coap-transport:
  79 + env_file:
  80 + - queue-kafka.env
  81 + depends_on:
  82 + - kafka
@@ -31,27 +31,27 @@ services: @@ -31,27 +31,27 @@ services:
31 env_file: 31 env_file:
32 - tb-node.postgres.env 32 - tb-node.postgres.env
33 depends_on: 33 depends_on:
34 - - kafka 34 + - zookeeper
35 - redis 35 - redis
36 - postgres 36 - postgres
37 tb-core2: 37 tb-core2:
38 env_file: 38 env_file:
39 - tb-node.postgres.env 39 - tb-node.postgres.env
40 depends_on: 40 depends_on:
41 - - kafka 41 + - zookeeper
42 - redis 42 - redis
43 - postgres 43 - postgres
44 tb-rule-engine1: 44 tb-rule-engine1:
45 env_file: 45 env_file:
46 - tb-node.postgres.env 46 - tb-node.postgres.env
47 depends_on: 47 depends_on:
48 - - kafka 48 + - zookeeper
49 - redis 49 - redis
50 - postgres 50 - postgres
51 tb-rule-engine2: 51 tb-rule-engine2:
52 env_file: 52 env_file:
53 - tb-node.postgres.env 53 - tb-node.postgres.env
54 depends_on: 54 depends_on:
55 - - kafka 55 + - zookeeper
56 - redis 56 - redis
57 - postgres 57 - postgres
  1 +#
  2 +# Copyright © 2016-2020 The Thingsboard Authors
  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 +version: '2.2'
  18 +
  19 +services:
  20 + tb-js-executor:
  21 + env_file:
  22 + - queue-pubsub.env.env
  23 + tb-core1:
  24 + env_file:
  25 + - queue-pubsub.env.env
  26 + depends_on:
  27 + - zookeeper
  28 + - redis
  29 + tb-core2:
  30 + env_file:
  31 + - queue-pubsub.env
  32 + depends_on:
  33 + - zookeeper
  34 + - redis
  35 + tb-rule-engine1:
  36 + env_file:
  37 + - queue-pubsub.env
  38 + depends_on:
  39 + - zookeeper
  40 + - redis
  41 + tb-rule-engine2:
  42 + env_file:
  43 + - queue-pubsub.env
  44 + depends_on:
  45 + - zookeeper
  46 + - redis
  47 + tb-mqtt-transport1:
  48 + env_file:
  49 + - queue-pubsub.env
  50 + depends_on:
  51 + - zookeeper
  52 + tb-mqtt-transport2:
  53 + env_file:
  54 + - queue-pubsub.env
  55 + depends_on:
  56 + - zookeeper
  57 + tb-http-transport1:
  58 + env_file:
  59 + - queue-pubsub.env
  60 + depends_on:
  61 + - zookeeper
  62 + tb-http-transport2:
  63 + env_file:
  64 + - queue-pubsub.env
  65 + depends_on:
  66 + - zookeeper
  67 + tb-coap-transport:
  68 + env_file:
  69 + - queue-pubsub.env
  70 + depends_on:
  71 + - zookeeper
  1 +#
  2 +# Copyright © 2016-2020 The Thingsboard Authors
  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 +version: '2.2'
  18 +
  19 +services:
  20 + tb-js-executor:
  21 + env_file:
  22 + - queue-rabbitmq.env
  23 + tb-core1:
  24 + env_file:
  25 + - queue-rabbitmq.env
  26 + depends_on:
  27 + - zookeeper
  28 + - redis
  29 + tb-core2:
  30 + env_file:
  31 + - queue-rabbitmq.env
  32 + depends_on:
  33 + - zookeeper
  34 + - redis
  35 + tb-rule-engine1:
  36 + env_file:
  37 + - queue-rabbitmq.env
  38 + depends_on:
  39 + - zookeeper
  40 + - redis
  41 + tb-rule-engine2:
  42 + env_file:
  43 + - queue-rabbitmq.env
  44 + depends_on:
  45 + - zookeeper
  46 + - redis
  47 + tb-mqtt-transport1:
  48 + env_file:
  49 + - queue-rabbitmq.env
  50 + depends_on:
  51 + - zookeeper
  52 + tb-mqtt-transport2:
  53 + env_file:
  54 + - queue-rabbitmq.env
  55 + depends_on:
  56 + - zookeeper
  57 + tb-http-transport1:
  58 + env_file:
  59 + - queue-rabbitmq.env
  60 + depends_on:
  61 + - zookeeper
  62 + tb-http-transport2:
  63 + env_file:
  64 + - queue-rabbitmq.env
  65 + depends_on:
  66 + - zookeeper
  67 + tb-coap-transport:
  68 + env_file:
  69 + - queue-rabbitmq.env
  70 + depends_on:
  71 + - zookeeper
  1 +#
  2 +# Copyright © 2016-2020 The Thingsboard Authors
  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 +version: '2.2'
  18 +
  19 +services:
  20 + tb-js-executor:
  21 + env_file:
  22 + - queue-service-bus.env
  23 + tb-core1:
  24 + env_file:
  25 + - queue-service-bus.env
  26 + depends_on:
  27 + - zookeeper
  28 + - redis
  29 + tb-core2:
  30 + env_file:
  31 + - queue-service-bus.env
  32 + depends_on:
  33 + - zookeeper
  34 + - redis
  35 + tb-rule-engine1:
  36 + env_file:
  37 + - queue-service-bus.env
  38 + depends_on:
  39 + - zookeeper
  40 + - redis
  41 + tb-rule-engine2:
  42 + env_file:
  43 + - queue-service-bus.env
  44 + depends_on:
  45 + - zookeeper
  46 + - redis
  47 + tb-mqtt-transport1:
  48 + env_file:
  49 + - queue-service-bus.env
  50 + depends_on:
  51 + - zookeeper
  52 + tb-mqtt-transport2:
  53 + env_file:
  54 + - queue-service-bus.env
  55 + depends_on:
  56 + - zookeeper
  57 + tb-http-transport1:
  58 + env_file:
  59 + - queue-service-bus.env
  60 + depends_on:
  61 + - zookeeper
  62 + tb-http-transport2:
  63 + env_file:
  64 + - queue-service-bus.env
  65 + depends_on:
  66 + - zookeeper
  67 + tb-coap-transport:
  68 + env_file:
  69 + - queue-service-bus.env
  70 + depends_on:
  71 + - zookeeper
@@ -26,15 +26,6 @@ services: @@ -26,15 +26,6 @@ services:
26 environment: 26 environment:
27 ZOO_MY_ID: 1 27 ZOO_MY_ID: 1
28 ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181 28 ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181
29 - kafka:  
30 - restart: always  
31 - image: "wurstmeister/kafka:2.12-2.3.0"  
32 - ports:  
33 - - "9092:9092"  
34 - env_file:  
35 - - kafka.env  
36 - depends_on:  
37 - - zookeeper  
38 redis: 29 redis:
39 restart: always 30 restart: always
40 image: redis:4.0 31 image: redis:4.0
@@ -43,11 +34,9 @@ services: @@ -43,11 +34,9 @@ services:
43 tb-js-executor: 34 tb-js-executor:
44 restart: always 35 restart: always
45 image: "${DOCKER_REPO}/${JS_EXECUTOR_DOCKER_NAME}:${TB_VERSION}" 36 image: "${DOCKER_REPO}/${JS_EXECUTOR_DOCKER_NAME}:${TB_VERSION}"
46 - scale: 20 37 + scale: 2
47 env_file: 38 env_file:
48 - tb-js-executor.env 39 - tb-js-executor.env
49 - depends_on:  
50 - - kafka  
51 tb-core1: 40 tb-core1:
52 restart: always 41 restart: always
53 image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}" 42 image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}"
@@ -67,7 +56,7 @@ services: @@ -67,7 +56,7 @@ services:
67 - ./tb-node/conf:/config 56 - ./tb-node/conf:/config
68 - ./tb-node/log:/var/log/thingsboard 57 - ./tb-node/log:/var/log/thingsboard
69 depends_on: 58 depends_on:
70 - - kafka 59 + - zookeeper
71 - redis 60 - redis
72 - tb-js-executor 61 - tb-js-executor
73 - tb-rule-engine1 62 - tb-rule-engine1
@@ -91,7 +80,7 @@ services: @@ -91,7 +80,7 @@ services:
91 - ./tb-node/conf:/config 80 - ./tb-node/conf:/config
92 - ./tb-node/log:/var/log/thingsboard 81 - ./tb-node/log:/var/log/thingsboard
93 depends_on: 82 depends_on:
94 - - kafka 83 + - zookeeper
95 - redis 84 - redis
96 - tb-js-executor 85 - tb-js-executor
97 - tb-rule-engine1 86 - tb-rule-engine1
@@ -115,7 +104,7 @@ services: @@ -115,7 +104,7 @@ services:
115 - ./tb-node/conf:/config 104 - ./tb-node/conf:/config
116 - ./tb-node/log:/var/log/thingsboard 105 - ./tb-node/log:/var/log/thingsboard
117 depends_on: 106 depends_on:
118 - - kafka 107 + - zookeeper
119 - redis 108 - redis
120 - tb-js-executor 109 - tb-js-executor
121 tb-rule-engine2: 110 tb-rule-engine2:
@@ -137,7 +126,7 @@ services: @@ -137,7 +126,7 @@ services:
137 - ./tb-node/conf:/config 126 - ./tb-node/conf:/config
138 - ./tb-node/log:/var/log/thingsboard 127 - ./tb-node/log:/var/log/thingsboard
139 depends_on: 128 depends_on:
140 - - kafka 129 + - zookeeper
141 - redis 130 - redis
142 - tb-js-executor 131 - tb-js-executor
143 tb-mqtt-transport1: 132 tb-mqtt-transport1:
@@ -153,7 +142,7 @@ services: @@ -153,7 +142,7 @@ services:
153 - ./tb-transports/mqtt/conf:/config 142 - ./tb-transports/mqtt/conf:/config
154 - ./tb-transports/mqtt/log:/var/log/tb-mqtt-transport 143 - ./tb-transports/mqtt/log:/var/log/tb-mqtt-transport
155 depends_on: 144 depends_on:
156 - - kafka 145 + - zookeeper
157 tb-mqtt-transport2: 146 tb-mqtt-transport2:
158 restart: always 147 restart: always
159 image: "${DOCKER_REPO}/${MQTT_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" 148 image: "${DOCKER_REPO}/${MQTT_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
@@ -167,7 +156,7 @@ services: @@ -167,7 +156,7 @@ services:
167 - ./tb-transports/mqtt/conf:/config 156 - ./tb-transports/mqtt/conf:/config
168 - ./tb-transports/mqtt/log:/var/log/tb-mqtt-transport 157 - ./tb-transports/mqtt/log:/var/log/tb-mqtt-transport
169 depends_on: 158 depends_on:
170 - - kafka 159 + - zookeeper
171 tb-http-transport1: 160 tb-http-transport1:
172 restart: always 161 restart: always
173 image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" 162 image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
@@ -181,7 +170,7 @@ services: @@ -181,7 +170,7 @@ services:
181 - ./tb-transports/http/conf:/config 170 - ./tb-transports/http/conf:/config
182 - ./tb-transports/http/log:/var/log/tb-http-transport 171 - ./tb-transports/http/log:/var/log/tb-http-transport
183 depends_on: 172 depends_on:
184 - - kafka 173 + - zookeeper
185 tb-http-transport2: 174 tb-http-transport2:
186 restart: always 175 restart: always
187 image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" 176 image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
@@ -195,7 +184,7 @@ services: @@ -195,7 +184,7 @@ services:
195 - ./tb-transports/http/conf:/config 184 - ./tb-transports/http/conf:/config
196 - ./tb-transports/http/log:/var/log/tb-http-transport 185 - ./tb-transports/http/log:/var/log/tb-http-transport
197 depends_on: 186 depends_on:
198 - - kafka 187 + - zookeeper
199 tb-coap-transport: 188 tb-coap-transport:
200 restart: always 189 restart: always
201 image: "${DOCKER_REPO}/${COAP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" 190 image: "${DOCKER_REPO}/${COAP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
@@ -209,7 +198,7 @@ services: @@ -209,7 +198,7 @@ services:
209 - ./tb-transports/coap/conf:/config 198 - ./tb-transports/coap/conf:/config
210 - ./tb-transports/coap/log:/var/log/tb-coap-transport 199 - ./tb-transports/coap/log:/var/log/tb-coap-transport
211 depends_on: 200 depends_on:
212 - - kafka 201 + - zookeeper
213 tb-web-ui1: 202 tb-web-ui1:
214 restart: always 203 restart: always
215 image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}" 204 image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}"
@@ -41,14 +41,16 @@ set -e @@ -41,14 +41,16 @@ set -e
41 41
42 source compose-utils.sh 42 source compose-utils.sh
43 43
  44 +ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $?
  45 +
44 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 46 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $?
45 47
46 ADDITIONAL_STARTUP_SERVICES=$(additionalStartupServices) || exit $? 48 ADDITIONAL_STARTUP_SERVICES=$(additionalStartupServices) || exit $?
47 49
48 if [ ! -z "${ADDITIONAL_STARTUP_SERVICES// }" ]; then 50 if [ ! -z "${ADDITIONAL_STARTUP_SERVICES// }" ]; then
49 - docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS up -d redis $ADDITIONAL_STARTUP_SERVICES 51 + docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS up -d redis $ADDITIONAL_STARTUP_SERVICES
50 fi 52 fi
51 53
52 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS run --no-deps --rm -e INSTALL_TB=true -e LOAD_DEMO=${loadDemo} tb-core1 54 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS run --no-deps --rm -e INSTALL_TB=true -e LOAD_DEMO=${loadDemo} tb-core1
53 55
54 56
@@ -19,6 +19,8 @@ set -e @@ -19,6 +19,8 @@ set -e
19 19
20 source compose-utils.sh 20 source compose-utils.sh
21 21
  22 +ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $?
  23 +
22 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 24 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $?
23 25
24 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS down -v 26 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS down -v
@@ -19,6 +19,8 @@ set -e @@ -19,6 +19,8 @@ set -e
19 19
20 source compose-utils.sh 20 source compose-utils.sh
21 21
  22 +ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $?
  23 +
22 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 24 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $?
23 25
24 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS up -d 26 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS up -d
@@ -19,6 +19,8 @@ set -e @@ -19,6 +19,8 @@ set -e
19 19
20 source compose-utils.sh 20 source compose-utils.sh
21 21
  22 +ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $?
  23 +
22 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 24 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $?
23 25
24 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS stop 26 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS stop
@@ -19,7 +19,9 @@ set -e @@ -19,7 +19,9 @@ set -e
19 19
20 source compose-utils.sh 20 source compose-utils.sh
21 21
  22 +ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $?
  23 +
22 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 24 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $?
23 25
24 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS pull $@  
25 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS up -d --no-deps --build $@ 26 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS pull $@
  27 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS up -d --no-deps --build $@
@@ -40,12 +40,14 @@ set -e @@ -40,12 +40,14 @@ set -e
40 40
41 source compose-utils.sh 41 source compose-utils.sh
42 42
  43 +ADDITIONAL_COMPOSE_QUEUE_ARGS=$(additionalComposeQueueArgs) || exit $?
  44 +
43 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $? 45 ADDITIONAL_COMPOSE_ARGS=$(additionalComposeArgs) || exit $?
44 46
45 ADDITIONAL_STARTUP_SERVICES=$(additionalStartupServices) || exit $? 47 ADDITIONAL_STARTUP_SERVICES=$(additionalStartupServices) || exit $?
46 48
47 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS pull tb-core1 49 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS pull tb-core1
48 50
49 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS up -d redis $ADDITIONAL_STARTUP_SERVICES 51 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS up -d redis $ADDITIONAL_STARTUP_SERVICES
50 52
51 -docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS run --no-deps --rm -e UPGRADE_TB=true -e FROM_VERSION=${fromVersion} tb-core1 53 +docker-compose -f docker-compose.yml $ADDITIONAL_COMPOSE_ARGS $ADDITIONAL_COMPOSE_QUEUE_ARGS run --no-deps --rm -e UPGRADE_TB=true -e FROM_VERSION=${fromVersion} tb-core1
  1 +TB_QUEUE_TYPE=aws-sqs
  2 +TB_QUEUE_AWS_SQS_ACCESS_KEY_ID=YOUR_KEY
  3 +TB_QUEUE_AWS_SQS_SECRET_ACCESS_KEY=YOUR_SECRET
  4 +TB_QUEUE_AWS_SQS_REGION=YOUR_REGION
  1 +TB_QUEUE_TYPE=kafka
  2 +TB_KAFKA_SERVERS=kafka:9092
  1 +TB_QUEUE_TYPE=pubsub
  2 +TB_QUEUE_PUBSUB_PROJECT_ID=YOUR_PROJECT_ID
  3 +TB_QUEUE_PUBSUB_SERVICE_ACCOUNT=YOUR_SERVICE_ACCOUNT
  1 +TB_QUEUE_TYPE=rabbitmq
  2 +TB_QUEUE_RABBIT_MQ_HOST=localhost
  3 +TB_QUEUE_RABBIT_MQ_PORT=5672
  4 +TB_QUEUE_RABBIT_MQ_USERNAME=YOUR_USERNAME
  5 +TB_QUEUE_RABBIT_MQ_PASSWORD=YOUR_PASSWORD
  1 +TB_QUEUE_TYPE=service-bus
  2 +TB_QUEUE_SERVICE_BUS_NAMESPACE_NAME=YOUR_NAMESPACE_NAME
  3 +TB_QUEUE_SERVICE_BUS_SAS_KEY_NAME=YOUR_SAS_KEY_NAME
  4 +TB_QUEUE_SERVICE_BUS_SAS_KEY=YOUR_SAS_KEY
@@ -4,6 +4,3 @@ ZOOKEEPER_URL=zookeeper:2181 @@ -4,6 +4,3 @@ ZOOKEEPER_URL=zookeeper:2181
4 COAP_BIND_ADDRESS=0.0.0.0 4 COAP_BIND_ADDRESS=0.0.0.0
5 COAP_BIND_PORT=5683 5 COAP_BIND_PORT=5683
6 COAP_TIMEOUT=10000 6 COAP_TIMEOUT=10000
7 -  
8 -TB_QUEUE_TYPE=kafka  
9 -TB_KAFKA_SERVERS=kafka:9092  
@@ -4,6 +4,3 @@ ZOOKEEPER_URL=zookeeper:2181 @@ -4,6 +4,3 @@ ZOOKEEPER_URL=zookeeper:2181
4 HTTP_BIND_ADDRESS=0.0.0.0 4 HTTP_BIND_ADDRESS=0.0.0.0
5 HTTP_BIND_PORT=8081 5 HTTP_BIND_PORT=8081
6 HTTP_REQUEST_TIMEOUT=60000 6 HTTP_REQUEST_TIMEOUT=60000
7 -  
8 -TB_QUEUE_TYPE=kafka  
9 -TB_KAFKA_SERVERS=kafka:9092  
1 -TB_QUEUE_TYPE=kafka  
2 REMOTE_JS_EVAL_REQUEST_TOPIC=js_eval.requests 1 REMOTE_JS_EVAL_REQUEST_TOPIC=js_eval.requests
3 -TB_KAFKA_SERVERS=kafka:9092  
4 LOGGER_LEVEL=info 2 LOGGER_LEVEL=info
5 LOG_FOLDER=logs 3 LOG_FOLDER=logs
6 LOGGER_FILENAME=tb-js-executor-%DATE%.log 4 LOGGER_FILENAME=tb-js-executor-%DATE%.log
@@ -4,6 +4,3 @@ ZOOKEEPER_URL=zookeeper:2181 @@ -4,6 +4,3 @@ ZOOKEEPER_URL=zookeeper:2181
4 MQTT_BIND_ADDRESS=0.0.0.0 4 MQTT_BIND_ADDRESS=0.0.0.0
5 MQTT_BIND_PORT=1883 5 MQTT_BIND_PORT=1883
6 MQTT_TIMEOUT=10000 6 MQTT_TIMEOUT=10000
7 -  
8 -TB_QUEUE_TYPE=kafka  
9 -TB_KAFKA_SERVERS=kafka:9092  
@@ -2,8 +2,6 @@ @@ -2,8 +2,6 @@
2 2
3 ZOOKEEPER_ENABLED=true 3 ZOOKEEPER_ENABLED=true
4 ZOOKEEPER_URL=zookeeper:2181 4 ZOOKEEPER_URL=zookeeper:2181
5 -TB_QUEUE_TYPE=kafka  
6 -TB_KAFKA_SERVERS=kafka:9092  
7 JS_EVALUATOR=remote 5 JS_EVALUATOR=remote
8 TRANSPORT_TYPE=remote 6 TRANSPORT_TYPE=remote
9 CACHE_TYPE=redis 7 CACHE_TYPE=redis