Skip to content

Commit dd024e2

Browse files
Merge pull request #264 from thingsboard/scripts
Deployment scripts refactoring
2 parents 8bde7e6 + 785a9c9 commit dd024e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+205
-183
lines changed

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ In case you want to remove docker volumes for all the containers please execute
6565

6666
It could be useful to update logs (enable DEBUG/TRACE logs) in runtime or change TBMQ or HAProxy configs. In order to do
6767
this you need to make changes, for example, to the
68-
[haproxy.cfg](/docker/haproxy/config/haproxy.cfg) or [logback.xml](/docker/tb-mqtt-broker/conf/logback.xml) file.
68+
[haproxy.cfg](/docker/haproxy/config/haproxy.cfg) or [logback.xml](/docker/tbmq/conf/logback.xml) file.
6969
Afterward, execute the next command to apply the changes for the container:
7070

7171
```

docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ services:
6565
TB_SERVICE_ID: tbmq1
6666
#JAVA_OPTS: "${JAVA_OPTS}"
6767
env_file:
68-
- tb-mqtt-broker.env
68+
- tbmq.env
6969
volumes:
7070
- tbmq-config:/config
7171
- tbmq1-logs:/var/log/thingsboard-mqtt-broker
@@ -90,7 +90,7 @@ services:
9090
TB_SERVICE_ID: tbmq2
9191
#JAVA_OPTS: "${JAVA_OPTS}"
9292
env_file:
93-
- tb-mqtt-broker.env
93+
- tbmq.env
9494
volumes:
9595
- tbmq-config:/config
9696
- tbmq2-logs:/var/log/thingsboard-mqtt-broker

docker/haproxy/config/haproxy.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ frontend http-in
9595

9696
use_backend letsencrypt_http if letsencrypt_http_acl
9797

98-
default_backend tb-mqtt-broker-backend
98+
default_backend tbmq-backend
9999

100100
frontend https_in
101101
bind *:${HTTPS_PORT} ssl crt /usr/local/etc/haproxy/default.pem crt /usr/local/etc/haproxy/certs.d ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM alpn h2,http/1.1
@@ -104,12 +104,12 @@ frontend https_in
104104

105105
http-request add-header "X-Forwarded-Proto" "https"
106106

107-
default_backend tb-mqtt-broker-backend
107+
default_backend tbmq-backend
108108

109109
backend letsencrypt_http
110110
server letsencrypt_http_srv 127.0.0.1:8080
111111

112-
backend tb-mqtt-broker-backend
112+
backend tbmq-backend
113113
balance leastconn
114114
option tcp-check
115115
option log-health-checks

docker/scripts/docker-refresh-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
set -e
1818

19-
docker run --rm -v tbmq-config:/config -v ./tb-mqtt-broker/conf:/src-config busybox sh -c "cp /src-config/* /config"
19+
docker run --rm -v tbmq-config:/config -v ./tbmq/conf:/src-config busybox sh -c "cp /src-config/* /config"
2020

2121
docker run --rm -v tbmq-haproxy-config:/config -v ./haproxy/config:/src-config busybox sh -c "cp /src-config/haproxy.cfg /config"
2222

docker/scripts/docker-upgrade-tbmq.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ COMPOSE_ARGS_UP="\
3939
up -d ${ADDITIONAL_STARTUP_SERVICES}"
4040

4141
COMPOSE_ARGS_RUN="\
42-
--env-file ./.env --env-file ./tb-mqtt-broker.env \
42+
--env-file ./.env --env-file ./tbmq.env \
4343
-f docker-compose.yml ${ADDITIONAL_CACHE_ARGS} \
4444
run --no-deps --rm -e UPGRADE_TB=true \
4545
tbmq1"
File renamed without changes.
File renamed without changes.
File renamed without changes.

k8s/aws/database-setup.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ metadata:
2121
namespace: thingsboard-mqtt-broker
2222
spec:
2323
volumes:
24-
- name: tb-broker-config
24+
- name: tbmq-config
2525
configMap:
26-
name: tb-broker-config
26+
name: tbmq-config
2727
items:
2828
- key: conf
2929
path: thingsboard-mqtt-broker.conf
@@ -42,11 +42,11 @@ spec:
4242
value: "false"
4343
envFrom:
4444
- configMapRef:
45-
name: tb-broker-db-config
45+
name: tbmq-db-config
4646
- configMapRef:
47-
name: tb-broker-cache-config
47+
name: tbmq-cache-config
4848
volumeMounts:
4949
- mountPath: /config
50-
name: tb-broker-config
50+
name: tbmq-config
5151
command: [ 'sh', '-c', 'while [ ! -f /tmp/install-finished ]; do sleep 2; done;' ]
5252
restartPolicy: Never

k8s/aws/k8s-delete-tbmq.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ set -e
1919

2020
kubectl config set-context $(kubectl config current-context) --namespace=thingsboard-mqtt-broker
2121

22-
kubectl delete -f tb-broker.yml
22+
kubectl delete -f tbmq.yml
2323
kubectl delete -f tbmq-ie.yml

0 commit comments

Comments
 (0)