Repository: ignite Updated Branches: refs/heads/ignite-9340 c847a895b -> 2d410c55a
Kubernetes Azure configuration Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c721bc6e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c721bc6e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c721bc6e Branch: refs/heads/ignite-9340 Commit: c721bc6e4a25c32a29c135bbdd3d435757a4c18d Parents: 0e17631 Author: Denis Magda <[email protected]> Authored: Tue Aug 21 21:50:36 2018 -0400 Committer: Denis Magda <[email protected]> Committed: Tue Aug 21 21:50:36 2018 -0400 ---------------------------------------------------------------------- .../config/az/ignite-account-role.yaml | 30 ++++++++ .../kubernetes/config/az/ignite-deployment.yaml | 47 +++++++++++++ .../kubernetes/config/az/ignite-namespace.yaml | 19 +++++ .../az/ignite-persistence-storage-class.yaml | 25 +++++++ .../config/az/ignite-role-binding.yaml | 27 +++++++ .../config/az/ignite-service-account.yaml | 20 ++++++ .../kubernetes/config/az/ignite-service.yaml | 38 ++++++++++ .../config/az/ignite-stateful-set.yaml | 74 ++++++++++++++++++++ .../config/az/ignite-wal-storage-class.yaml | 25 +++++++ 9 files changed, 305 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-account-role.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-account-role.yaml b/modules/kubernetes/config/az/ignite-account-role.yaml new file mode 100644 index 0000000..0071e43 --- /dev/null +++ b/modules/kubernetes/config/az/ignite-account-role.yaml @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: ignite + namespace: ignite +rules: +- apiGroups: + - "" + resources: # Here are resources you can access + - pods + - endpoints + verbs: # That is what you can do with them + - get + - list + - watch http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-deployment.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-deployment.yaml b/modules/kubernetes/config/az/ignite-deployment.yaml new file mode 100644 index 0000000..e1f6c22 --- /dev/null +++ b/modules/kubernetes/config/az/ignite-deployment.yaml @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +# An example of a Kubernetes configuration for Ignite pods deployment. +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + # Custom Ignite cluster's name. + name: ignite-cluster +spec: + # A number of Ignite pods to be started by Kubernetes initially. + replicas: 2 + template: + metadata: + labels: + app: ignite + spec: + containers: + # Custom Ignite pod name. + - name: ignite-node + image: apacheignite/ignite:2.5.0 + env: + - name: OPTION_LIBS + value: ignite-kubernetes + - name: CONFIG_URI + value: https://raw.githubusercontent.com/apache/ignite/master/modules/kubernetes/config/example-kube-persistence.xml + ports: + # Ports to open. + # Might be optional depending on your Kubernetes environment. + - containerPort: 11211 # REST port number. + - containerPort: 47100 # communication SPI port number. + - containerPort: 47500 # discovery SPI port number. + - containerPort: 49112 # JMX port number. + - containerPort: 10800 # SQL port number. + - containerPort: 10900 # Thin clients port number. http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-namespace.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-namespace.yaml b/modules/kubernetes/config/az/ignite-namespace.yaml new file mode 100644 index 0000000..e0154d4 --- /dev/null +++ b/modules/kubernetes/config/az/ignite-namespace.yaml @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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: Namespace +metadata: + name: ignite http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-persistence-storage-class.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-persistence-storage-class.yaml b/modules/kubernetes/config/az/ignite-persistence-storage-class.yaml new file mode 100644 index 0000000..da1a442 --- /dev/null +++ b/modules/kubernetes/config/az/ignite-persistence-storage-class.yaml @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +#Microsoft Azure Configuration +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: ignite-persistence-storage-class #StorageClass name + namespace: ignite #Ignite namespace +provisioner: kubernetes.io/azure-disk +parameters: + storageaccounttype: Standard_LRS + kind: dedicated http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-role-binding.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-role-binding.yaml b/modules/kubernetes/config/az/ignite-role-binding.yaml new file mode 100644 index 0000000..fdef0f0 --- /dev/null +++ b/modules/kubernetes/config/az/ignite-role-binding.yaml @@ -0,0 +1,27 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1beta1 +metadata: + name: ignite +roleRef: + kind: ClusterRole + name: ignite + apiGroup: rbac.authorization.k8s.io +subjects: +- kind: ServiceAccount + name: ignite + namespace: ignite http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-service-account.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-service-account.yaml b/modules/kubernetes/config/az/ignite-service-account.yaml new file mode 100644 index 0000000..ef207af --- /dev/null +++ b/modules/kubernetes/config/az/ignite-service-account.yaml @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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: ServiceAccount +metadata: + name: ignite + namespace: ignite http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-service.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-service.yaml b/modules/kubernetes/config/az/ignite-service.yaml new file mode 100644 index 0000000..7cedccc --- /dev/null +++ b/modules/kubernetes/config/az/ignite-service.yaml @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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: + # The name must be equal to TcpDiscoveryKubernetesIpFinder.serviceName + name: ignite + # The name must be equal to TcpDiscoveryKubernetesIpFinder.namespaceName + namespace: ignite +spec: + type: LoadBalancer + ports: + - name: rest + port: 8080 + targetPort: 8080 + - name: sql + port: 10800 + targetPort: 10800 + - name: thinclients + port: 10900 + targetPort: 10900 + sessionAffinity: ClientIP + selector: + # Must be equal to the label set for Ignite pods. + app: ignite http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-stateful-set.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-stateful-set.yaml b/modules/kubernetes/config/az/ignite-stateful-set.yaml new file mode 100644 index 0000000..3ab039c --- /dev/null +++ b/modules/kubernetes/config/az/ignite-stateful-set.yaml @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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: apps/v1beta2 +kind: StatefulSet +metadata: + name: ignite + namespace: ignite +spec: + selector: + matchLabels: + app: ignite + serviceName: ignite + replicas: 2 + template: + metadata: + labels: + app: ignite + spec: + serviceAccountName: ignite + containers: + - name: ignite + image: apacheignite/ignite:2.6.0 + env: + - name: OPTION_LIBS + value: ignite-kubernetes,ignite-rest-http + - name: CONFIG_URI + value: https://raw.githubusercontent.com/apache/ignite/master/modules/kubernetes/config/example-kube-persistence-and-wal.xml + - name: IGNITE_QUIET + value: "false" + - name: JVM_OPTS + value: "-Djava.net.preferIPv4Stack=true" + ports: + - containerPort: 11211 # JDBC port number. + - containerPort: 47100 # communication SPI port number. + - containerPort: 47500 # discovery SPI port number. + - containerPort: 49112 # JMX port number. + - containerPort: 10800 # SQL port number. + - containerPort: 8080 # REST port number. + - containerPort: 10900 #Thin clients port number. + volumeMounts: + - mountPath: "/wal" + name: ignite-wal + - mountPath: "/persistence" + name: ignite-persistence + volumeClaimTemplates: + - metadata: + name: ignite-persistence + spec: + accessModes: [ "ReadWriteOnce" ] + storageClassName: "ignite-persistence-storage-class" + resources: + requests: + storage: "1Gi" + - metadata: + name: ignite-wal + spec: + accessModes: [ "ReadWriteOnce" ] + storageClassName: "ignite-wal-storage-class" + resources: + requests: + storage: "1Gi" http://git-wip-us.apache.org/repos/asf/ignite/blob/c721bc6e/modules/kubernetes/config/az/ignite-wal-storage-class.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/az/ignite-wal-storage-class.yaml b/modules/kubernetes/config/az/ignite-wal-storage-class.yaml new file mode 100644 index 0000000..0e4874e --- /dev/null +++ b/modules/kubernetes/config/az/ignite-wal-storage-class.yaml @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +#Microsoft Azure Configuration +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: ignite-wal-storage-class #StorageClass name + namespace: ignite #Ignite namespace +provisioner: kubernetes.io/azure-disk +parameters: + storageaccounttype: Standard_LRS + kind: managed
