Commit 4c262d57c85210ddfaef86ae4a9a644ab012d75a

Authored by volodymyr-babak
2 parents 2f799501 d2b7850d

Merge remote-tracking branch 'upstream/master' into dao-refactoring-vs

  1 +#
  2 +# Copyright © 2016-2017 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 +FROM cassandra:3.9
  18 +
  19 +ADD ready-probe.sh /ready-probe.sh
  20 +
  21 +RUN chmod +x /ready-probe.sh
  22 +
  23 +CMD ["cassandra", "-f"]
\ No newline at end of file
... ...
  1 +VERSION=1.2.4
  2 +PROJECT=thingsboard
  3 +APP=cassandra
  4 +
  5 +build:
  6 + docker build --pull -t ${PROJECT}/${APP}:${VERSION} -t ${PROJECT}/${APP}:latest .
  7 +
  8 +push: build
  9 + docker push ${PROJECT}/${APP}:${VERSION}
  10 + docker push ${PROJECT}/${APP}:latest
\ No newline at end of file
... ...
... ... @@ -54,7 +54,7 @@ spec:
54 54 topologyKey: "kubernetes.io/hostname"
55 55 containers:
56 56 - name: cassandra
57   - image: cassandra:3.9
  57 + image: thingsboard/cassandra:1.2.4
58 58 imagePullPolicy: Always
59 59 ports:
60 60 - containerPort: 7000
... ...
  1 +#!/usr/bin/env bash
  2 +#
  3 +# Copyright © 2016-2017 The Thingsboard Authors
  4 +#
  5 +# Licensed under the Apache License, Version 2.0 (the "License");
  6 +# you may not use this file except in compliance with the License.
  7 +# You may obtain a copy of the License at
  8 +#
  9 +# http://www.apache.org/licenses/LICENSE-2.0
  10 +#
  11 +# Unless required by applicable law or agreed to in writing, software
  12 +# distributed under the License is distributed on an "AS IS" BASIS,
  13 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 +# See the License for the specific language governing permissions and
  15 +# limitations under the License.
  16 +#
  17 +
  18 +if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then
  19 + if [[ $DEBUG ]]; then
  20 + echo "UN";
  21 + fi
  22 + exit 0;
  23 +else
  24 + if [[ $DEBUG ]]; then
  25 + echo "Not Up";
  26 + fi
  27 + exit 1;
  28 +fi
\ No newline at end of file
... ...
... ... @@ -6,8 +6,9 @@ build:
6 6 cp ../../dao/src/main/resources/schema.cql .
7 7 cp ../../dao/src/main/resources/demo-data.cql .
8 8 cp ../../dao/src/main/resources/system-data.cql .
9   - docker build --pull -t ${PROJECT}/${APP}:${VERSION} .
  9 + docker build --pull -t ${PROJECT}/${APP}:${VERSION} -t ${PROJECT}/${APP}:latest .
10 10 rm schema.cql demo-data.cql system-data.cql
11 11
12 12 push: build
13   - docker push ${PROJECT}/${APP}:${VERSION}
\ No newline at end of file
  13 + docker push ${PROJECT}/${APP}:${VERSION}
  14 + docker push ${PROJECT}/${APP}:latest
\ No newline at end of file
... ...
... ... @@ -25,11 +25,11 @@ spec:
25 25 image: thingsboard/tb-cassandra-schema:1.2.4
26 26 env:
27 27 - name: CREATE_SCHEMA
28   - value: "false"
  28 + value: "true"
29 29 - name: ADD_SYSTEM_DATA
30   - value: "false"
  30 + value: "true"
31 31 - name : ADD_DEMO_DATA
32   - value: "false"
  32 + value: "true"
33 33 - name : CASSANDRA_URL
34 34 value: "cassandra-headless"
35 35 command:
... ...
... ... @@ -4,8 +4,9 @@ APP=application
4 4
5 5 build:
6 6 cp ../../application/target/thingsboard.deb .
7   - docker build --pull -t ${PROJECT}/${APP}:${VERSION} .
  7 + docker build --pull -t ${PROJECT}/${APP}:${VERSION} -t ${PROJECT}/${APP}:latest .
8 8 rm thingsboard.deb
9 9
10 10 push: build
11   - docker push ${PROJECT}/${APP}:${VERSION}
\ No newline at end of file
  11 + docker push ${PROJECT}/${APP}:${VERSION}
  12 + docker push ${PROJECT}/${APP}:latest
\ No newline at end of file
... ...
... ... @@ -3,7 +3,8 @@ PROJECT=thingsboard
3 3 APP=zk
4 4
5 5 build:
6   - docker build --pull -t ${PROJECT}/${APP}:${VERSION} .
  6 + docker build --pull -t ${PROJECT}/${APP}:${VERSION} -t ${PROJECT}/${APP}:latest .
7 7
8 8 push: build
9 9 docker push ${PROJECT}/${APP}:${VERSION}
  10 + docker push ${PROJECT}/${APP}:latest
\ No newline at end of file
... ...