Skip to content

Commit

Permalink
Initial Charts check-in
Browse files Browse the repository at this point in the history
Replace r1/t1 to roxie1/thor1 in the rest of yaml files
  • Loading branch information
xwang2713 committed Sep 17, 2019
1 parent 05e56ef commit 2dc3874
Show file tree
Hide file tree
Showing 34 changed files with 578 additions and 51 deletions.
3 changes: 3 additions & 0 deletions Deployment/ebs/ebs-1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Deployment with EBS
Only one PersistentVolumeClaim created per Deployment yaml file

21 changes: 21 additions & 0 deletions Deployment/ebs/ebs-1/admin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: hpcc-admin
spec: # specification of the pod’s contents
restartPolicy: Never
containers:
- name: hpcc-admin
image: "hpccsystems/hpcc-admin"
ports:
- containerPort: 8010
volumeMounts:
- mountPath: /etc/hpcc_config_map
name: env-config
command: ["/opt/hpcc-tools/run"]
args: ["-e", "kube"]
#args: ["-D"]
volumes:
- name: env-config
configMap:
name: hpcc-config
28 changes: 28 additions & 0 deletions Deployment/ebs/ebs-1/dali.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: Pod
metadata:
name: dali
spec: # specification of the pod’s contents
restartPolicy: Never
containers:
- name: dali
image: "hpccsystems/platform"
volumeMounts:
- mountPath: "/var/lib/HPCCSystems"
name: dali-data
volumes:
- name: dali-data
persistentVolumeClaim:
claimName: ebs-dali
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ebs-dali
spec:
accessModes:
- ReadWriteOnce
storageClassName: gp2
resources:
requests:
storage: 40Gi
14 changes: 14 additions & 0 deletions Deployment/ebs/ebs-1/esp-e1-hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: esp-e1
#namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: esp-e1
minReplicas: 1
maxReplicas: 4
targetCPUUtilizationPercentage: 50
#targetCPUUtilizationPercentage: 5 # for easy to test
51 changes: 51 additions & 0 deletions Deployment/ebs/ebs-1/esp-e1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: v1
kind: Service
metadata:
name: ew-esp1
# namespace: default
spec:
selector:
app: esp-esp1
ports:
- protocol: TCP
port: 8010
targetPort: 8010
#nodePort: 31000 #local
type:
LoadBalancer
#NodePort #local
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: esp-esp1
labels:
app: esp-esp1
spec: # specification of the pod’s contents
replicas: 1
selector:
matchLabels:
app: esp-esp1
cluster: esp1
template:
metadata:
labels:
cluster: esp1
app: esp-esp1
spec:
containers:
- name: esp-esp1
image: "hpccsystems/platform"
ports:
- name: eclwatch
containerPort: 8010
- name: eclwatch-https
containerPort: 18010
- name: wsecl
containerPort: 8002
- name: wsecl-https
containerPort: 18002
- name: wssql
containerPort: 8510
- name: wssql-https
containerPort: 18510
45 changes: 45 additions & 0 deletions Deployment/ebs/ebs-1/roxie-r1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: roxie-roxie1
labels:
app: roxie-roxie1
spec: # specification of the pod’s contents
replicas: 1
selector:
matchLabels:
app: roxie-roxie1
cluster: roxie1
template:
metadata:
labels:
app: roxie-roxie1
cluster: roxie1
spec:
containers:
- name: roxie-roxie1
image: "hpccsystems/platform"
ports:
- name: roxie
containerPort: 9876
- name: roxie-secure
containerPort: 19876
volumeMounts:
- mountPath: "/var/lib/HPCCSystems"
name: roxie1-data
volumes:
- name: roxie1-data
persistentVolumeClaim:
claimName: ebs-roxie1

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ebs-roxie1
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: gp2
resources:
requests:
storage: 40Gi
9 changes: 9 additions & 0 deletions Deployment/ebs/ebs-1/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
WORK_DIR=$(dirname $0)
. ${WORK_DIR}/../../../bin/common

${KUBECTL} create -f admin.yaml
${KUBECTL} create -f dali.yaml
${KUBECTL} create -f support.yaml
${KUBECTL} create -f esp-e1.yaml
${KUBECTL} create -f roxie-r1.yaml
14 changes: 14 additions & 0 deletions Deployment/ebs/ebs-1/stop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
WORK_DIR=$(dirname $0)
. ${WORK_DIR}/../../../bin/common


${KUBECTL} delete -f admin.yaml
${KUBECTL} delete -f support.yaml
${KUBECTL} delete -f esp-e1.yaml
${KUBECTL} delete -f roxie-r1.yaml

kubectl get pvc | grep "^ebs-"| cut -d' ' -f1 | while read name
do
${KUBECTL} delete pvc $name
done
39 changes: 39 additions & 0 deletions Deployment/ebs/ebs-1/support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: support
labels:
app: support
spec: # specification of the pod’s contents
replicas: 1
selector:
matchLabels:
app: support
cluster: support
template:
metadata:
labels:
app: support
cluster: support
spec:
containers:
- name: support
image: "hpccsystems/platform"
volumeMounts:
- mountPath: "/var/lib/HPCCSystems"
name: support-data
volumes:
- name: support-data
persistentVolumeClaim:
claimName: ebs-support
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ebs-support
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: gp2
resources:
requests:
storage: 40Gi
12 changes: 6 additions & 6 deletions aws/configmap/hpcc/topology.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#<Roxie|Thor cluster name>.eclccserver=<value> # default is myeclccserver
#<Roxie|Thor cluster name>.eclscheduler=<value> # default is myeclscheduler
#...
t1.name=t1
t1.eclagent=myeclagent
t1.eclccserver=myeclccserver
t1.eclscheduler=myeclscheduler
thor1.name=t1
thor1.eclagent=myeclagent
thor1.eclccserver=myeclccserver
thor1.eclscheduler=myeclscheduler

r1.name=r1
roxie1.name=r1
#Will use default values for the rest

r2.name=r2
roxie2.name=r2
3 changes: 3 additions & 0 deletions charts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
helm install --name hpcc-cluster ./hpcc-dp
helm list
helm delete hpcc-cluster
22 changes: 22 additions & 0 deletions charts/hpcc-dp/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
12 changes: 12 additions & 0 deletions charts/hpcc-dp/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
name: hpccsystems
version: 1.0.0
appVersion: 7.4.14
description: End-to-end big data in a massively scalable supercomputing platform.
home: http://hpccsystems.com
icon: https://hpccsystems.com/sites/default/files/header-logo_0.png
sources:
- https://github.com/hpcc-systems/HPCC-Platform
maintainers:
- name: Wang,Xiaoming
email: [email protected]
Empty file.
33 changes: 33 additions & 0 deletions charts/hpcc-dp/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "chart-name" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create fully qualified names.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "hpccsystems-fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "hpccsystems-chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "hpccsystems-name" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
21 changes: 21 additions & 0 deletions charts/hpcc-dp/templates/admin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: hpcc-admin
spec: # specification of the pod’s contents
restartPolicy: Never
containers:
- name: hpcc-admin
image: "hpccsystems/hpcc-admin"
ports:
- containerPort: 8010
volumeMounts:
- mountPath: /etc/hpcc_config_map
name: env-config
command: ["/opt/hpcc-tools/run"]
args: ["-e", "kube"]
#args: ["-D"]
volumes:
- name: env-config
configMap:
name: hpcc-config
37 changes: 37 additions & 0 deletions charts/hpcc-dp/templates/cluster-roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: hpcc-rbac
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["pods"]
#verbs: ["get", "watch", "list"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: hpcc-rbac
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
name: pods-list
apiGroup: rbac.authorization.k8s.io
Loading

0 comments on commit 2dc3874

Please sign in to comment.