diff --git a/docker/cassandra/Dockerfile b/docker/cassandra/Dockerfile index 72084cd0af..ec8117358f 100644 --- a/docker/cassandra/Dockerfile +++ b/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 / diff --git a/docker/cassandra/cassandra.yaml b/docker/cassandra/cassandra.yaml index c3772b15e1..6da5532c3f 100644 --- a/docker/cassandra/cassandra.yaml +++ b/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: diff --git a/docker/cassandra/ready-probe.sh b/docker/cassandra/ready-probe.sh index 989f4d90a1..68faf927fe 100755 --- a/docker/cassandra/ready-probe.sh +++ b/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 diff --git a/docker/common/common.yaml b/docker/common/common.yaml index 610c027911..f650118efd 100644 --- a/docker/common/common.yaml +++ b/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 --- \ No newline at end of file diff --git a/docker/thingsboard-db-schema/thingsboard-db-schema.yaml b/docker/thingsboard-db-schema/thingsboard-db-schema.yaml index dbc4f587f2..6d6040f2eb 100644 --- a/docker/thingsboard-db-schema/thingsboard-db-schema.yaml +++ b/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: diff --git a/docker/thingsboard/thingsboard.yaml b/docker/thingsboard/thingsboard.yaml index 02326c1671..6ef5ab16b4 100644 --- a/docker/thingsboard/thingsboard.yaml +++ b/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: diff --git a/docker/zookeeper/Dockerfile b/docker/zookeeper/Dockerfile index 7752f93b3a..7d3480e825 100644 --- a/docker/zookeeper/Dockerfile +++ b/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 \ diff --git a/docker/zookeeper/zkGenConfig.sh b/docker/zookeeper/zkGenConfig.sh index 0b3365bcac..02fde70fa1 100755 --- a/docker/zookeeper/zkGenConfig.sh +++ b/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"} diff --git a/docker/zookeeper/zkOk.sh b/docker/zookeeper/zkOk.sh index dbe417682f..6dd38ca030 100755 --- a/docker/zookeeper/zkOk.sh +++ b/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 diff --git a/docker/zookeeper/zookeeper.yaml b/docker/zookeeper/zookeeper.yaml index 00bca9c902..ed7a9f6ba2 100644 --- a/docker/zookeeper/zookeeper.yaml +++ b/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