Browse Source

Misc fixes after performance testing

pull/145/head
Volodymyr Babak 9 years ago
parent
commit
7120d61f59
  1. 16
      docker/cassandra/Dockerfile
  2. 27
      docker/cassandra/cassandra.yaml
  3. 5
      docker/cassandra/ready-probe.sh
  4. 24
      docker/common/common.yaml
  5. 16
      docker/thingsboard-db-schema/thingsboard-db-schema.yaml
  6. 23
      docker/thingsboard/thingsboard.yaml
  7. 16
      docker/zookeeper/Dockerfile
  8. 4
      docker/zookeeper/zkGenConfig.sh
  9. 4
      docker/zookeeper/zkOk.sh
  10. 20
      docker/zookeeper/zookeeper.yaml

16
docker/cassandra/Dockerfile

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM cassandra:3.9
COPY ready-probe.sh /

27
docker/cassandra/cassandra.yaml

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: Service
metadata:
@ -49,13 +65,6 @@ spec:
name: cql
- containerPort: 9160
name: thrift
resources:
limits:
cpu: "500m"
memory: 1Gi
requests:
cpu: "500m"
memory: 1Gi
securityContext:
capabilities:
add:
@ -104,7 +113,7 @@ spec:
- metadata:
name: cassandra-data
annotations:
volume.beta.kubernetes.io/storage-class: slow
volume.beta.kubernetes.io/storage-class: fast
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
@ -113,7 +122,7 @@ spec:
- metadata:
name: cassandra-commitlog
annotations:
volume.beta.kubernetes.io/storage-class: slow
volume.beta.kubernetes.io/storage-class: fast
spec:
accessModes: [ "ReadWriteOnce" ]
resources:

5
docker/cassandra/ready-probe.sh

@ -1,6 +1,6 @@
#!/bin/bash
# Copyright 2016 The Kubernetes Authors.
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then
if [[ $DEBUG ]]; then

24
docker/common/common.yaml

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
@ -6,4 +22,12 @@ metadata:
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-standard
---
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: fast
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
---

16
docker/thingsboard-db-schema/thingsboard-db-schema.yaml

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: Pod
metadata:

23
docker/thingsboard/thingsboard.yaml

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
apiVersion: v1
kind: Service
@ -71,13 +87,6 @@ spec:
name: coap
- containerPort: 9001
name: rpc
resources:
limits:
cpu: "250m"
memory: "500Mi"
requests:
cpu: "250m"
memory: "500Mi"
env:
- name: ZOOKEEPER_ENABLED
valueFrom:

16
docker/zookeeper/Dockerfile

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM ubuntu:16.04
ENV ZK_USER=zookeeper \
ZK_DATA_DIR=/var/lib/zookeeper/data \

4
docker/zookeeper/zkGenConfig.sh

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# Copyright 2016 The Kubernetes Authors.
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ZK_USER=${ZK_USER:-"zookeeper"}
ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"}

4
docker/zookeeper/zkOk.sh

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# Copyright 2016 The Kubernetes Authors.
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# zkOk.sh uses the ruok ZooKeeper four letter work to determine if the instance
# is health. The $? variable will be set to 0 if server responds that it is

20
docker/zookeeper/zookeeper.yaml

@ -1,3 +1,19 @@
#
# Copyright © 2016-2017 The Thingsboard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: Service
metadata:
@ -70,10 +86,6 @@ spec:
- name: zk
imagePullPolicy: Always
image: thingsboard/zk:k8stest
resources:
requests:
memory: "500Mi"
cpu: "250m"
ports:
- containerPort: 2181
name: client

Loading…
Cancel
Save