Skip to content

Commit

Permalink
Merge pull request thingsboard#46 from thingsboard/release-3.3.2
Browse files Browse the repository at this point in the history
Release 3.3.2
  • Loading branch information
ashvayka authored Nov 24, 2021
2 parents 194027a + 9c3a0af commit 3a9d950
Show file tree
Hide file tree
Showing 39 changed files with 1,364 additions and 1,056 deletions.
2 changes: 1 addition & 1 deletion aws/microservices/tb-redis-configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
name: tb-redis-config
namespace: thingsboard
labels:
name: tb-kafka-config
name: tb-redis-config
data:
# Make sure that the value does not contain the port (:6379).
REDIS_HOST: YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT
43 changes: 35 additions & 8 deletions aws/monolith/tb-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ spec:
labels:
app: tb-node
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- tb-node
topologyKey: "kubernetes.io/hostname"
securityContext:
runAsUser: 799
runAsNonRoot: true
fsGroup: 799
volumes:
- name: tb-node-config
configMap:
Expand All @@ -46,8 +60,8 @@ spec:
# configMap:
# name: tb-mqtts-config
# items:
# - key: server.jks
# path: server.jks
# - key: server.pem
# path: server.pem
containers:
- name: server
imagePullPolicy: Always
Expand All @@ -62,6 +76,21 @@ spec:
- containerPort: 5683
name: coap
protocol: UDP
- containerPort: 5684
name: coaps
protocol: UDP
- containerPort: 5685
name: lwm2m
protocol: UDP
- containerPort: 5686
name: lwm2ms
protocol: UDP
- containerPort: 5687
name: lwm2m-bs
protocol: UDP
- containerPort: 5688
name: lwm2ms-bs
protocol: UDP
- containerPort: 7070
name: edge
env:
Expand All @@ -84,12 +113,10 @@ spec:
# value: "0.0.0.0"
#- name: MQTT_SSL_BIND_PORT
# value: "8883"
#- name: MQTT_SSL_KEY_STORE
# value: "/ssl-config/server.jks"
#- name: MQTT_SSL_KEY_STORE_PASSWORD
# value: ""
#- name: MQTT_SSL_KEY_PASSWORD
# value: ""
#- name: MQTT_SSL_CREDENTIALS_TYPE
# value: "PEM"
#- name: MQTT_SSL_PEM_CERT
# value: "/ssl-config/server.pem"
envFrom:
- configMapRef:
name: tb-node-db-config
Expand Down
2 changes: 1 addition & 1 deletion gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Here you can find scripts for different deployment scenarios using GCP:

- [**monolith**](https://thingsboard.io/docs/user-guide/install/cluster/gcp-monolith-setup/) - simplistic deployment of ThingsBoard monolith
- [**microservices**](https://thingsboard.io/docs/user-guide/install/cluster/gcp-microservices-setup/) - deployment of ThingsBoard microservices
- [**microservices**](https://thingsboard.io/docs/user-guide/install/cluster/gcp-microservices-setup/) - deployment of ThingsBoard microservices
13 changes: 9 additions & 4 deletions gcp/microservices/k8s-delete-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
# limitations under the License.
#

set -e

kubectl config set-context $(kubectl config current-context) --namespace=thingsboard

kubectl delete -f thingsboard.yml
kubectl delete -f tb-node.yml
kubectl delete -f tb-services.yml

for lb in receipts/*-load-balancer.yml; do
kubectl delete -f $lb
done

for tr in transports/*-transport.yml; do
kubectl delete -f $tr
done
4 changes: 0 additions & 4 deletions gcp/microservices/k8s-delete-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@
# limitations under the License.
#

set -e

source .env

kubectl config set-context $(kubectl config current-context) --namespace=thingsboard
kubectl delete -f thirdparty.yml
14 changes: 7 additions & 7 deletions gcp/microservices/k8s-deploy-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
# limitations under the License.
#

set -e

kubectl apply -f tb-namespace.yml || echo

kubectl config set-context $(kubectl config current-context) --namespace=thingsboard

kubectl apply -f tb-node-configmap.yml
kubectl apply -f tb-node.yml
kubectl apply -f tb-transport-configmap.yml
kubectl apply -f thingsboard.yml
kubectl apply -f thirdparty.yml

kubectl apply -f routes.yml
kubectl apply -f tb-node-db-configmap.yml
kubectl apply -f tb-node-configmap.yml
kubectl apply -f tb-kafka-configmap.yml
kubectl apply -f tb-redis-configmap.yml
kubectl apply -f tb-services.yml
2 changes: 0 additions & 2 deletions gcp/microservices/k8s-deploy-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# limitations under the License.
#

set -e

kubectl config set-context $(kubectl config current-context) --namespace=thingsboard

kubectl apply -f thirdparty.yml
11 changes: 3 additions & 8 deletions gcp/microservices/k8s-install-tb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#

function installTb() {

loadDemo=$1

kubectl apply -f tb-node-db-configmap.yml
Expand All @@ -30,11 +29,6 @@ function installTb() {

}

function installPostgres() {
kubectl apply -f postgres.yml
kubectl rollout status deployment/postgres
}

while [[ $# -gt 0 ]]
do
key="$1"
Expand All @@ -60,5 +54,6 @@ fi
kubectl apply -f tb-namespace.yml || echo
kubectl config set-context $(kubectl config current-context) --namespace=thingsboard

installPostgres
installTb ${loadDemo}

installTb ${loadDemo}

109 changes: 0 additions & 109 deletions gcp/microservices/postgres.yml

This file was deleted.

19 changes: 19 additions & 0 deletions gcp/microservices/receipts/coap-load-balancer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: tb-coap-loadbalancer
namespace: thingsboard
spec:
type: LoadBalancer
externalTrafficPolicy: Local
selector:
app: tb-coap-transport
ports:
- port: 5683
targetPort: 5683
name: coap
protocol: UDP
- port: 5684
targetPort: 5684
name: coaps
protocol: UDP
44 changes: 44 additions & 0 deletions gcp/microservices/receipts/http-load-balancer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tb-http-loadbalancer
namespace: thingsboard
spec:
rules:
- http:
paths:
- path: /api/v1/*
pathType: ImplementationSpecific
backend:
service:
name: tb-http-transport
port:
number: 8080
- path: /static/rulenode/*
pathType: ImplementationSpecific
backend:
service:
name: tb-node
port:
number: 8080
- path: /static/*
pathType: ImplementationSpecific
backend:
service:
name: tb-web-ui
port:
number: 8080
- path: /index.html
pathType: ImplementationSpecific
backend:
service:
name: tb-web-ui
port:
number: 8080
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: tb-node
port:
number: 8080
Loading

0 comments on commit 3a9d950

Please sign in to comment.