Commit 7120d61f59eb1e72ab16c643ca95003e3ae93a2f
1 parent
6584b0bd
Misc fixes after performance testing
Showing
10 changed files
with
131 additions
and
24 deletions
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 | + | ||
1 | FROM cassandra:3.9 | 17 | FROM cassandra:3.9 |
2 | 18 | ||
3 | COPY ready-probe.sh / | 19 | COPY ready-probe.sh / |
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 | + | ||
1 | apiVersion: v1 | 17 | apiVersion: v1 |
2 | kind: Service | 18 | kind: Service |
3 | metadata: | 19 | metadata: |
@@ -49,13 +65,6 @@ spec: | @@ -49,13 +65,6 @@ spec: | ||
49 | name: cql | 65 | name: cql |
50 | - containerPort: 9160 | 66 | - containerPort: 9160 |
51 | name: thrift | 67 | name: thrift |
52 | - resources: | ||
53 | - limits: | ||
54 | - cpu: "500m" | ||
55 | - memory: 1Gi | ||
56 | - requests: | ||
57 | - cpu: "500m" | ||
58 | - memory: 1Gi | ||
59 | securityContext: | 68 | securityContext: |
60 | capabilities: | 69 | capabilities: |
61 | add: | 70 | add: |
@@ -104,7 +113,7 @@ spec: | @@ -104,7 +113,7 @@ spec: | ||
104 | - metadata: | 113 | - metadata: |
105 | name: cassandra-data | 114 | name: cassandra-data |
106 | annotations: | 115 | annotations: |
107 | - volume.beta.kubernetes.io/storage-class: slow | 116 | + volume.beta.kubernetes.io/storage-class: fast |
108 | spec: | 117 | spec: |
109 | accessModes: [ "ReadWriteOnce" ] | 118 | accessModes: [ "ReadWriteOnce" ] |
110 | resources: | 119 | resources: |
@@ -113,7 +122,7 @@ spec: | @@ -113,7 +122,7 @@ spec: | ||
113 | - metadata: | 122 | - metadata: |
114 | name: cassandra-commitlog | 123 | name: cassandra-commitlog |
115 | annotations: | 124 | annotations: |
116 | - volume.beta.kubernetes.io/storage-class: slow | 125 | + volume.beta.kubernetes.io/storage-class: fast |
117 | spec: | 126 | spec: |
118 | accessModes: [ "ReadWriteOnce" ] | 127 | accessModes: [ "ReadWriteOnce" ] |
119 | resources: | 128 | resources: |
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | - | ||
3 | -# Copyright 2016 The Kubernetes Authors. | 2 | +# |
3 | +# Copyright © 2016-2017 The Thingsboard Authors | ||
4 | # | 4 | # |
5 | # Licensed under the Apache License, Version 2.0 (the "License"); | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
6 | # you may not use this file except in compliance with the License. | 6 | # you may not use this file except in compliance with the License. |
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 | # See the License for the specific language governing permissions and | 14 | # See the License for the specific language governing permissions and |
15 | # limitations under the License. | 15 | # limitations under the License. |
16 | +# | ||
16 | 17 | ||
17 | if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then | 18 | if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then |
18 | if [[ $DEBUG ]]; then | 19 | if [[ $DEBUG ]]; then |
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 | + | ||
1 | --- | 17 | --- |
2 | apiVersion: storage.k8s.io/v1beta1 | 18 | apiVersion: storage.k8s.io/v1beta1 |
3 | kind: StorageClass | 19 | kind: StorageClass |
@@ -6,4 +22,12 @@ metadata: | @@ -6,4 +22,12 @@ metadata: | ||
6 | provisioner: kubernetes.io/gce-pd | 22 | provisioner: kubernetes.io/gce-pd |
7 | parameters: | 23 | parameters: |
8 | type: pd-standard | 24 | type: pd-standard |
25 | +--- | ||
26 | +apiVersion: storage.k8s.io/v1beta1 | ||
27 | +kind: StorageClass | ||
28 | +metadata: | ||
29 | + name: fast | ||
30 | +provisioner: kubernetes.io/gce-pd | ||
31 | +parameters: | ||
32 | + type: pd-ssd | ||
9 | --- | 33 | --- |
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 | + | ||
1 | apiVersion: v1 | 17 | apiVersion: v1 |
2 | kind: Pod | 18 | kind: Pod |
3 | metadata: | 19 | metadata: |
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 | + | ||
1 | --- | 17 | --- |
2 | apiVersion: v1 | 18 | apiVersion: v1 |
3 | kind: Service | 19 | kind: Service |
@@ -71,13 +87,6 @@ spec: | @@ -71,13 +87,6 @@ spec: | ||
71 | name: coap | 87 | name: coap |
72 | - containerPort: 9001 | 88 | - containerPort: 9001 |
73 | name: rpc | 89 | name: rpc |
74 | - resources: | ||
75 | - limits: | ||
76 | - cpu: "250m" | ||
77 | - memory: "500Mi" | ||
78 | - requests: | ||
79 | - cpu: "250m" | ||
80 | - memory: "500Mi" | ||
81 | env: | 90 | env: |
82 | - name: ZOOKEEPER_ENABLED | 91 | - name: ZOOKEEPER_ENABLED |
83 | valueFrom: | 92 | valueFrom: |
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 | + | ||
1 | FROM ubuntu:16.04 | 17 | FROM ubuntu:16.04 |
2 | ENV ZK_USER=zookeeper \ | 18 | ENV ZK_USER=zookeeper \ |
3 | ZK_DATA_DIR=/var/lib/zookeeper/data \ | 19 | ZK_DATA_DIR=/var/lib/zookeeper/data \ |
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | -# Copyright 2016 The Kubernetes Authors. | 2 | +# |
3 | +# Copyright © 2016-2017 The Thingsboard Authors | ||
3 | # | 4 | # |
4 | # Licensed under the Apache License, Version 2.0 (the "License"); | 5 | # 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 not use this file except in compliance with the License. |
@@ -12,6 +13,7 @@ | @@ -12,6 +13,7 @@ | ||
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | # See the License for the specific language governing permissions and | 14 | # See the License for the specific language governing permissions and |
14 | # limitations under the License. | 15 | # limitations under the License. |
16 | +# | ||
15 | 17 | ||
16 | ZK_USER=${ZK_USER:-"zookeeper"} | 18 | ZK_USER=${ZK_USER:-"zookeeper"} |
17 | ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"} | 19 | ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"} |
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | -# Copyright 2016 The Kubernetes Authors. | 2 | +# |
3 | +# Copyright © 2016-2017 The Thingsboard Authors | ||
3 | # | 4 | # |
4 | # Licensed under the Apache License, Version 2.0 (the "License"); | 5 | # 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 not use this file except in compliance with the License. |
@@ -12,6 +13,7 @@ | @@ -12,6 +13,7 @@ | ||
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | # See the License for the specific language governing permissions and | 14 | # See the License for the specific language governing permissions and |
14 | # limitations under the License. | 15 | # limitations under the License. |
16 | +# | ||
15 | 17 | ||
16 | # zkOk.sh uses the ruok ZooKeeper four letter work to determine if the instance | 18 | # zkOk.sh uses the ruok ZooKeeper four letter work to determine if the instance |
17 | # is health. The $? variable will be set to 0 if server responds that it is | 19 | # is health. The $? variable will be set to 0 if server responds that it is |
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 | + | ||
1 | apiVersion: v1 | 17 | apiVersion: v1 |
2 | kind: Service | 18 | kind: Service |
3 | metadata: | 19 | metadata: |
@@ -70,10 +86,6 @@ spec: | @@ -70,10 +86,6 @@ spec: | ||
70 | - name: zk | 86 | - name: zk |
71 | imagePullPolicy: Always | 87 | imagePullPolicy: Always |
72 | image: thingsboard/zk:k8stest | 88 | image: thingsboard/zk:k8stest |
73 | - resources: | ||
74 | - requests: | ||
75 | - memory: "500Mi" | ||
76 | - cpu: "250m" | ||
77 | ports: | 89 | ports: |
78 | - containerPort: 2181 | 90 | - containerPort: 2181 |
79 | name: client | 91 | name: client |