jicofo: support visitors in jicofo configuration (#1610)

pull/1584/merge
Aaron van Meerten 1 year ago committed by GitHub
parent f860c5d20f
commit 3a77aace56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docker-compose.yml
  2. 43
      jicofo/rootfs/defaults/jicofo.conf

@ -284,6 +284,7 @@ services:
- ENABLE_OCTO - ENABLE_OCTO
- ENABLE_RECORDING - ENABLE_RECORDING
- ENABLE_SCTP - ENABLE_SCTP
- ENABLE_VISITORS
- ENABLE_AUTO_LOGIN - ENABLE_AUTO_LOGIN
- JICOFO_AUTH_LIFETIME - JICOFO_AUTH_LIFETIME
- JICOFO_AUTH_PASSWORD - JICOFO_AUTH_PASSWORD
@ -319,6 +320,9 @@ services:
- SENTRY_ENVIRONMENT - SENTRY_ENVIRONMENT
- SENTRY_RELEASE - SENTRY_RELEASE
- TZ - TZ
- VISITORS_MAX_PARTICIPANTS
- VISITORS_MAX_VISITORS_PER_NODE
- VISITORS_XMPP_SERVER
- XMPP_DOMAIN - XMPP_DOMAIN
- XMPP_AUTH_DOMAIN - XMPP_AUTH_DOMAIN
- XMPP_INTERNAL_MUC_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN

@ -1,4 +1,5 @@
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" -}} {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" -}}
{{ $ENABLE_VISITORS := .Env.ENABLE_VISITORS | default "0" | toBool -}}
{{ $JICOFO_ENABLE_AUTH := .Env.JICOFO_ENABLE_AUTH | default $ENABLE_AUTH | toBool -}} {{ $JICOFO_ENABLE_AUTH := .Env.JICOFO_ENABLE_AUTH | default $ENABLE_AUTH | toBool -}}
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}} {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" -}}
{{ $JICOFO_AUTH_TYPE := .Env.JICOFO_AUTH_TYPE | default $AUTH_TYPE -}} {{ $JICOFO_AUTH_TYPE := .Env.JICOFO_AUTH_TYPE | default $AUTH_TYPE -}}
@ -18,6 +19,9 @@
{{ $JVB_XMPP_INTERNAL_MUC_DOMAIN := .Env.JVB_XMPP_INTERNAL_MUC_DOMAIN | default "muc.jvb.meet.jitsi" -}} {{ $JVB_XMPP_INTERNAL_MUC_DOMAIN := .Env.JVB_XMPP_INTERNAL_MUC_DOMAIN | default "muc.jvb.meet.jitsi" -}}
{{ $JVB_XMPP_PORT := .Env.JVB_XMPP_PORT | default "6222" -}} {{ $JVB_XMPP_PORT := .Env.JVB_XMPP_PORT | default "6222" -}}
{{ $JVB_XMPP_SERVER := .Env.JVB_XMPP_SERVER | default "xmpp.jvb.meet.jitsi" -}} {{ $JVB_XMPP_SERVER := .Env.JVB_XMPP_SERVER | default "xmpp.jvb.meet.jitsi" -}}
{{ $VISITORS_XMPP_SERVER := .Env.VISITORS_XMPP_SERVER | default "" -}}
{{ $VISITORS_XMPP_SERVERS := splitList "," $VISITORS_XMPP_SERVER -}}
{{ $VISITORS_XMPP_PORT := .Env.VISITORS_XMPP_PORT | default "52220" }}
{{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}} {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
{{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}} {{ $XMPP_MUC_DOMAIN := .Env.XMPP_MUC_DOMAIN | default "muc.meet.jitsi" -}}
{{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}} {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
@ -25,6 +29,7 @@
{{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}} {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN | default "recorder.meet.jitsi" -}}
{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}} {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
{{ $ENV := .Env }}
jicofo { jicofo {
{{ if $JICOFO_ENABLE_AUTH }} {{ if $JICOFO_ENABLE_AUTH }}
@ -58,9 +63,16 @@ jicofo {
stress-threshold = "{{ .Env.BRIDGE_STRESS_THRESHOLD }}" stress-threshold = "{{ .Env.BRIDGE_STRESS_THRESHOLD }}"
{{ end }} {{ end }}
{{ if $ENABLE_VISITORS }}
selection-strategy = VisitorSelectionStrategy
visitor-selection-strategy = RegionBasedBridgeSelectionStrategy
participant-selection-strategy = RegionBasedBridgeSelectionStrategy
topology-strategy = VisitorTopologyStrategy
{{ else }}
{{ if .Env.OCTO_BRIDGE_SELECTION_STRATEGY }} {{ if .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}
selection-strategy = "{{ .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}" selection-strategy = "{{ .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}"
{{ end }} {{ end }}
{{ end }}
{{ if .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }} {{ if .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}
health-checks { health-checks {
@ -193,8 +205,39 @@ jicofo {
sctp { sctp {
enabled = {{ $ENABLE_SCTP }} enabled = {{ $ENABLE_SCTP }}
} }
{{ if $ENABLE_VISITORS }}
visitors {
enabled = true
{{ if .Env.VISITORS_MAX_PARTICIPANTS }}
max-participants = {{ .Env.VISITORS_MAX_PARTICIPANTS }}
{{ end }}
{{ if .Env.VISITORS_MAX_VISITORS_PER_NODE }}
max-visitors-per-node = {{ .Env.VISITORS_MAX_VISITORS_PER_NODE }}
{{ end }}
}
{{ end }}
xmpp { xmpp {
{{ if $ENABLE_VISITORS }}
{{ if $.Env.VISITORS_XMPP_SERVER }}
visitors {
{{ range $index, $element := $VISITORS_XMPP_SERVERS -}}
{{ $SERVER := splitn ":" 2 $element }}
v{{ $index }} {
enabled = true
conference-service = conference.v{{ $index }}.{{ $XMPP_DOMAIN }}
hostname = {{ $SERVER._0 }}
{{ $DEFAULT_PORT := add $VISITORS_XMPP_PORT $index }}
port = {{ $SERVER._1 | default $DEFAULT_PORT }}
domain = "{{ $XMPP_AUTH_DOMAIN }}"
xmpp-domain = v{{ $index }}.{{ $XMPP_DOMAIN }}
password = "{{ $ENV.JICOFO_AUTH_PASSWORD }}"
disable-certificate-verification = true
}
{{ end }}
}
{{ end }}
{{ end }}
client { client {
enabled = true enabled = true
hostname = "{{ $XMPP_SERVER }}" hostname = "{{ $XMPP_SERVER }}"

Loading…
Cancel
Save