jicofo: migrate to new config

pull/934/head
prayagsingh 4 years ago committed by Saúl Ibarra Corretgé
parent 12823cbab0
commit 0f541c8241
  1. 33
      docker-compose.yml
  2. 136
      jicofo/rootfs/defaults/jicofo.conf
  3. 34
      jicofo/rootfs/defaults/sip-communicator.properties
  4. 5
      jicofo/rootfs/etc/cont-init.d/10-config
  5. 2
      jicofo/rootfs/etc/services.d/jicofo/run

@ -178,22 +178,37 @@ services:
- ${CONFIG}/jicofo:/config:Z
environment:
- AUTH_TYPE
- BRIDGE_AVG_PARTICIPANT_STRESS
- BRIDGE_STRESS_THRESHOLD
- ENABLE_AUTH
- XMPP_DOMAIN
- XMPP_AUTH_DOMAIN
- XMPP_INTERNAL_MUC_DOMAIN
- XMPP_MUC_DOMAIN
- XMPP_SERVER
- ENABLE_AUTO_OWNER
- ENABLE_CODEC_VP8
- ENABLE_CODEC_VP9
- ENABLE_CODEC_H264
- ENABLE_RECORDING
- ENABLE_SCTP
- JICOFO_COMPONENT_SECRET
- JICOFO_AUTH_USER
- JICOFO_AUTH_PASSWORD
- JICOFO_RESERVATION_REST_BASE_URL
- JVB_BREWERY_MUC
- JIGASI_BREWERY_MUC
- JIGASI_SIP_URI
- JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS
- JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT
- JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT
- JICOFO_ENABLE_HEALTH_CHECKS
- JICOFO_SHORT_ID
- JIBRI_BREWERY_MUC
- JIBRI_REQUEST_RETRIES
- JIBRI_PENDING_TIMEOUT
- JIGASI_BREWERY_MUC
- JIGASI_SIP_URI
- JVB_BREWERY_MUC
- MAX_BRIDGE_PARTICIPANTS
- OCTO_BRIDGE_SELECTION_STRATEGY
- TZ
- XMPP_DOMAIN
- XMPP_AUTH_DOMAIN
- XMPP_INTERNAL_MUC_DOMAIN
- XMPP_MUC_DOMAIN
- XMPP_SERVER
depends_on:
- prosody
networks:

@ -0,0 +1,136 @@
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
{{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool }}
jicofo {
{{ if $ENABLE_AUTH }}
authentication {
enabled = true
// The type of authentication. Supported values are XMPP, JWT or SHIBBOLETH (default).
{{ if eq $AUTH_TYPE "jwt" }}
type = JWT
{{ else }}
type = XMPP
{{ end }}
login-url = "{{ .Env.XMPP_DOMAIN }}"
}
{{ end }}
// Configuration related to jitsi-videobridge
bridge {
{{ if .Env.MAX_BRIDGE_PARTICIPANTS }}
max-bridge-participants = "{{ .Env.MAX_BRIDGE_PARTICIPANTS }}"
{{ end }}
{{ if .Env.BRIDGE_AVG_PARTICIPANT_STRESS }}
// The assumed average stress per participant. default is 0.01
average-participant-stress = "{{ .Env.BRIDGE_AVG_PARTICIPANT_STRESS }}"
{{ end }}
{{ if .Env.BRIDGE_STRESS_THRESHOLD }}
// The stress level above which a bridge is considered overstressed. 0.8 is the default value
stress-threshold = "{{ .Env.BRIDGE_STRESS_THRESHOLD }}"
{{ end }}
{{ if .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}
selection-strategy = "{{ .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}"
{{ end }}
{{ if .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}
health-checks {
enabled = "{{ .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}"
}
{{ end }}
brewery-jid = "{{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
}
// Configure the codecs and RTP extensions to be used in the offer sent to clients.
codec {
video {
{{ if .Env.ENABLE_CODEC_VP8 }}
vp8 {
enabled = "{{ .Env.ENABLE_CODEC_VP8 }}"
}
{{ end }}
{{ if .Env.ENABLE_CODEC_VP9 }}
vp9 {
enabled = "{{ .Env.ENABLE_CODEC_VP9 }}"
}
{{ end }}
{{ if .Env.ENABLE_CODEC_H264 }}
h264 {
enabled = "{{ .Env.ENABLE_CODEC_H264 }}"
}
{{ end }}
}
}
conference {
{{ if .Env.ENABLE_AUTO_OWNER }}
enable-auto-owner = "{{ .Env.ENABLE_AUTO_OWNER }}"
{{ end }}
{{ if .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}
initial-timeout = "{{ .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}"
{{ end }}
{{ if .Env.JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT }}
single-participant-timeout = "{{ .Env.JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT }}"
{{ end }}
}
{{ if .Env.JICOFO_ENABLE_HEALTH_CHECKS }}
// Configuration for the internal health checks performed by jicofo.
health {
// Whether to perform health checks.
enabled = "{{ .Env.JICOFO_ENABLE_HEALTH_CHECKS }}"
}
{{ end }}
{{ if $ENABLE_RECORDING }}
jibri {
brewery-jid = "{{ .Env.JIBRI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
{{ if .Env.JIBRI_REQUEST_RETRIES }}
num-retries = "{{ .Env.JIBRI_REQUEST_RETRIES }}"
{{ end }}
{{ if .Env.JIBRI_PENDING_TIMEOUT }}
pending-timeout = "{{ .Env.JIBRI_PENDING_TIMEOUT }}"
{{ end }}
}
{{ end }}
{{ if and .Env.JIGASI_SIP_URI .Env.JIGASI_BREWERY_MUC }}
jigasi {
brewery-jid = "{{ .Env.JIGASI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
}
{{ end }}
octo {
id = "{{ .Env.JICOFO_SHORT_ID | default "1" }}"
}
{{ if .Env.ENABLE_SCTP }}
sctp {
enabled = "{{ .Env.ENABLE_SCTP }}"
}
{{ end }}
xmpp {
client {
enabled = true
hostname = "{{ .Env.XMPP_SERVER }}"
domain = "{{ .Env.XMPP_AUTH_DOMAIN }}"
username = "{{ .Env.JICOFO_AUTH_USER }}"
password = "{{ .Env.JICOFO_AUTH_PASSWORD }}"
conference-muc-jid = "{{ first (splitList "." .Env.XMPP_MUC_DOMAIN) }}"
disable-certificate-verification = true
}
}
{{ if .Env.JICOFO_RESERVATION_ENABLED | default "false" | toBool }}
reservation {
enabled = "{{ .Env.JICOFO_RESERVATION_ENABLED }}"
base-url = "{{ .Env.JICOFO_RESERVATION_REST_BASE_URL }}"
}
{{ end }}
}

@ -1,34 +0,0 @@
org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true
org.jitsi.jicofo.BRIDGE_MUC={{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
{{ if and .Env.JIBRI_BREWERY_MUC .Env.JIBRI_PENDING_TIMEOUT }}
org.jitsi.jicofo.jibri.BREWERY={{ .Env.JIBRI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
org.jitsi.jicofo.jibri.PENDING_TIMEOUT={{ .Env.JIBRI_PENDING_TIMEOUT }}
{{ end }}
{{ if and .Env.JIGASI_SIP_URI .Env.JIGASI_BREWERY_MUC }}
org.jitsi.jicofo.jigasi.BREWERY={{ .Env.JIGASI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
{{ end }}
{{ if .Env.JICOFO_RESERVATION_REST_BASE_URL }}
org.jitsi.impl.reservation.rest.BASE_URL={{ .Env.JICOFO_RESERVATION_REST_BASE_URL }}
{{ end }}
{{ if .Env.JICOFO_ENABLE_HEALTH_CHECKS | default "0" | toBool }}
org.jitsi.jicofo.health.ENABLE_HEALTH_CHECKS=true
{{ end }}
{{ if .Env.XMPP_MUC_DOMAIN }}
org.jitsi.jicofo.XMPP_MUC_COMPONENT_PREFIX={{ first (splitList "." .Env.XMPP_MUC_DOMAIN) }}
{{ end }}
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
{{ if $ENABLE_AUTH }}
{{ if eq $AUTH_TYPE "jwt" }}
org.jitsi.jicofo.auth.URL=EXT_JWT:{{ .Env.XMPP_DOMAIN }}
{{ else }}
org.jitsi.jicofo.auth.URL=XMPP:{{ .Env.XMPP_DOMAIN }}
{{ end }}
{{ end }}

@ -17,10 +17,7 @@ if [[ "$JICOFO_AUTH_PASSWORD" == "$OLD_JICOFO_AUTH_PASSWORD" ]]; then
exit 1
fi
tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties
if [[ -f /config/custom-sip-communicator.properties ]]; then
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
fi
tpl /defaults/jicofo.conf > /config/jicofo.conf
if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=config -Djava.util.logging.config.file=/config/logging.properties"
JAVA_SYS_PROPS="-Djava.util.logging.config.file=/config/logging.properties -Dconfig.file=/config/jicofo.conf"
DAEMON=/usr/share/jicofo/jicofo.sh
DAEMON_DIR=/usr/share/jicofo/
DAEMON_OPTS="--domain=$XMPP_DOMAIN --host=$XMPP_SERVER --secret=$JICOFO_COMPONENT_SECRET --user_name=$JICOFO_AUTH_USER --user_domain=$XMPP_AUTH_DOMAIN --user_password=$JICOFO_AUTH_PASSWORD"

Loading…
Cancel
Save