Repository: ignite Updated Branches: refs/heads/master 0e29b873b -> 96c271ba1
Added Kubernetes configs for AWS EKS Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96c271ba Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96c271ba Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96c271ba Branch: refs/heads/master Commit: 96c271ba1f870db9e9017332441ace2d172e137c Parents: 0e29b87 Author: Denis Magda <dma...@gridgain.com> Authored: Mon Oct 1 11:34:38 2018 -0700 Committer: Denis Magda <dma...@gridgain.com> Committed: Mon Oct 1 11:34:38 2018 -0700 ---------------------------------------------------------------------- .../config/eks/ignite-account-role.yaml | 30 ++++++++ .../kubernetes/config/eks/ignite-namespace.yaml | 19 +++++ .../eks/ignite-persistence-storage-class.yaml | 25 +++++++ .../config/eks/ignite-role-binding.yaml | 27 +++++++ .../config/eks/ignite-service-account.yaml | 20 ++++++ .../kubernetes/config/eks/ignite-service.yaml | 37 ++++++++++ .../config/eks/ignite-stateful-set.yaml | 74 ++++++++++++++++++++ .../config/eks/ignite-wal-storage-class.yaml | 25 +++++++ 8 files changed, 257 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-account-role.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-account-role.yaml b/modules/kubernetes/config/eks/ignite-account-role.yaml new file mode 100644 index 0000000..0071e43 --- /dev/null +++ b/modules/kubernetes/config/eks/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/96c271ba/modules/kubernetes/config/eks/ignite-namespace.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-namespace.yaml b/modules/kubernetes/config/eks/ignite-namespace.yaml new file mode 100644 index 0000000..e0154d4 --- /dev/null +++ b/modules/kubernetes/config/eks/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/96c271ba/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml b/modules/kubernetes/config/eks/ignite-persistence-storage-class.yaml new file mode 100644 index 0000000..86d0aa3 --- /dev/null +++ b/modules/kubernetes/config/eks/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. + +#Amazon AWS Configuration +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: ignite-persistence-storage-class #StorageClass name + namespace: ignite #Ignite namespace +provisioner: kubernetes.io/aws-ebs +parameters: + type: gp2 #Volume type io1, gp2, sc1, st1. Default: gp2 + zones: eu-west-1a http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-role-binding.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-role-binding.yaml b/modules/kubernetes/config/eks/ignite-role-binding.yaml new file mode 100644 index 0000000..fdef0f0 --- /dev/null +++ b/modules/kubernetes/config/eks/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/96c271ba/modules/kubernetes/config/eks/ignite-service-account.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-service-account.yaml b/modules/kubernetes/config/eks/ignite-service-account.yaml new file mode 100644 index 0000000..ef207af --- /dev/null +++ b/modules/kubernetes/config/eks/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/96c271ba/modules/kubernetes/config/eks/ignite-service.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-service.yaml b/modules/kubernetes/config/eks/ignite-service.yaml new file mode 100644 index 0000000..23ec761 --- /dev/null +++ b/modules/kubernetes/config/eks/ignite-service.yaml @@ -0,0 +1,37 @@ +# 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 + selector: + # Must be equal to the label set for Ignite pods. + app: ignite http://git-wip-us.apache.org/repos/asf/ignite/blob/96c271ba/modules/kubernetes/config/eks/ignite-stateful-set.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-stateful-set.yaml b/modules/kubernetes/config/eks/ignite-stateful-set.yaml new file mode 100644 index 0000000..3ab039c --- /dev/null +++ b/modules/kubernetes/config/eks/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/96c271ba/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml ---------------------------------------------------------------------- diff --git a/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml b/modules/kubernetes/config/eks/ignite-wal-storage-class.yaml new file mode 100644 index 0000000..cb15a1a --- /dev/null +++ b/modules/kubernetes/config/eks/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. + +#Amazon AWS Configuration +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: ignite-wal-storage-class #StorageClass name + namespace: ignite #Ignite namespace +provisioner: kubernetes.io/aws-ebs +parameters: + type: gp2 #Volume type io1, gp2, sc1, st1. Default: gp2 + zones: eu-west-1a