mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-01-25 02:08:27 +00:00
Feature/kubernetes deployment (#16)
* initial kubernetes manifests * adding monitoring, WIP * CF: set AWS_REGION in feature server config * v0.7.1 changes * kubernetes: jambonz-monitoring namespace now has everything for standard install (grafana, influxdb, telegraf, homer)
This commit is contained in:
@@ -61,9 +61,7 @@ Parameters:
|
||||
Mappings:
|
||||
AWSRegion2AMI:
|
||||
us-east-1:
|
||||
Ami: ami-01c840e45dc7fa298
|
||||
us-east-2:
|
||||
Ami: ami-03b1d3f36900155bb
|
||||
Ami: ami-035bcc6fac991af1b
|
||||
Resources:
|
||||
VPC:
|
||||
Type: 'AWS::EC2::VPC'
|
||||
@@ -104,6 +102,9 @@ Resources:
|
||||
- >
|
||||
INSTANCE_ID="$(curl -s
|
||||
http://169.254.169.254/latest/meta-data/instance-id)"
|
||||
- >
|
||||
AWS_REGION_NAME="$(curl -s
|
||||
http://169.254.169.254/latest/meta-data/placement/region)"
|
||||
- >
|
||||
NEW_DB_PASSWD="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
|
||||
- >
|
||||
@@ -115,6 +116,9 @@ Resources:
|
||||
- >
|
||||
sudo sed -i -e "s/\(.*\)PRIVATE_IP\(.*\)/\1${PRIVATE_IPV4}\2/g"
|
||||
/home/admin/apps/ecosystem.config.js
|
||||
- >
|
||||
sudo sed -i -e "s/\(.*\)AWS_REGION_NAME\(.*\)/\1${AWS_REGION_NAME}\2/g"
|
||||
/home/admin/apps/ecosystem.config.js
|
||||
- >
|
||||
JAMBONES_ADMIN_INITIAL_PASSWORD=${INSTANCE_ID} JAMBONES_MYSQL_USER=admin
|
||||
JAMBONES_MYSQL_PASSWORD=${NEW_DB_PASSWD} JAMBONES_MYSQL_DATABASE=jambones JAMBONES_MYSQL_HOST=localhost
|
||||
|
||||
1596
cloudformation/jambonz-scalable-production-no-database.yaml
Normal file
1596
cloudformation/jambonz-scalable-production-no-database.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: api-server
|
||||
name: api-server
|
||||
namespace: jambonz
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: api-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: api-server
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
initContainers:
|
||||
- args:
|
||||
- wait
|
||||
- --for=condition=complete
|
||||
- --timeout=300s
|
||||
- job/db-create
|
||||
image: d3fk/kubectl:v1.18
|
||||
name: db-create-wait
|
||||
containers:
|
||||
- name: api-server
|
||||
image: jambonz/jambonz-api-server:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: HTTP_PORT
|
||||
value: "3000"
|
||||
- name: JAMBONE_API_VERSION
|
||||
value: v1
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: JWT_SECRET
|
||||
- name: JAMBONES_MYSQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: MYSQL_PASSWORD
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: api-server
|
||||
namespace: jambonz
|
||||
spec:
|
||||
rules:
|
||||
- host: api.k8s-gcp.jambonz.org
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: api-server
|
||||
port:
|
||||
number: 3000
|
||||
path: /
|
||||
pathType: Prefix
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: api-server
|
||||
name: api-server
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: "api-server"
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: api-server
|
||||
@@ -0,0 +1,39 @@
|
||||
# This file contains the main configuration
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: jambonz-env
|
||||
namespace: jambonz
|
||||
|
||||
data:
|
||||
NODE_ENV: production
|
||||
CLOUD: gcp
|
||||
K8S: "1"
|
||||
K8S_FEATURE_SERVER_SERVICE_NAME: feature-server.jambonz.svc.cluster.local
|
||||
K8S_RTPENGINE_SERVICE_NAME: rtpengine-ng.jambonz.svc.cluster.local:22222
|
||||
K8S_SBC_REGISTER_SERVICE_NAME: sbc-registrar.jambonz.svc.cluster.local:4000
|
||||
K8S_SBC_OPTIONS_SERVICE_NAME: sbc-options.jambonz.svc.cluster.local:4000
|
||||
K8S_SBC_INBOUND_SERVICE_NAME: sbc-inbound.jambonz.svc.cluster.local:4000
|
||||
K8S_SBC_OUTBOUND_SERVICE_NAME: sbc-outbound.jambonz.svc.cluster.local:4000
|
||||
JAMBONES_TIME_SERIES_HOST: influxdb.jambonz-monitoring.svc.cluster.local
|
||||
JAMBONES_NETWORK_CIDR: "10.128.0.0/9,10.72.0.0/14"
|
||||
JAMBONES_CLUSTER_ID: jbeast2
|
||||
JAMBONES_LOGLEVEL: debug
|
||||
ENABLE_METRICS: "1"
|
||||
STATS_HOST: telegraf.jambonz-monitoring.svc.cluster.local
|
||||
STATS_PORT: "8125"
|
||||
STATS_PROTOCOL: tcp
|
||||
STATS_TELEGRAF: "1"
|
||||
STATS_SAMPLE_RATE: "1"
|
||||
JAMBONES_MYSQL_DATABASE: jambones
|
||||
JAMBONES_MYSQL_HOST: mysql
|
||||
JAMBONES_MYSQL_PASSWORD: jambones
|
||||
JAMBONES_MYSQL_USER: jambones
|
||||
JAMBONES_REDIS_HOST: redis
|
||||
JAMBONES_REDIS_PORT: "6379"
|
||||
DRACHTIO_SECRET: cymru
|
||||
DRACHTIO_HOST: "127.0.0.1"
|
||||
DRACHTIO_PORT: "9022"
|
||||
RTPENGINE_DTMF_LOG_PORT: "22223"
|
||||
RTPENGINE_LOG_LEVEL: "7"
|
||||
JWT_SECRET: G=u%-97#TffYf
|
||||
24
kubernetes/manifests/jambonz/db/db-create.yaml
Normal file
24
kubernetes/manifests/jambonz/db/db-create.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: db-create
|
||||
namespace: jambonz
|
||||
spec:
|
||||
backoffLimit: 10
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
sidecar.istio.io/inject: "false"
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: jambonz-secrets
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
image: jambonz/db-create:latest
|
||||
imagePullPolicy: Always
|
||||
name: db
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
restartPolicy: OnFailure
|
||||
@@ -0,0 +1,101 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: feature-server
|
||||
labels:
|
||||
app: feature-server
|
||||
namespace: jambonz
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: feature-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: feature-server
|
||||
spec:
|
||||
initContainers:
|
||||
- args:
|
||||
- wait
|
||||
- --for=condition=complete
|
||||
- --timeout=300s
|
||||
- job/db-create
|
||||
image: d3fk/kubectl:v1.18
|
||||
name: db-create-wait
|
||||
containers:
|
||||
- name: drachtio
|
||||
image: drachtio/drachtio-server:k8s
|
||||
imagePullPolicy: Always
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: [
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"while $(curl --output /dev/null --silent --head --fail-early http://127.0.0.1:3000); do printf '.'; sleep 10; done"
|
||||
]
|
||||
args: ['drachtio', '--contact', 'sip:*:5060;transport=udp,tcp']
|
||||
ports:
|
||||
- containerPort: 9022
|
||||
- name: freeswitch
|
||||
image: drachtio/drachtio-freeswitch-mrf:1.10.5
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: [
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"while $(curl --output /dev/null --silent --head --fail-early http://127.0.0.1:3000); do printf '.'; sleep 10; done"
|
||||
]
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: temp-audio-volume
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
- name: feature-server
|
||||
image: jambonz/feature-server:k8s
|
||||
imagePullPolicy: Always
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3000
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "/opt/app/bin/k8s-pre-stop-hook.js"]
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: temp-audio-volume
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: HTTP_PORT
|
||||
value: "3000"
|
||||
- name: "JAMBONES_FEATURE_SERVERS"
|
||||
value: "localhost:9022:cymru"
|
||||
- name: JAMBONES_FREESWITCH
|
||||
value: "localhost:8021:JambonzR0ck$"
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
- name: JAMBONES_MYSQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: MYSQL_PASSWORD
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: JWT_SECRET
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: temp-audio-volume
|
||||
emptyDir: {}
|
||||
terminationGracePeriodSeconds: 900
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: feature-server
|
||||
name: feature-server
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: sip
|
||||
port: 5060
|
||||
protocol: UDP
|
||||
targetPort: 5060
|
||||
- name: http
|
||||
port: 3000
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: feature-server
|
||||
clusterIP: None
|
||||
36
kubernetes/manifests/jambonz/kustomization.yaml
Normal file
36
kubernetes/manifests/jambonz/kustomization.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: jambonz
|
||||
|
||||
resources:
|
||||
- api-server/api-server-deployment.yaml
|
||||
- api-server/api-server-ingress.yaml
|
||||
- api-server/api-server-service.yaml
|
||||
- db/db-create.yaml
|
||||
- feature-server/feature-server-deployment.yaml
|
||||
- feature-server/feature-server-service.yaml
|
||||
- mysql/mysql-service.yaml
|
||||
- mysql/mysql-statefulset.yaml
|
||||
- rbac/role-binding.yaml
|
||||
- rbac/role.yaml
|
||||
- redis/redis-service.yaml
|
||||
- redis/redis-statefulset.yaml
|
||||
- sbc-rtp/sbc-rtp-daemonset.yaml
|
||||
- sbc-rtp/sbc-rtp-service.yaml
|
||||
- sbc-sip/sbc-sip-configmap.yaml
|
||||
- sbc-sip/sbc-sip-daemonset.yaml
|
||||
- sbc-sip/sbc-inbound-deployment.yaml
|
||||
- sbc-sip/sbc-inbound-service.yaml
|
||||
- sbc-sip/sbc-outbound-deployment.yaml
|
||||
- sbc-sip/sbc-outbound-service.yaml
|
||||
- sbc-sip/sbc-call-router-deployment.yaml
|
||||
- sbc-sip/sbc-call-router-service.yaml
|
||||
- sbc-sip/sbc-register-deployment.yaml
|
||||
- sbc-sip/sbc-register-service.yaml
|
||||
- webapp/webapp-deployment.yaml
|
||||
- webapp/webapp-ingress.yaml
|
||||
- webapp/webapp-service.yaml
|
||||
- secrets/jambonz-secrets.yaml
|
||||
- configmap/jambonz-configmap.yaml
|
||||
- namespace.yaml
|
||||
15
kubernetes/manifests/jambonz/mysql/mysql-service.yaml
Normal file
15
kubernetes/manifests/jambonz/mysql/mysql-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
name: mysql
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: "mysql"
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
selector:
|
||||
app: mysql
|
||||
clusterIP: None
|
||||
68
kubernetes/manifests/jambonz/mysql/mysql-statefulset.yaml
Normal file
68
kubernetes/manifests/jambonz/mysql/mysql-statefulset.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
name: mysql
|
||||
namespace: jambonz
|
||||
spec:
|
||||
serviceName: mysql
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
template:
|
||||
metadata:
|
||||
name: mysql
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
containers:
|
||||
- env:
|
||||
- name: MYSQL_ALLOW_EMPTY_PASSWORD
|
||||
value: "yes"
|
||||
- name: MYSQL_DATABASE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: jambonz-env
|
||||
key: JAMBONES_MYSQL_DATABASE
|
||||
- name: MYSQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: MYSQL_PASSWORD
|
||||
- name: MYSQL_USER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: jambonz-env
|
||||
key: JAMBONES_MYSQL_USER
|
||||
image: mysql
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mysqladmin
|
||||
- ping
|
||||
- -h
|
||||
- 127.0.0.1
|
||||
- --protocol
|
||||
- tcp
|
||||
failureThreshold: 10
|
||||
timeoutSeconds: 5
|
||||
name: mysql
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: mysql-claim
|
||||
restartPolicy: Always
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mysql-claim
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
4
kubernetes/manifests/jambonz/namespace.yaml
Normal file
4
kubernetes/manifests/jambonz/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: jambonz
|
||||
12
kubernetes/manifests/jambonz/rbac/role-binding.yaml
Normal file
12
kubernetes/manifests/jambonz/rbac/role-binding.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: default-binding
|
||||
namespace: jambonz
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: view-jobs
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
17
kubernetes/manifests/jambonz/rbac/role.yaml
Normal file
17
kubernetes/manifests/jambonz/rbac/role.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: view-jobs
|
||||
namespace: jambonz
|
||||
rules:
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- cronjobs
|
||||
- cronjobs/status
|
||||
- jobs
|
||||
- jobs/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
15
kubernetes/manifests/jambonz/redis/redis-service.yaml
Normal file
15
kubernetes/manifests/jambonz/redis/redis-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: "6379"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
clusterIP: None
|
||||
26
kubernetes/manifests/jambonz/redis/redis-statefulset.yaml
Normal file
26
kubernetes/manifests/jambonz/redis/redis-statefulset.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
namespace: jambonz
|
||||
spec:
|
||||
serviceName: redis
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis:alpine
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
48
kubernetes/manifests/jambonz/sbc-rtp/sbc-rtp-daemonset.yaml
Normal file
48
kubernetes/manifests/jambonz/sbc-rtp/sbc-rtp-daemonset.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
namespace: jambonz
|
||||
name: jambonz-sbc-rtp
|
||||
labels:
|
||||
app: jambonz-sbc-rtp
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: jambonz-sbc-rtp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: jambonz-sbc-rtp
|
||||
spec:
|
||||
nodeSelector:
|
||||
voip-environment: edge
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
tolerations:
|
||||
- key: "voip-edge"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- name: rtpengine-sidecar
|
||||
image: jambonz/rtpengine-sidecar:k8s
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
- name: rtpengine
|
||||
image: jambonz/rtpengine:latest
|
||||
args: ['rtpengine', '--homer', 'heplify-server.jambonz-monitoring.svc.cluster.local:9060', '--homer-protocol', 'udp', '--homer-id', '11']
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: LOGLEVEL
|
||||
value: "5"
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
ports:
|
||||
- containerPort: 22222
|
||||
restartPolicy: Always
|
||||
16
kubernetes/manifests/jambonz/sbc-rtp/sbc-rtp-service.yaml
Normal file
16
kubernetes/manifests/jambonz/sbc-rtp/sbc-rtp-service.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: rtpengine-ng
|
||||
name: rtpengine-ng
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: ng
|
||||
port: 22222
|
||||
protocol: UDP
|
||||
targetPort: 22222
|
||||
selector:
|
||||
app: jambonz-sbc-rtp
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,26 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sbc-call-router
|
||||
labels:
|
||||
app: sbc-call-router
|
||||
namespace: jambonz
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sbc-call-router
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-call-router
|
||||
spec:
|
||||
containers:
|
||||
- name: sbc-call-router
|
||||
image: jambonz/sbc-call-router:k8s
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: HTTP_PORT
|
||||
value: "3000"
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-call-router
|
||||
name: sbc-call-router
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: app
|
||||
port: 3000
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: sbc-call-router
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,44 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sbc-inbound
|
||||
labels:
|
||||
app: sbc-inbound
|
||||
namespace: jambonz
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sbc-inbound
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-inbound
|
||||
spec:
|
||||
initContainers:
|
||||
- args:
|
||||
- wait
|
||||
- --for=condition=complete
|
||||
- --timeout=300s
|
||||
- job/db-create
|
||||
image: d3fk/kubectl:v1.18
|
||||
name: db-create-wait
|
||||
containers:
|
||||
- name: sbc-inbound
|
||||
image: jambonz/sbc-inbound:k8s
|
||||
imagePullPolicy: Always
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "/opt/app/bin/k8s-pre-stop-hook.js"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
- name: DRACHTIO_PORT
|
||||
value: "4000"
|
||||
terminationGracePeriodSeconds: 900
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-inbound
|
||||
name: sbc-inbound
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: app
|
||||
port: 3000
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: sbc-inbound
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,44 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sbc-outbound
|
||||
labels:
|
||||
app: sbc-outbound
|
||||
namespace: jambonz
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sbc-outbound
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-outbound
|
||||
spec:
|
||||
initContainers:
|
||||
- args:
|
||||
- wait
|
||||
- --for=condition=complete
|
||||
- --timeout=300s
|
||||
- job/db-create
|
||||
image: d3fk/kubectl:v1.18
|
||||
name: db-create-wait
|
||||
containers:
|
||||
- name: sbc-outbound
|
||||
image: jambonz/sbc-outbound:k8s
|
||||
imagePullPolicy: Always
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "/opt/app/bin/k8s-pre-stop-hook.js"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
- name: DRACHTIO_PORT
|
||||
value: "4000"
|
||||
terminationGracePeriodSeconds: 900
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-outbound
|
||||
name: sbc-outbound
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: app
|
||||
port: 3000
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: sbc-outbound
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,38 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sbc-register
|
||||
labels:
|
||||
app: sbc-register
|
||||
namespace: jambonz
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sbc-register
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-register
|
||||
spec:
|
||||
initContainers:
|
||||
- args:
|
||||
- wait
|
||||
- --for=condition=complete
|
||||
- --timeout=300s
|
||||
- job/db-create
|
||||
image: d3fk/kubectl:v1.18
|
||||
name: db-create-wait
|
||||
containers:
|
||||
- name: sbc-registrar
|
||||
image: jambonz/sbc-registrar:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
- name: DRACHTIO_PORT
|
||||
value: "4000"
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: sbc-registrar
|
||||
name: sbc-registrar
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: app
|
||||
port: 3000
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: sbc-register
|
||||
clusterIP: None
|
||||
26
kubernetes/manifests/jambonz/sbc-sip/sbc-sip-configmap.yaml
Normal file
26
kubernetes/manifests/jambonz/sbc-sip/sbc-sip-configmap.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: jambonz
|
||||
name: jambonz-sbc-sip-conf
|
||||
data:
|
||||
drachtio.conf.xml: |
|
||||
<drachtio>
|
||||
|
||||
<!-- udp port to listen on for client connections and shared secret used to authenticate clients -->
|
||||
<admin port="9022" secret="cymru">0.0.0.0</admin>
|
||||
<request-handlers>
|
||||
<request-handler sip-method="*">http://sbc-call-router.jambonz.svc.cluster.local:3000</request-handler>
|
||||
</request-handlers>
|
||||
<sip>
|
||||
<udp-mtu>4096</udp-mtu>
|
||||
</sip>
|
||||
|
||||
<cdrs>false</cdrs>
|
||||
|
||||
<logging>
|
||||
<sofia-loglevel>3</sofia-loglevel>
|
||||
<loglevel>info</loglevel>
|
||||
</logging>
|
||||
|
||||
</drachtio>
|
||||
77
kubernetes/manifests/jambonz/sbc-sip/sbc-sip-daemonset.yaml
Normal file
77
kubernetes/manifests/jambonz/sbc-sip/sbc-sip-daemonset.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
namespace: jambonz
|
||||
name: jambonz-sbc-sip
|
||||
labels:
|
||||
app: jambonz-sbc-sip
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: jambonz-sbc-sip
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: jambonz-sbc-sip
|
||||
spec:
|
||||
nodeSelector:
|
||||
voip-environment: edge
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
tolerations:
|
||||
- key: "voip-edge"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
initContainers:
|
||||
- args:
|
||||
- wait
|
||||
- --for=condition=complete
|
||||
- --timeout=300s
|
||||
- job/db-create
|
||||
image: d3fk/kubectl:v1.18
|
||||
name: db-create-wait
|
||||
containers:
|
||||
- name: drachtio
|
||||
image: drachtio/drachtio-server:k8s
|
||||
args: ['drachtio', '--loglevel', 'info', '--cloud-deployment', '--sofia-loglevel', '3', '--homer', 'heplify-server.jambonz-monitoring.svc.cluster.local:9060', '--homer-id', '10']
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
ports:
|
||||
- containerPort: 9022
|
||||
protocol: TCP
|
||||
- containerPort: 5060
|
||||
protocol: UDP
|
||||
- containerPort: 5060
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/drachtio.conf.xml
|
||||
name: jambonz-sbc-sip-conf
|
||||
subPath: drachtio.conf.xml
|
||||
- name: sbc-options-handler
|
||||
image: jambonz/sbc-options-handler:k8s
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jambonz-env
|
||||
env:
|
||||
- name: DRACHTIO_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jambonz-secrets
|
||||
key: DRACHTIO_SECRET
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: jambonz-sbc-sip-conf
|
||||
configMap:
|
||||
name: jambonz-sbc-sip-conf
|
||||
items:
|
||||
- key: drachtio.conf.xml
|
||||
path: drachtio.conf.xml
|
||||
11
kubernetes/manifests/jambonz/secrets/jambonz-secrets.yaml
Normal file
11
kubernetes/manifests/jambonz/secrets/jambonz-secrets.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: jambonz-secrets
|
||||
namespace: jambonz
|
||||
type: Opaque
|
||||
data:
|
||||
# use 32 bytes of random value, hex
|
||||
MYSQL_PASSWORD: amFtYm9uZXM=
|
||||
DRACHTIO_SECRET: Y3ltcnU=
|
||||
JWT_SECRET: Rz11JS05NyNUZmZZZg==
|
||||
31
kubernetes/manifests/jambonz/webapp/webapp-deployment.yaml
Normal file
31
kubernetes/manifests/jambonz/webapp/webapp-deployment.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: webapp
|
||||
name: webapp
|
||||
namespace: jambonz
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
containers:
|
||||
- env:
|
||||
- name: REACT_APP_API_BASE_URL
|
||||
value: http://api.k8s-gcp.jambonz.org/v1
|
||||
- name: NODE_OPTIONS
|
||||
value: '--openssl-legacy-provider'
|
||||
image: jambonz/webapp:latest
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 3001
|
||||
resources: {}
|
||||
restartPolicy: Always
|
||||
17
kubernetes/manifests/jambonz/webapp/webapp-ingress.yaml
Normal file
17
kubernetes/manifests/jambonz/webapp/webapp-ingress.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: webapp
|
||||
namespace: jambonz
|
||||
spec:
|
||||
rules:
|
||||
- host: k8s-gcp.jambonz.org
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: webapp
|
||||
port:
|
||||
number: 3001
|
||||
path: /
|
||||
pathType: Prefix
|
||||
15
kubernetes/manifests/jambonz/webapp/webapp-service.yaml
Normal file
15
kubernetes/manifests/jambonz/webapp/webapp-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: webapp
|
||||
name: webapp
|
||||
namespace: jambonz
|
||||
spec:
|
||||
ports:
|
||||
- name: webapp
|
||||
port: 3001
|
||||
targetPort: 3001
|
||||
type: NodePort
|
||||
selector:
|
||||
app: webapp
|
||||
4704
kubernetes/manifests/monitoring/grafana/grafana-configmap.yaml
Normal file
4704
kubernetes/manifests/monitoring/grafana/grafana-configmap.yaml
Normal file
File diff suppressed because it is too large
Load Diff
18
kubernetes/manifests/monitoring/grafana/grafana-ingress.yaml
Normal file
18
kubernetes/manifests/monitoring/grafana/grafana-ingress.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
rules:
|
||||
- host: grafana.k8s-gcp.jambonz.org
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: grafana
|
||||
port:
|
||||
number: 3000
|
||||
path: /
|
||||
pathType: Prefix
|
||||
|
||||
15
kubernetes/manifests/monitoring/grafana/grafana-service.yaml
Normal file
15
kubernetes/manifests/monitoring/grafana/grafana-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: grafana
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
type: NodePort
|
||||
selector:
|
||||
app: grafana
|
||||
@@ -0,0 +1,83 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
serviceName: grafana
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
name: grafana
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 472
|
||||
fsGroup: 472
|
||||
containers:
|
||||
- image: grafana/grafana-oss:latest
|
||||
name: grafana
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /login
|
||||
port: 3000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana-claim
|
||||
- mountPath: /etc/grafana/provisioning/datasources/datasource.yaml
|
||||
name: grafana-provisioning
|
||||
subPath: datasource.yaml
|
||||
- mountPath: /etc/grafana/provisioning/dashboards/default.yaml
|
||||
name: grafana-provisioning
|
||||
subPath: default-dashboard.yaml
|
||||
- mountPath: /var/lib/grafana/dashboards/jambonz-dashboard.json
|
||||
name: grafana-provisioning
|
||||
subPath: jambonz-dashboard.json
|
||||
- mountPath: /var/lib/grafana/dashboards/jambonz-heplify.json
|
||||
name: grafana-provisioning
|
||||
subPath: jambonz-heplify.json
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: grafana-provisioning
|
||||
configMap:
|
||||
name: grafana-provisioning
|
||||
items:
|
||||
- key: datasource.yaml
|
||||
path: datasource.yaml
|
||||
- key: default-dashboard.yaml
|
||||
path: default-dashboard.yaml
|
||||
- key: jambonz-dashboard.json
|
||||
path: jambonz-dashboard.json
|
||||
- key: jambonz-heplify.json
|
||||
path: jambonz-heplify.json
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: grafana-claim
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
@@ -0,0 +1,78 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: jambonz-monitoring
|
||||
name: heplify-server-conf
|
||||
data:
|
||||
heplify-server.toml: |
|
||||
HEPAddr = "0.0.0.0:9060"
|
||||
HEPTCPAddr = ""
|
||||
HEPTLSAddr = "0.0.0.0:9060"
|
||||
HEPWSAddr = "0.0.0.0:3000"
|
||||
ESAddr = ""
|
||||
ESDiscovery = true
|
||||
LokiURL = ""
|
||||
LokiBulk = 200
|
||||
LokiTimer = 4
|
||||
LokiBuffer = 100000
|
||||
LokiHEPFilter = [1,5,100]
|
||||
ForceHEPPayload = []
|
||||
PromAddr = "0.0.0.0:9096"
|
||||
PromTargetIP = ""
|
||||
PromTargetName = ""
|
||||
DBShema = "homer7"
|
||||
DBDriver = "postgres"
|
||||
DBAddr = "postgres:5432"
|
||||
DBUser = "root"
|
||||
DBPass = "homerSeven"
|
||||
DBDataTable = "homer_data"
|
||||
DBConfTable = "homer_config"
|
||||
DBBulk = 200
|
||||
DBTimer = 4
|
||||
DBBuffer = 400000
|
||||
DBWorker = 8
|
||||
DBRotate = true
|
||||
DBPartLog = "2h"
|
||||
DBPartSip = "1h"
|
||||
DBPartQos = "6h"
|
||||
DBDropDays = 14
|
||||
DBDropDaysCall = 0
|
||||
DBDropDaysRegister = 0
|
||||
DBDropDaysDefault = 0
|
||||
DBDropOnStart = false
|
||||
DBUsageProtection = true
|
||||
DBUsageScheme = "percentage"
|
||||
DBPercentageUsage = "80%"
|
||||
DBMaxSize = "30MB"
|
||||
Dedup = false
|
||||
DiscardMethod = []
|
||||
AlegIDs = ["X-CID"]
|
||||
CustomHeader = ["X-Application-Sid", "X-Originating-Carrier", "X-MS-Teams-Tenant-FQDN", "X-Authenticated-User"]
|
||||
SIPHeader = []
|
||||
LogDbg = ""
|
||||
LogLvl = "info"
|
||||
LogStd = false
|
||||
LogSys = false
|
||||
Config = "./heplify-server.toml"
|
||||
ConfigHTTPAddr = ""
|
||||
|
||||
# Examples:
|
||||
# -------------------------------------
|
||||
# ESAddr = "http://127.0.0.1:9200"
|
||||
# DBShema = "homer7"
|
||||
# DBDriver = "postgres"
|
||||
# LokiURL = "http://localhost:3100/api/prom/push"
|
||||
# LokiHEPFilter = [1,5,100]
|
||||
# PromAddr = "0.0.0.0:8899"
|
||||
# PromTargetIP = "10.1.2.111,10.1.2.4,10.1.2.5,10.1.2.6,10.12.44.222"
|
||||
# PromTargetName = "sbc_access,sbc_core,kamailio,asterisk,pstn_gateway"
|
||||
# AlegIDs = ["X-CID","P-Charging-Vector,icid-value=\"?(.*?)(?:\"|;|$)","X-BroadWorks-Correlation-Info"]
|
||||
# DiscardMethod = ["OPTIONS","NOTIFY"]
|
||||
# CustomHeader = ["X-CustomerIP","X-Billing"]
|
||||
# SIPHeader = ["callid","callid_aleg","method","ruri_user","ruri_domain","from_user","from_domain","from_tag","to_user","to_domain","to_tag","via","contact_user"]
|
||||
# LogDbg = "hep,sql,loki"
|
||||
# LogLvl = "warning"
|
||||
# ConfigHTTPAddr = "0.0.0.0:9876"
|
||||
# -------------------------------------
|
||||
# To hot reload PromTargetIP and PromTargetName run:
|
||||
# killall -HUP heplify-server
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: heplify-server
|
||||
name: heplify-server
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: "heplify-server"
|
||||
port: 9060
|
||||
targetPort: 9060
|
||||
protocol: UDP
|
||||
- name: "stats-scraper"
|
||||
port: 9096
|
||||
targetPort: 9096
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: heplify-server
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: heplify-server
|
||||
labels:
|
||||
app: heplify-server
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
serviceName: heplify-server
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: heplify-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: heplify-server
|
||||
spec:
|
||||
containers:
|
||||
- name: heplify-server
|
||||
image: sipcapture/heplify-server:master
|
||||
args: ['./heplify-server', '-config', '/etc/heplify-server.toml']
|
||||
ports:
|
||||
- containerPort: 9060
|
||||
protocol: UDP
|
||||
- containerPort: 9096
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/heplify-server.toml
|
||||
name: heplify-server-conf
|
||||
subPath: heplify-server.toml
|
||||
volumes:
|
||||
- name: heplify-server-conf
|
||||
configMap:
|
||||
name: heplify-server-conf
|
||||
items:
|
||||
- key: heplify-server.toml
|
||||
path: heplify-server.toml
|
||||
15
kubernetes/manifests/monitoring/homer/postgres-service.yaml
Normal file
15
kubernetes/manifests/monitoring/homer/postgres-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
name: postgres
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: "postgres"
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
selector:
|
||||
app: postgres
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
name: postgres
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
serviceName: postgres
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
name: postgres
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- image: postgres:11-alpine
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: homerSeven
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql
|
||||
name: postgres-claim
|
||||
restartPolicy: Always
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres-claim
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
||||
143
kubernetes/manifests/monitoring/homer/webapp-configmap.yaml
Normal file
143
kubernetes/manifests/monitoring/homer/webapp-configmap.yaml
Normal file
@@ -0,0 +1,143 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: jambonz-monitoring
|
||||
name: webapp-conf
|
||||
data:
|
||||
bootstrapped: |
|
||||
bootstrapping
|
||||
webapp_config.json: |
|
||||
{
|
||||
"auth_settings": {
|
||||
"_comment": "The type param can be internal, ldap, http_auth",
|
||||
"token_expire": 1200,
|
||||
"type": "internal"
|
||||
},
|
||||
"database_config": {
|
||||
"help": "Settings for PGSQL Database (settings)",
|
||||
"host": "postgres",
|
||||
"keepalive": true,
|
||||
"name": "homer_config",
|
||||
"node": "LocalConfig",
|
||||
"pass": "homerSeven",
|
||||
"user": "root"
|
||||
},
|
||||
"database_data": {
|
||||
"localnode": {
|
||||
"help": "Settings for PGSQL Database (data)",
|
||||
"host": "postgres",
|
||||
"keepalive": true,
|
||||
"name": "homer_data",
|
||||
"node": "LocalNode",
|
||||
"pass": "homerSeven",
|
||||
"user": "root"
|
||||
}
|
||||
},
|
||||
"decoder_shark": {
|
||||
"_comment": "Here you can do packet decoding to using tshark application. Please define uid, gid if you run the app under root",
|
||||
"active": false,
|
||||
"bin": "/usr/bin/tshark",
|
||||
"protocols": [
|
||||
"1_call",
|
||||
"1_registration",
|
||||
"1_default"
|
||||
]
|
||||
},
|
||||
"grafana_config": {
|
||||
"help": "Settings for Grafana",
|
||||
"host": "http://grafana:3000",
|
||||
"path": "/grafana",
|
||||
"token": ""
|
||||
},
|
||||
"hep_relay": {
|
||||
"help": "UDP socket to send HEP data on",
|
||||
"host": "heplify-server",
|
||||
"port": 9060
|
||||
},
|
||||
"http_auth": {
|
||||
"skipverify": true,
|
||||
"url": "http://localhost:1323"
|
||||
},
|
||||
"http_settings": {
|
||||
"debug": false,
|
||||
"gzip": true,
|
||||
"gzip_static": true,
|
||||
"help": "Settings for the HOMER Webapp Server. If you have gzip_static = false, please be sure that your dist directory has uncompressed .js files",
|
||||
"host": "0.0.0.0",
|
||||
"port": 80,
|
||||
"root": "/usr/local/homer/dist"
|
||||
},
|
||||
"https_settings": {
|
||||
"cert": "/usr/local/homer/tls/cert.pem",
|
||||
"enable": false,
|
||||
"help": "SSL settings for homer-app",
|
||||
"host": "0.0.0.0",
|
||||
"key": "/usr/local/homer/tls/key.pem",
|
||||
"port": 443
|
||||
},
|
||||
"influxdb_config": {
|
||||
"database": "homer",
|
||||
"help": "Settings for InfluxDB Database (optional)",
|
||||
"host": "http://influxdb:8086",
|
||||
"name": "homer_config",
|
||||
"pass": "influx_password",
|
||||
"policy": "autogen",
|
||||
"user": "influx_user"
|
||||
},
|
||||
"ldap_config": {
|
||||
"admingroup": "admin",
|
||||
"adminmode": true,
|
||||
"anonymous": false,
|
||||
"attributes": [
|
||||
"dn",
|
||||
"givenName",
|
||||
"sn",
|
||||
"mail",
|
||||
"uid"
|
||||
],
|
||||
"base": "dc=example,dc=com",
|
||||
"binddn": "uid=readonlysuer,ou=People,dc=example,dc=com",
|
||||
"bindpassword": "readonlypassword",
|
||||
"groupattribute": "cn",
|
||||
"groupfilter": "(memberUid=%s)",
|
||||
"host": "ldap.example.com",
|
||||
"port": 389,
|
||||
"skiptls": true,
|
||||
"skipverify": true,
|
||||
"userdn": "uid=%s,ou=People,dc=example,dc=com",
|
||||
"userfilter": "(uid=%s)",
|
||||
"usergroup": "HOMER_user",
|
||||
"usermode": true,
|
||||
"usessl": false
|
||||
},
|
||||
"loki_config": {
|
||||
"api": "loki/api/v1",
|
||||
"help": "Settings for LOKI Database (optional)",
|
||||
"host": "http://127.0.0.1:3100",
|
||||
"param_query": "query_range",
|
||||
"pass": "admin",
|
||||
"user": "admin"
|
||||
},
|
||||
"prometheus_config": {
|
||||
"api": "api/v1",
|
||||
"help": "Settings for Prometheus Database (optional)",
|
||||
"host": "http://127.0.0.1:9090",
|
||||
"pass": "admin",
|
||||
"user": "admin"
|
||||
},
|
||||
"system_settings": {
|
||||
"_loglevels": "can be: fatal, error, warn, info, debug, trace",
|
||||
"help": "Settings for HOMER logs",
|
||||
"hostname": "ip-172-31-23-156",
|
||||
"loglevel": "debug",
|
||||
"logname": "homer-app.log",
|
||||
"logpath": "/usr/local/homer/log",
|
||||
"logstdout": true,
|
||||
"uuid": "4bd92b25-0dd8-4326-a984-08da79dcc569"
|
||||
},
|
||||
"transaction_settings": {
|
||||
"deduplicate": {
|
||||
"global": false
|
||||
}
|
||||
}
|
||||
}
|
||||
46
kubernetes/manifests/monitoring/homer/webapp-deployment.yaml
Normal file
46
kubernetes/manifests/monitoring/homer/webapp-deployment.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: homer-webapp
|
||||
name: homer-webapp
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: homer-webapp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: homer-webapp
|
||||
spec:
|
||||
containers:
|
||||
- name: homer-webapp
|
||||
image: sipcapture/webapp:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
env:
|
||||
- name: DB_HOST
|
||||
value: postgres
|
||||
- name: DB_USER
|
||||
value: root
|
||||
- name: DB_PASS
|
||||
value: homerSeven
|
||||
volumeMounts:
|
||||
- mountPath: /usr/local/homer/etc/webapp_config.json
|
||||
name: webapp-conf
|
||||
subPath: webapp_config.json
|
||||
- mountPath: /homer-semaphore/.bootstrapped
|
||||
name: webapp-conf
|
||||
subPath: bootstrapped
|
||||
volumes:
|
||||
- name: webapp-conf
|
||||
configMap:
|
||||
name: webapp-conf
|
||||
items:
|
||||
- key: webapp_config.json
|
||||
path: webapp_config.json
|
||||
- key: bootstrapped
|
||||
path: bootstrapped
|
||||
18
kubernetes/manifests/monitoring/homer/webapp-ingress.yaml
Normal file
18
kubernetes/manifests/monitoring/homer/webapp-ingress.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: homer-webapp
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
rules:
|
||||
- host: homer.k8s-gcp.jambonz.org
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: homer-webapp
|
||||
port:
|
||||
number: 80
|
||||
path: /
|
||||
pathType: Prefix
|
||||
|
||||
15
kubernetes/manifests/monitoring/homer/webapp-service.yaml
Normal file
15
kubernetes/manifests/monitoring/homer/webapp-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: homer-webapp
|
||||
name: homer-webapp
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: homer-webapp
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: NodePort
|
||||
selector:
|
||||
app: homer-webapp
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: influxdb
|
||||
name: influxdb
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: "influxdb"
|
||||
port: 8086
|
||||
targetPort: 8086
|
||||
selector:
|
||||
app: influxdb
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: influxdb
|
||||
name: influxdb
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
serviceName: influxdb
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: influxdb
|
||||
template:
|
||||
metadata:
|
||||
name: influxdb
|
||||
labels:
|
||||
app: influxdb
|
||||
spec:
|
||||
containers:
|
||||
- image: influxdb:1.8
|
||||
name: influxdb
|
||||
env:
|
||||
- name: INFLUXDB_LOGGING_LEVEL
|
||||
value: info
|
||||
ports:
|
||||
- containerPort: 8086
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/influxdb
|
||||
name: influxdb-claim
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: 8086
|
||||
initialDelaySeconds: 90
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: 8086
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
restartPolicy: Always
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: influxdb-claim
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
25
kubernetes/manifests/monitoring/kustomization.yaml
Normal file
25
kubernetes/manifests/monitoring/kustomization.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: jambonz-monitoring
|
||||
|
||||
resources:
|
||||
- influxdb/influxdb-statefulset.yaml
|
||||
- influxdb/influxdb-service.yaml
|
||||
- grafana/grafana-configmap.yaml
|
||||
- grafana/grafana-statefulset.yaml
|
||||
- grafana/grafana-service.yaml
|
||||
- grafana/grafana-ingress.yaml
|
||||
- telegraf/telegraf-statefulset.yaml
|
||||
- telegraf/telegraf-service.yaml
|
||||
- telegraf/telegraf-configmap.yaml
|
||||
- homer/postgres-statefulset.yaml
|
||||
- homer/postgres-service.yaml
|
||||
- homer/heplify-server-configmap.yaml
|
||||
- homer/heplify-server-statefulset.yaml
|
||||
- homer/heplify-server-service.yaml
|
||||
- homer/webapp-configmap.yaml
|
||||
- homer/webapp-deployment.yaml
|
||||
- homer/webapp-service.yaml
|
||||
- homer/webapp-ingress.yaml
|
||||
- namespace.yaml
|
||||
4
kubernetes/manifests/monitoring/namespace.yaml
Normal file
4
kubernetes/manifests/monitoring/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: jambonz-monitoring
|
||||
281
kubernetes/manifests/monitoring/telegraf/telegraf-configmap.yaml
Normal file
281
kubernetes/manifests/monitoring/telegraf/telegraf-configmap.yaml
Normal file
@@ -0,0 +1,281 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: jambonz-monitoring
|
||||
name: telegraf-conf
|
||||
data:
|
||||
telegraf.conf: |
|
||||
# Global tags can be specified here in key="value" format.
|
||||
[global_tags]
|
||||
# dc = "us-east-1" # will tag all metrics with dc=us-east-1
|
||||
# rack = "1a"
|
||||
## Environment variables can be used as tags, and throughout the config file
|
||||
# user = "$USER"
|
||||
|
||||
|
||||
# Configuration for telegraf agent
|
||||
[agent]
|
||||
## Default data collection interval for all inputs
|
||||
interval = "10s"
|
||||
## Rounds collection interval to 'interval'
|
||||
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
|
||||
round_interval = true
|
||||
|
||||
## Telegraf will send metrics to outputs in batches of at most
|
||||
## metric_batch_size metrics.
|
||||
## This controls the size of writes that Telegraf sends to output plugins.
|
||||
metric_batch_size = 1000
|
||||
|
||||
## Maximum number of unwritten metrics per output. Increasing this value
|
||||
## allows for longer periods of output downtime without dropping metrics at the
|
||||
## cost of higher maximum memory usage.
|
||||
metric_buffer_limit = 10000
|
||||
|
||||
## Collection jitter is used to jitter the collection by a random amount.
|
||||
## Each plugin will sleep for a random time within jitter before collecting.
|
||||
## This can be used to avoid many plugins querying things like sysfs at the
|
||||
## same time, which can have a measurable effect on the system.
|
||||
collection_jitter = "0s"
|
||||
|
||||
## Default flushing interval for all outputs. Maximum flush_interval will be
|
||||
## flush_interval + flush_jitter
|
||||
flush_interval = "10s"
|
||||
## Jitter the flush interval by a random amount. This is primarily to avoid
|
||||
## large write spikes for users running a large number of telegraf instances.
|
||||
## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
|
||||
flush_jitter = "0s"
|
||||
|
||||
## By default or when set to "0s", precision will be set to the same
|
||||
## timestamp order as the collection interval, with the maximum being 1s.
|
||||
## ie, when interval = "10s", precision will be "1s"
|
||||
## when interval = "250ms", precision will be "1ms"
|
||||
## Precision will NOT be used for service inputs. It is up to each individual
|
||||
## service input to set the timestamp at the appropriate precision.
|
||||
## Valid time units are "ns", "us" (or "µs"), "ms", "s".
|
||||
precision = ""
|
||||
|
||||
## Log at debug level.
|
||||
# debug = false
|
||||
## Log only error level messages.
|
||||
# quiet = false
|
||||
|
||||
## Log target controls the destination for logs and can be one of "file",
|
||||
## "stderr" or, on Windows, "eventlog". When set to "file", the output file
|
||||
## is determined by the "logfile" setting.
|
||||
# logtarget = "file"
|
||||
|
||||
## Name of the file to be logged to when using the "file" logtarget. If set to
|
||||
## the empty string then logs are written to stderr.
|
||||
# logfile = ""
|
||||
|
||||
## The logfile will be rotated after the time interval specified. When set
|
||||
## to 0 no time based rotation is performed. Logs are rotated only when
|
||||
## written to, if there is no log activity rotation may be delayed.
|
||||
# logfile_rotation_interval = "0d"
|
||||
|
||||
## The logfile will be rotated when it becomes larger than the specified
|
||||
## size. When set to 0 no size based rotation is performed.
|
||||
# logfile_rotation_max_size = "0MB"
|
||||
|
||||
## Maximum number of rotated archives to keep, any older logs are deleted.
|
||||
## If set to -1, no archives are removed.
|
||||
# logfile_rotation_max_archives = 5
|
||||
|
||||
## Override default hostname, if empty use os.Hostname()
|
||||
hostname = ""
|
||||
## If set to true, do no set the "host" tag in the telegraf agent.
|
||||
omit_hostname = false
|
||||
|
||||
|
||||
###############################################################################
|
||||
# OUTPUT PLUGINS #
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Configuration for sending metrics to InfluxDB
|
||||
[[outputs.influxdb]]
|
||||
urls = ["http://influxdb.jambonz-monitoring.svc.cluster.local:8086/"] # required
|
||||
database = "telegraf" # required
|
||||
retention_policy = "autogen"
|
||||
write_consistency = "any"
|
||||
timeout = "5s"
|
||||
namedrop = ["hep*"]
|
||||
|
||||
[[outputs.influxdb]]
|
||||
urls = ["http://influxdb.jambonz-monitoring.svc.cluster.local:8086/"] # required
|
||||
database = "homer" # required
|
||||
retention_policy = ""
|
||||
write_consistency = "any"
|
||||
timeout = "5s"
|
||||
namepass = ["hep*"]
|
||||
|
||||
## The full HTTP or UDP URL for your InfluxDB instance.
|
||||
##
|
||||
## Multiple URLs can be specified for a single cluster, only ONE of the
|
||||
## urls will be written to each interval.
|
||||
# urls = ["unix:///var/run/influxdb.sock"]
|
||||
# urls = ["udp://127.0.0.1:8089"]
|
||||
# urls = ["http://127.0.0.1:8086"]
|
||||
|
||||
## The target database for metrics; will be created as needed.
|
||||
## For UDP url endpoint database needs to be configured on server side.
|
||||
# database = "telegraf"
|
||||
|
||||
## The value of this tag will be used to determine the database. If this
|
||||
## tag is not set the 'database' option is used as the default.
|
||||
# database_tag = ""
|
||||
|
||||
## If true, the 'database_tag' will not be included in the written metric.
|
||||
# exclude_database_tag = false
|
||||
|
||||
## If true, no CREATE DATABASE queries will be sent. Set to true when using
|
||||
## Telegraf with a user without permissions to create databases or when the
|
||||
## database already exists.
|
||||
# skip_database_creation = false
|
||||
|
||||
## Name of existing retention policy to write to. Empty string writes to
|
||||
## the default retention policy. Only takes effect when using HTTP.
|
||||
# retention_policy = ""
|
||||
|
||||
## The value of this tag will be used to determine the retention policy. If this
|
||||
## tag is not set the 'retention_policy' option is used as the default.
|
||||
# retention_policy_tag = ""
|
||||
|
||||
## If true, the 'retention_policy_tag' will not be included in the written metric.
|
||||
# exclude_retention_policy_tag = false
|
||||
|
||||
## Write consistency (clusters only), can be: "any", "one", "quorum", "all".
|
||||
## Only takes effect when using HTTP.
|
||||
# write_consistency = "any"
|
||||
|
||||
## Timeout for HTTP messages.
|
||||
# timeout = "5s"
|
||||
|
||||
## HTTP Basic Auth
|
||||
# username = "telegraf"
|
||||
# password = "metricsmetricsmetricsmetrics"
|
||||
|
||||
## HTTP User-Agent
|
||||
# user_agent = "telegraf"
|
||||
|
||||
## UDP payload size is the maximum packet size to send.
|
||||
# udp_payload = "512B"
|
||||
|
||||
## Optional TLS Config for use on HTTP connections.
|
||||
# tls_ca = "/etc/telegraf/ca.pem"
|
||||
# tls_cert = "/etc/telegraf/cert.pem"
|
||||
# tls_key = "/etc/telegraf/key.pem"
|
||||
## Use TLS but skip chain & host verification
|
||||
# insecure_skip_verify = false
|
||||
|
||||
## HTTP Proxy override, if unset values the standard proxy environment
|
||||
## variables are consulted to determine which proxy, if any, should be used.
|
||||
# http_proxy = "http://corporate.proxy:3128"
|
||||
|
||||
## Additional HTTP headers
|
||||
# http_headers = {"X-Special-Header" = "Special-Value"}
|
||||
|
||||
## HTTP Content-Encoding for write request body, can be set to "gzip" to
|
||||
## compress body or "identity" to apply no encoding.
|
||||
# content_encoding = "gzip"
|
||||
|
||||
## When true, Telegraf will output unsigned integers as unsigned values,
|
||||
## i.e.: "42u". You will need a version of InfluxDB supporting unsigned
|
||||
## integer values. Enabling this option will result in field type errors if
|
||||
## existing data has been written.
|
||||
# influx_uint_support = false
|
||||
|
||||
###############################################################################
|
||||
# INPUT PLUGINS #
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Read metrics about cpu usage
|
||||
[[inputs.cpu]]
|
||||
## Whether to report per-cpu stats or not
|
||||
percpu = true
|
||||
## Whether to report total system cpu stats or not
|
||||
totalcpu = true
|
||||
## If true, collect raw CPU time metrics.
|
||||
collect_cpu_time = false
|
||||
## If true, compute and report the sum of all non-idle CPU states.
|
||||
report_active = false
|
||||
|
||||
|
||||
# Read metrics about disk usage by mount point
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
# Get kernel statistics from /proc/stat
|
||||
[[inputs.kernel]]
|
||||
# no configuration
|
||||
|
||||
# Read metrics about memory usage
|
||||
[[inputs.mem]]
|
||||
# no configuration
|
||||
|
||||
|
||||
# Get the number of processes and group them by status
|
||||
[[inputs.processes]]
|
||||
# no configuration
|
||||
|
||||
|
||||
# Read metrics about swap memory usage
|
||||
[[inputs.swap]]
|
||||
# no configuration
|
||||
|
||||
# Read metrics about system load & uptime
|
||||
[[inputs.system]]
|
||||
## Uncomment to remove deprecated metrics.
|
||||
# fielddrop = ["uptime_format"]
|
||||
|
||||
|
||||
# # Monitor process cpu and memory usage
|
||||
[[inputs.procstat]]
|
||||
exe = "freeswitch"
|
||||
|
||||
[[inputs.procstat]]
|
||||
exe = "rtpengine"
|
||||
|
||||
[[inputs.procstat]]
|
||||
exe = "drachtio"
|
||||
|
||||
[[inputs.procstat]]
|
||||
exe = "node"
|
||||
|
||||
[[inputs.socket_listener]]
|
||||
service_address = "udp://127.0.0.1:8094"
|
||||
data_format = "influx"
|
||||
|
||||
[[inputs.socket_listener]]
|
||||
service_address = "tcp://127.0.0.1:8094"
|
||||
data_format = "influx"
|
||||
|
||||
# scrape stats from heplify-server
|
||||
[[inputs.prometheus]]
|
||||
urls = ["http://heplify-server:9096/metrics"]
|
||||
namedrop = ["go*","process*","promhttp*"]
|
||||
|
||||
# # Statsd UDP/TCP Server
|
||||
[[inputs.statsd]]
|
||||
protocol = "tcp"
|
||||
max_tcp_connections = 250
|
||||
tcp_keep_alive = false
|
||||
# tcp_keep_alive_period = "2h"
|
||||
service_address = ":8125"
|
||||
delete_gauges = true
|
||||
delete_counters = true
|
||||
delete_sets = true
|
||||
delete_timings = true
|
||||
## Percentiles to calculate for timing & histogram stats.
|
||||
percentiles = [50.0, 75.0, 95.0, 99.0, 99.95, 100.0]
|
||||
metric_separator = "_"
|
||||
datadog_extensions = true
|
||||
allowed_pending_messages = 10000
|
||||
percentile_limit = 1000
|
||||
# read_buffer_size = 65535
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: telegraf
|
||||
name: telegraf
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: telegraf
|
||||
port: 8125
|
||||
targetPort: 8125
|
||||
selector:
|
||||
app: telegraf
|
||||
clusterIP: None
|
||||
@@ -0,0 +1,37 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: telegraf
|
||||
name: telegraf
|
||||
namespace: jambonz-monitoring
|
||||
spec:
|
||||
serviceName: telegraf
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: telegraf
|
||||
template:
|
||||
metadata:
|
||||
name: telegraf
|
||||
labels:
|
||||
app: telegraf
|
||||
spec:
|
||||
containers:
|
||||
- image: telegraf:1.19
|
||||
name: telegraf
|
||||
ports:
|
||||
- containerPort: 8125
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/telegraf/telegraf.conf
|
||||
name: telegraf-conf
|
||||
subPath: telegraf.conf
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: telegraf-conf
|
||||
configMap:
|
||||
name: telegraf-conf
|
||||
items:
|
||||
- key: telegraf.conf
|
||||
path: telegraf.conf
|
||||
@@ -16,8 +16,7 @@ module.exports = {
|
||||
GOOGLE_APPLICATION_CREDENTIALS: '/home/admin/credentials/$${GOOGLE_APPLICATION_CREDENTIALS}',
|
||||
AWS_ACCESS_KEY_ID: '${AWS_ACCESS_KEY_ID}',
|
||||
AWS_SECRET_ACCESS_KEY: '${AWS_SECRET_ACCESS_KEY}',
|
||||
AWS_REGION: '$${AWS_REGION}',
|
||||
ENABLE_DATADOG_METRICS: 0,
|
||||
AWS_REGION: '${AWS_REGION}',
|
||||
ENABLE_DATADOG_METRICS: 0,
|
||||
JAMBONES_NETWORK_CIDR: '172.31.32.0/24',
|
||||
JAMBONES_MYSQL_HOST: '${JAMBONES_MYSQL_HOST}',
|
||||
|
||||
@@ -271,6 +271,7 @@ module.exports = {
|
||||
STATS_PORT: 8125,
|
||||
STATS_PROTOCOL: 'tcp',
|
||||
STATS_TELEGRAF: 1,
|
||||
AWS_REGION: 'AWS_REGION_NAME',
|
||||
JAMBONES_NETWORK_CIDR: 'PRIVATE_IP/32',
|
||||
JAMBONES_MYSQL_HOST: '127.0.0.1',
|
||||
JAMBONES_MYSQL_USER: 'admin',
|
||||
|
||||
@@ -22,7 +22,7 @@ tar xvfz SpeechSDK-Linux-1.19.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.19.0
|
||||
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
sudo ln -s /usr/local/lib/MicrosoftSpeechSDK/lib/x64/libMicrosoft.CognitiveServices.Speech.core.so /usr/local/lib/libMicrosoft.CognitiveServices.Speech.core.so
|
||||
sudo ln -s /usr/local/lib/MicrosoftSpeechSDK/x64/libMicrosoft.CognitiveServices.Speech.core.so /usr/local/lib/libMicrosoft.CognitiveServices.Speech.core.so
|
||||
cd
|
||||
rm -Rf /tmpSpeechSDK-Linux-1.19.0
|
||||
rm -Rf /tmpSpeechSDK-Linux-1.19.0.tar.gz
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz all-in-one AMI",
|
||||
"instance_type": "t2.xlarge",
|
||||
"drachtio_version": "v0.8.13-rc1",
|
||||
"jambonz_version": "v0.7.0",
|
||||
"jambonz_version": "v0.7.1",
|
||||
"jambonz_user": "admin",
|
||||
"jambonz_password": "JambonzR0ck$",
|
||||
"install_telegraf": "yes",
|
||||
|
||||
@@ -3,6 +3,7 @@ apiVersion: 1
|
||||
providers:
|
||||
- name: Default
|
||||
type: file
|
||||
allowUiUpdates: true
|
||||
folder: 'jambonz'
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@
|
||||
"gnetId": 5955,
|
||||
"graphTooltip": 1,
|
||||
"id": 4,
|
||||
"iteration": 1604669735342,
|
||||
"iteration": 1639950297319,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
@@ -1390,7 +1390,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -1538,7 +1538,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -1677,7 +1677,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -1817,7 +1817,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -1966,7 +1966,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -2108,7 +2108,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -2261,7 +2261,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -2414,7 +2414,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -2567,7 +2567,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -2725,7 +2725,7 @@
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -2873,7 +2873,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -3005,7 +3005,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -3139,7 +3139,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -3331,7 +3331,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -3523,7 +3523,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -3726,7 +3726,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -3916,7 +3916,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -4109,7 +4109,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -4247,7 +4247,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -4494,7 +4494,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -4680,7 +4680,7 @@
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.3.1",
|
||||
"pluginVersion": "7.4.0",
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
@@ -4828,7 +4828,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 26,
|
||||
"schemaVersion": 27,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"influxdb",
|
||||
@@ -4844,6 +4844,7 @@
|
||||
"value": "InfluxDB"
|
||||
},
|
||||
"datasource": "InfluxDB-Telegraf",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
@@ -4863,14 +4864,15 @@
|
||||
"selected": true,
|
||||
"tags": [],
|
||||
"text": [
|
||||
"ip-172-31-33-65"
|
||||
"ip-172-31-0-10"
|
||||
],
|
||||
"value": [
|
||||
"ip-172-31-33-65"
|
||||
"ip-172-31-0-10"
|
||||
]
|
||||
},
|
||||
"datasource": "InfluxDB-Telegraf",
|
||||
"definition": "",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
@@ -4899,6 +4901,7 @@
|
||||
"value": "$__auto_interval_inter"
|
||||
},
|
||||
"datasource": null,
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
@@ -5011,6 +5014,7 @@
|
||||
},
|
||||
"datasource": "$datasource",
|
||||
"definition": "",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
@@ -5038,6 +5042,7 @@
|
||||
},
|
||||
"datasource": "$datasource",
|
||||
"definition": "",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
@@ -5065,6 +5070,7 @@
|
||||
},
|
||||
"datasource": "$datasource",
|
||||
"definition": "",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
|
||||
Reference in New Issue
Block a user