Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helm chart for a homer heplifyServer-webApp on EKS stack #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
Binary file added charts/.DS_Store
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions charts/heplifyServer-webApp-stack-EKS/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions charts/heplifyServer-webApp-stack-EKS/README
Original file line number Diff line number Diff line change
@@ -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
```
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 }}
47 changes: 47 additions & 0 deletions charts/heplifyServer-webApp-stack-EKS/values.yaml
Original file line number Diff line number Diff line change
@@ -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:<region>:<accountID>:certificate/********-****-****-****-************
spec:
# Build your own image or use the official image sipcapture/webapp
# https://hub.docker.com/r/sipcapture/webapp
image: <accountID>.dkr.ecr.<region>.amazonaws.com/<project>/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: <accountID>.dkr.ecr.<region>.amazonaws.com/<project>/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
Binary file added charts/sipcapture/.DS_Store
Binary file not shown.