feat(scale): enable HPA web - enable pubsub for JVB

master
taktakpeops 4 years ago
parent ecd64556a4
commit d161729e19
  1. 27
      jitsi-meet-examples/aws/jitsi-values.yaml
  2. 28
      jitsi-meet/configs/jvb/sip-communicator.properties
  3. 12
      jitsi-meet/templates/deployment-jvb.yaml
  4. 15
      jitsi-meet/templates/hpa-web.yaml
  5. 11
      jitsi-meet/templates/jvb-sip-config.yaml
  6. 4
      jitsi-meet/templates/service-jvb.yaml
  7. 4
      jitsi-meet/values.yaml

@ -16,11 +16,15 @@ jicofo:
- name: XMPP_INTERNAL_MUC_DOMAIN
value: internal-muc.meet.jitsi
# need JVM optimisation
jvb:
userAuth:
enabled: true
name: "jvb"
secret: dG90bw==
ingress:
enabled: false
replicaCount: 2
environment:
- name: TZ
value: Europe/Amsterdam
@ -77,6 +81,20 @@ web:
- hosts:
- jitsi.meat-project.tk
secretName: jitsi-web
replicaCount: 2
hpa:
enabled: true
minReplicas: 2
maxReplicas: 3
metrics:
- type: Resource
resource:
name: memory
targetAverageUtilization: 70
- type: Resource
resource:
name: cpu
targetAverageUtilization: 70
environment:
- name: XMPP_DOMAIN
value: meet.jitsi
@ -89,4 +107,11 @@ web:
- name: TZ
value: America/Los_Angeles
- name: JVB_TCP_HARVESTER_DISABLED
value: "true"
value: "true"
resources:
limits:
memory: 128Mi
cpu: 50m
requests:
memory: 64Mi
cpu: 15m

@ -0,0 +1,28 @@
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT={{ .Env.JVB_PORT }}
org.jitsi.videobridge.DISABLE_TCP_HARVESTER={{ .Env.JVB_TCP_HARVESTER_DISABLED }}
org.jitsi.videobridge.TCP_HARVESTER_PORT={{ .Env.JVB_TCP_PORT }}
{{ if .Env.JVB_STUN_SERVERS }}
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES={{ .Env.JVB_STUN_SERVERS }}
{{ end }}
{{ $JVB_TCP_PORT := .Env.JVB_TCP_PORT | default "4443" }}
{{ $JVB_TCP_MAPPED_PORT := .Env.JVB_TCP_MAPPED_PORT | default $JVB_TCP_PORT }}
{{ if not (eq $JVB_TCP_PORT $JVB_TCP_MAPPED_PORT) }}
org.jitsi.videobridge.TCP_HARVESTER_MAPPED_PORT={{ $JVB_TCP_MAPPED_PORT }}
{{ end }}
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME={{ .Env.XMPP_SERVER }}
org.jitsi.videobridge.xmpp.user.shard.DOMAIN={{ .Env.XMPP_AUTH_DOMAIN }}
org.jitsi.videobridge.xmpp.user.shard.USERNAME={{ .Env.JVB_AUTH_USER }}
org.jitsi.videobridge.xmpp.user.shard.PASSWORD={{ .Env.JVB_AUTH_PASSWORD }}
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS={{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME={{ .Env.HOSTNAME }}
org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
org.jitsi.videobridge.STATISTICS_INTERVAL=5000
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=pubsub
org.jitsi.videobridge.PUBSUB_SERVICE={{ .Env.XMPP_DOMAIN }}
org.jitsi.videobridge.PUBSUB_NODE=sharedStatsNode

@ -6,6 +6,7 @@ metadata:
labels:
{{ include "jitsi-meet.labels" . | indent 4 }}
spec:
serviceName: {{ include "jitsi-meet.name-jvb" . }}
replicas: {{ .Values.jvb.replicaCount }}
selector:
matchLabels:
@ -68,12 +69,23 @@ spec:
volumeMounts:
- name: dockersock
mountPath: "/var/run/docker.sock"
- name: config
mountPath: "/var/app"
lifecycle:
podStart:
exec:
- /bin/bash
- -c
- cp /var/app/sip-communicator.properties /config/sip-communicator.properties
resources:
{{- toYaml .Values.jvb.resources | nindent 12 }}
volumes:
- name: dockersock
hostPath:
path: /var/run/docker.sock
- name: config
configMap:
name: {{ template "jitsi-meet.name-jvb-config" . }}-cm
{{- with .Values.jvb.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

@ -13,16 +13,9 @@ spec:
maxReplicas: {{ .Values.web.hpa.maxReplicas }}
minReplicas: {{ .Values.web.hpa.minReplicas }}
metrics:
{{- with .Values.web.hpa.targetCPUUtilizationPercentage }}
- type: Resource
{{- range .Values.web.hpa.metrics }}
- type: {{ .type }}
resource:
name: cpu
targetAverageUtilization: {{ . }}
{{- end }}
{{- with .Values.web.hpa.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ . }}
{{- end }}
{{- toYaml .resource | nindent 8 }}
{{- end }}
{{- end }}

@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "jitsi-meet.name-jvb-config" . }}-cm
labels:
{{ include "jitsi-meet.labels" . | indent 4 }}
data:
{{- range $path, $d := .Files.Glob "configs/jvb/*.properties" }}
{{- $path }}: |-
{{- $d | toString | nindent 4 }}
{{- end }}

@ -11,6 +11,10 @@ metadata:
spec:
type: NodePort
externalTrafficPolicy: Local
sessionAffinity: {{ .Values.jvb.service.sessionAffinity }}
{{ if .Values.jvb.service.sessionAffinityConfig }}
{{- toYaml .Values.jvb.service.sessionAffinityConfig }}
{{ end }}
ports:
- port: 30300
protocol: UDP

@ -98,6 +98,10 @@ jvb:
annotations: []
type: NodePort
externalTrafficPolicy: Cluster
sessionAffinity: None
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
ingress:
enabled: false
resources: {}

Loading…
Cancel
Save