diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..cff4428 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 0000000..36b372c Binary files /dev/null and b/.github/.DS_Store differ diff --git a/charts/.DS_Store b/charts/.DS_Store new file mode 100644 index 0000000..8891033 Binary files /dev/null and b/charts/.DS_Store differ diff --git a/charts/heplifyServer-webApp-stack-EKS/.DS_Store b/charts/heplifyServer-webApp-stack-EKS/.DS_Store new file mode 100644 index 0000000..df37fdf Binary files /dev/null and b/charts/heplifyServer-webApp-stack-EKS/.DS_Store differ diff --git a/charts/heplifyServer-webApp-stack-EKS/Chart.yaml b/charts/heplifyServer-webApp-stack-EKS/Chart.yaml new file mode 100644 index 0000000..f218ba5 --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: homer-helm +version: 0.0.1 +kubeVersion: ">= 1.21.0-0" +description: Homer helm chart for heplifyServer-webApp stack on EKS +home: https://sipcapture.org +keywords: + - voip + - monitoring + - pcap + - sip + - rtp +type: application diff --git a/charts/heplifyServer-webApp-stack-EKS/README b/charts/heplifyServer-webApp-stack-EKS/README new file mode 100644 index 0000000..7f3bae3 --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/README @@ -0,0 +1,18 @@ +# Homer Helmchart on EKS: heplifyServer-webApp-stack +This Homer helm chart contains two components - [heplifyServer](https://github.com/sipcapture/heplify-server) and [webApp](https://github.com/sipcapture/homer-app). +Please refer to the repositories for more information on setting up. + +# Run the command to check all values in values.yaml are set correctly +``` +helm upgrade --install --dry-run --debug -f values.yaml homer . +``` + +# Run the upgrade (or install) command to install helm chart +``` +helm upgrade --install -f values.yaml homer . +``` + +# Clean up +``` +helm uninstall homer +``` \ No newline at end of file diff --git a/charts/heplifyServer-webApp-stack-EKS/templates/heplify-capture-service.yaml b/charts/heplifyServer-webApp-stack-EKS/templates/heplify-capture-service.yaml new file mode 100644 index 0000000..9b28b77 --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/templates/heplify-capture-service.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + service.beta.kubernetes.io/aws-load-balancer-subnets: {{ toYaml .Values.heplifyServer.annotations.subnets }} + service.beta.kubernetes.io/aws-load-balancer-eip-allocations: {{ toYaml .Values.heplifyServer.annotations.eipAllocations }} + service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing + service.beta.kubernetes.io/aws-load-balancer-type: "external" + service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip" + labels: + service: {{ toYaml .Values.heplifyServer.name }} + name: {{ toYaml .Values.heplifyServer.name }}-capture + namespace: {{ toYaml .Values.global.nameSpace }} +spec: + type: LoadBalancer + ports: + - name: 9060-udp + port: 9060 + protocol: UDP + targetPort: 9060 + selector: + service: {{ toYaml .Values.heplifyServer.name }} diff --git a/charts/heplifyServer-webApp-stack-EKS/templates/heplify-server-deployment.yaml b/charts/heplifyServer-webApp-stack-EKS/templates/heplify-server-deployment.yaml new file mode 100644 index 0000000..8a4a1af --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/templates/heplify-server-deployment.yaml @@ -0,0 +1,87 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + service: {{ toYaml .Values.heplifyServer.name }} + name: {{ toYaml .Values.heplifyServer.name }} + namespace: {{ toYaml .Values.global.nameSpace }} +spec: + replicas: {{ toYaml .Values.replicaCount }} + selector: + matchLabels: + service: {{ toYaml .Values.heplifyServer.name }} + strategy: + type: RollingUpdate + template: + metadata: + labels: + service: {{ toYaml .Values.heplifyServer.name }} + spec: +{{- if .Values.global.tolerations }} + tolerations: +{{ toYaml .Values.global.tolerations | indent 8 }} +{{- end }} +{{- if .Values.global.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.nodeSelector | indent 8 }} +{{- end }} + containers: + - args: + - ./heplify-server + env: + - name: HEPLIFYSERVER_ALEGIDS + value: X-CID + - name: HEPLIFYSERVER_DBADDR + value: {{ toYaml .Values.dataBase.dbhost }} + - name: HEPLIFYSERVER_DBBulk + value: "2000" + - name: HEPLIFYSERVER_DBCONFTABLE + value: homer_config + - name: HEPLIFYSERVER_DBDATATABLE + value: homer_data + - name: HEPLIFYSERVER_DBDRIVER + value: {{ toYaml .Values.dataBase.dbDriver }} + - name: HEPLIFYSERVER_DBDROPDAYS + value: "40" + - name: HEPLIFYSERVER_DBDropOnStart + value: "true" + - name: HEPLIFYSERVER_DBPASS + value: {{ toYaml .Values.dataBase.dbPasswd }} + - name: HEPLIFYSERVER_DBROTATE + value: "true" + - name: HEPLIFYSERVER_DBSHEMA + value: homer7 + - name: HEPLIFYSERVER_DBUSER + value: {{ toYaml .Values.dataBase.dbUser }} + - name: HEPLIFYSERVER_DEDUP + value: "false" + - name: HEPLIFYSERVER_FORCEALEGID + value: "true" + - name: HEPLIFYSERVER_HEPADDR + value: 0.0.0.0:9060 + - name: HEPLIFYSERVER_HEPTCPADDR + value: 0.0.0.0:9061 + - name: HEPLIFYSERVER_LOGLVL + value: info + - name: HEPLIFYSERVER_LOGSTD + value: "true" + - name: HEPLIFYSERVER_PROMADDR + value: 0.0.0.0:9096 + - name: HEPLIFYSERVER_PROMTARGETIP + value: {{ toYaml .Values.monitorList.ip }} + - name: HEPLIFYSERVER_PROMTARGETNAME + value: {{ toYaml .Values.monitorList.friendlyName }} + - name: HEPLIFYSERVER_SIPHEADER + value: ruri_user,ruri_domain,from_user,from_domain,from_tag,to_user,to_domain,callid,cseq,method,user_agent + image: {{ toYaml .Values.heplifyServer.spec.image }} + name: {{ toYaml .Values.heplifyServer.name }} + ports: + - containerPort: 9060 + - containerPort: 9060 + protocol: UDP + - containerPort: 9061 + - containerPort: 9096 + - containerPort: 9090 + resources: {} + restartPolicy: Always diff --git a/charts/heplifyServer-webApp-stack-EKS/templates/heplify-server-service.yaml b/charts/heplifyServer-webApp-stack-EKS/templates/heplify-server-service.yaml new file mode 100644 index 0000000..1dd7684 --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/templates/heplify-server-service.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + service: {{ toYaml .Values.heplifyServer.name }} + name: {{ toYaml .Values.heplifyServer.name }} + namespace: {{ toYaml .Values.global.nameSpace }} +spec: + ports: + - name: "9060" + port: 9060 + targetPort: 9060 + - name: 9060-udp + port: 9060 + protocol: UDP + targetPort: 9060 + - name: "9061" + port: 9061 + targetPort: 9061 + - name: "9096" + port: 9096 + targetPort: 9096 + - name: "9090" + port: 9090 + targetPort: 9090 + type: NodePort + selector: + service: {{ toYaml .Values.heplifyServer.name }} \ No newline at end of file diff --git a/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-deployment.yaml b/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-deployment.yaml new file mode 100644 index 0000000..7f2c1c7 --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-deployment.yaml @@ -0,0 +1,43 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + service: {{ toYaml .Values.webApp.name }} + name: {{ toYaml .Values.webApp.name }} + namespace: {{ toYaml .Values.global.nameSpace }} +spec: + replicas: {{ toYaml .Values.replicaCount }} + selector: + matchLabels: + service: {{ toYaml .Values.webApp.name }} + strategy: + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: {{ toYaml .Values.webApp.name }} + service: {{ toYaml .Values.webApp.name }} + spec: +{{- if .Values.global.tolerations }} + tolerations: +{{ toYaml .Values.global.tolerations | indent 8 }} +{{- end }} +{{- if .Values.global.nodeSelector }} + nodeSelector: +{{ toYaml .Values.global.nodeSelector | indent 8 }} +{{- end }} + containers: + - env: + - name: DB_HOST + value: {{ toYaml .Values.dataBase.dbhost }} + - name: DB_PASS + value: {{ toYaml .Values.dataBase.dbPasswd }} + - name: DB_USER + value: {{ toYaml .Values.dataBase.dbUser }} + image: {{ toYaml .Values.webApp.spec.image }} + name: {{ toYaml .Values.webApp.name }} + ports: + - containerPort: 80 + resources: {} + restartPolicy: Always diff --git a/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-ingress.yaml b/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-ingress.yaml new file mode 100644 index 0000000..dfd644a --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-ingress.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kubernetes.io/ingress.class: alb + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/target-type: instance + alb.ingress.kubernetes.io/certificate-arn: {{ toYaml .Values.webApp.annotations.certificateArn }} + labels: + service: {{ toYaml .Values.webApp.name }} + service: {{ toYaml .Values.heplifyServer.name }} + name: {{ toYaml .Values.webApp.name }}-ing + namespace: {{ toYaml .Values.global.nameSpace }} +spec: + rules: + - host: {{ toYaml .Values.webApp.domainName }} + http: + paths: + - backend: + service: + name: {{ toYaml .Values.webApp.name }} + port: + number: 80 + path: "/" + pathType: Prefix \ No newline at end of file diff --git a/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-service.yaml b/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-service.yaml new file mode 100644 index 0000000..4b12f1f --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/templates/homer-webapp-service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + service: {{ toYaml .Values.webApp.name }} + name: {{ toYaml .Values.webApp.name }} + namespace: {{ toYaml .Values.global.nameSpace }} +spec: + ports: + - name: webpage + port: 80 + targetPort: 80 + type: NodePort + selector: + service: {{ toYaml .Values.webApp.name }} \ No newline at end of file diff --git a/charts/heplifyServer-webApp-stack-EKS/values.yaml b/charts/heplifyServer-webApp-stack-EKS/values.yaml new file mode 100644 index 0000000..cfe5455 --- /dev/null +++ b/charts/heplifyServer-webApp-stack-EKS/values.yaml @@ -0,0 +1,47 @@ +replicaCount: 1 +global: + nameSpace: homer-helm + # Set tolerations and nodeselectors if needed + # nodeSelector: + # role: "monitor" + # tolerations: + # - key: "role" + # operator: "Equal" + # value: "monitor" + # effect: "NoSchedule" + +webApp: + domainName: www.example-web.com + name: homer-webapp + annotations: + # Specify the certificate ARN for creating ingress + certificateArn: arn:aws:acm:::certificate/********-****-****-****-************ + spec: + # Build your own image or use the official image sipcapture/webapp + # https://hub.docker.com/r/sipcapture/webapp + image: .dkr.ecr..amazonaws.com//homer-webapp:arm + +heplifyServer: + name: heplify-server + annotations: + # Specify subnetID and EIP ID for creating loadbalancer + # It is important to specify only one subnet and one EIP + # More than one might cause heplify agent failing to send data to heplify server + subnets: subnet-***************** + eipAllocations: eipalloc-***************** + spec: + # Build your own image or use the official image sipcapture/heplify-server + # https://hub.docker.com/r/sipcapture/heplify-server + image: .dkr.ecr..amazonaws.com//homer-heplify-server:arm + +dataBase: + # Host format as domainName:portNumber, ex - www.example.com:1234 + dbhost: www.example-db.com:5432 + dbUser: homerAdmin + dbPasswd: dbPassword + dbDriver: postgres + +monitorList: + # Monitoring target list of ip and friendlyName seperated by comma + ip: 127.0.0.1,192.168.1.1 + friendlyName: localhost,example-servera diff --git a/charts/sipcapture/.DS_Store b/charts/sipcapture/.DS_Store new file mode 100644 index 0000000..8d6a5d0 Binary files /dev/null and b/charts/sipcapture/.DS_Store differ