Misc fixes after performance testing
This commit is contained in:
		
							parent
							
								
									6584b0bdfd
								
							
						
					
					
						commit
						7120d61f59
					
				@ -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
 | 
					FROM cassandra:3.9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY ready-probe.sh /
 | 
					COPY ready-probe.sh /
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
					apiVersion: v1
 | 
				
			||||||
kind: Service
 | 
					kind: Service
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
@ -49,13 +65,6 @@ spec:
 | 
				
			|||||||
          name: cql
 | 
					          name: cql
 | 
				
			||||||
        - containerPort: 9160
 | 
					        - containerPort: 9160
 | 
				
			||||||
          name: thrift
 | 
					          name: thrift
 | 
				
			||||||
        resources:
 | 
					 | 
				
			||||||
          limits:
 | 
					 | 
				
			||||||
            cpu: "500m"
 | 
					 | 
				
			||||||
            memory: 1Gi
 | 
					 | 
				
			||||||
          requests:
 | 
					 | 
				
			||||||
           cpu: "500m"
 | 
					 | 
				
			||||||
           memory: 1Gi
 | 
					 | 
				
			||||||
        securityContext:
 | 
					        securityContext:
 | 
				
			||||||
          capabilities:
 | 
					          capabilities:
 | 
				
			||||||
            add:
 | 
					            add:
 | 
				
			||||||
@ -104,7 +113,7 @@ spec:
 | 
				
			|||||||
  - metadata:
 | 
					  - metadata:
 | 
				
			||||||
      name: cassandra-data
 | 
					      name: cassandra-data
 | 
				
			||||||
      annotations:
 | 
					      annotations:
 | 
				
			||||||
        volume.beta.kubernetes.io/storage-class: slow
 | 
					        volume.beta.kubernetes.io/storage-class: fast
 | 
				
			||||||
    spec:
 | 
					    spec:
 | 
				
			||||||
      accessModes: [ "ReadWriteOnce" ]
 | 
					      accessModes: [ "ReadWriteOnce" ]
 | 
				
			||||||
      resources:
 | 
					      resources:
 | 
				
			||||||
@ -113,7 +122,7 @@ spec:
 | 
				
			|||||||
  - metadata:
 | 
					  - metadata:
 | 
				
			||||||
      name: cassandra-commitlog
 | 
					      name: cassandra-commitlog
 | 
				
			||||||
      annotations:
 | 
					      annotations:
 | 
				
			||||||
        volume.beta.kubernetes.io/storage-class: slow
 | 
					        volume.beta.kubernetes.io/storage-class: fast
 | 
				
			||||||
    spec:
 | 
					    spec:
 | 
				
			||||||
      accessModes: [ "ReadWriteOnce" ]
 | 
					      accessModes: [ "ReadWriteOnce" ]
 | 
				
			||||||
      resources:
 | 
					      resources:
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
# Copyright 2016 The Kubernetes Authors.
 | 
					# Copyright © 2016-2017 The Thingsboard Authors
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
					# Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
# you may not use this file except in compliance with 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.
 | 
					# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					# See the License for the specific language governing permissions and
 | 
				
			||||||
# limitations under the License.
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then
 | 
					if [[ $(nodetool status | grep $POD_IP) == *"UN"* ]]; then
 | 
				
			||||||
  if [[ $DEBUG ]]; then
 | 
					  if [[ $DEBUG ]]; then
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
					apiVersion: storage.k8s.io/v1beta1
 | 
				
			||||||
kind: StorageClass
 | 
					kind: StorageClass
 | 
				
			||||||
@ -6,4 +22,12 @@ metadata:
 | 
				
			|||||||
provisioner: kubernetes.io/gce-pd
 | 
					provisioner: kubernetes.io/gce-pd
 | 
				
			||||||
parameters:
 | 
					parameters:
 | 
				
			||||||
  type: pd-standard
 | 
					  type: pd-standard
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					apiVersion: storage.k8s.io/v1beta1
 | 
				
			||||||
 | 
					kind: StorageClass
 | 
				
			||||||
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: fast
 | 
				
			||||||
 | 
					provisioner: kubernetes.io/gce-pd
 | 
				
			||||||
 | 
					parameters:
 | 
				
			||||||
 | 
					  type: pd-ssd
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
@ -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
 | 
					apiVersion: v1
 | 
				
			||||||
kind: Pod
 | 
					kind: Pod
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
					apiVersion: v1
 | 
				
			||||||
kind: Service
 | 
					kind: Service
 | 
				
			||||||
@ -71,13 +87,6 @@ spec:
 | 
				
			|||||||
          name: coap
 | 
					          name: coap
 | 
				
			||||||
        - containerPort: 9001
 | 
					        - containerPort: 9001
 | 
				
			||||||
          name: rpc
 | 
					          name: rpc
 | 
				
			||||||
        resources:
 | 
					 | 
				
			||||||
          limits:
 | 
					 | 
				
			||||||
            cpu: "250m"
 | 
					 | 
				
			||||||
            memory: "500Mi"
 | 
					 | 
				
			||||||
          requests:
 | 
					 | 
				
			||||||
           cpu: "250m"
 | 
					 | 
				
			||||||
           memory: "500Mi"
 | 
					 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
        - name: ZOOKEEPER_ENABLED
 | 
					        - name: ZOOKEEPER_ENABLED
 | 
				
			||||||
          valueFrom:
 | 
					          valueFrom:
 | 
				
			||||||
 | 
				
			|||||||
@ -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 
 | 
					FROM ubuntu:16.04 
 | 
				
			||||||
ENV ZK_USER=zookeeper \
 | 
					ENV ZK_USER=zookeeper \
 | 
				
			||||||
ZK_DATA_DIR=/var/lib/zookeeper/data \
 | 
					ZK_DATA_DIR=/var/lib/zookeeper/data \
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,6 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					#!/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");
 | 
					# Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
# you may not use this file except in compliance with 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.
 | 
					# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					# See the License for the specific language governing permissions and
 | 
				
			||||||
# limitations under the License.
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ZK_USER=${ZK_USER:-"zookeeper"}
 | 
					ZK_USER=${ZK_USER:-"zookeeper"}
 | 
				
			||||||
ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"}
 | 
					ZK_LOG_LEVEL=${ZK_LOG_LEVEL:-"INFO"}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,6 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					#!/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");
 | 
					# Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
# you may not use this file except in compliance with 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.
 | 
					# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					# See the License for the specific language governing permissions and
 | 
				
			||||||
# limitations under the License.
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# zkOk.sh uses the ruok ZooKeeper four letter work to determine if the instance
 | 
					# 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 
 | 
					# is health. The $? variable will be set to 0 if server responds that it is 
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
					apiVersion: v1
 | 
				
			||||||
kind: Service
 | 
					kind: Service
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
@ -70,10 +86,6 @@ spec:
 | 
				
			|||||||
      - name: zk
 | 
					      - name: zk
 | 
				
			||||||
        imagePullPolicy: Always
 | 
					        imagePullPolicy: Always
 | 
				
			||||||
        image: thingsboard/zk:k8stest
 | 
					        image: thingsboard/zk:k8stest
 | 
				
			||||||
        resources:
 | 
					 | 
				
			||||||
          requests:
 | 
					 | 
				
			||||||
            memory: "500Mi"
 | 
					 | 
				
			||||||
            cpu: "250m"
 | 
					 | 
				
			||||||
        ports:
 | 
					        ports:
 | 
				
			||||||
        - containerPort: 2181
 | 
					        - containerPort: 2181
 | 
				
			||||||
          name: client
 | 
					          name: client
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user