Skip to content

Commit 0f541c8

Browse files
metatxnsaghul
authored andcommitted
jicofo: migrate to new config
1 parent 12823cb commit 0f541c8

File tree

5 files changed

+162
-48
lines changed

5 files changed

+162
-48
lines changed

docker-compose.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,37 @@ services:
178178
- ${CONFIG}/jicofo:/config:Z
179179
environment:
180180
- AUTH_TYPE
181+
- BRIDGE_AVG_PARTICIPANT_STRESS
182+
- BRIDGE_STRESS_THRESHOLD
181183
- ENABLE_AUTH
182-
- XMPP_DOMAIN
183-
- XMPP_AUTH_DOMAIN
184-
- XMPP_INTERNAL_MUC_DOMAIN
185-
- XMPP_MUC_DOMAIN
186-
- XMPP_SERVER
184+
- ENABLE_AUTO_OWNER
185+
- ENABLE_CODEC_VP8
186+
- ENABLE_CODEC_VP9
187+
- ENABLE_CODEC_H264
188+
- ENABLE_RECORDING
189+
- ENABLE_SCTP
187190
- JICOFO_COMPONENT_SECRET
188191
- JICOFO_AUTH_USER
189192
- JICOFO_AUTH_PASSWORD
190-
- JICOFO_RESERVATION_REST_BASE_URL
191-
- JVB_BREWERY_MUC
192-
- JIGASI_BREWERY_MUC
193-
- JIGASI_SIP_URI
193+
- JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS
194+
- JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT
195+
- JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT
196+
- JICOFO_ENABLE_HEALTH_CHECKS
197+
- JICOFO_SHORT_ID
194198
- JIBRI_BREWERY_MUC
199+
- JIBRI_REQUEST_RETRIES
195200
- JIBRI_PENDING_TIMEOUT
201+
- JIGASI_BREWERY_MUC
202+
- JIGASI_SIP_URI
203+
- JVB_BREWERY_MUC
204+
- MAX_BRIDGE_PARTICIPANTS
205+
- OCTO_BRIDGE_SELECTION_STRATEGY
196206
- TZ
207+
- XMPP_DOMAIN
208+
- XMPP_AUTH_DOMAIN
209+
- XMPP_INTERNAL_MUC_DOMAIN
210+
- XMPP_MUC_DOMAIN
211+
- XMPP_SERVER
197212
depends_on:
198213
- prosody
199214
networks:

jicofo/rootfs/defaults/jicofo.conf

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
2+
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
3+
{{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "0" | toBool }}
4+
5+
jicofo {
6+
{{ if $ENABLE_AUTH }}
7+
authentication {
8+
enabled = true
9+
// The type of authentication. Supported values are XMPP, JWT or SHIBBOLETH (default).
10+
{{ if eq $AUTH_TYPE "jwt" }}
11+
type = JWT
12+
{{ else }}
13+
type = XMPP
14+
{{ end }}
15+
login-url = "{{ .Env.XMPP_DOMAIN }}"
16+
}
17+
{{ end }}
18+
19+
// Configuration related to jitsi-videobridge
20+
bridge {
21+
{{ if .Env.MAX_BRIDGE_PARTICIPANTS }}
22+
max-bridge-participants = "{{ .Env.MAX_BRIDGE_PARTICIPANTS }}"
23+
{{ end }}
24+
25+
{{ if .Env.BRIDGE_AVG_PARTICIPANT_STRESS }}
26+
// The assumed average stress per participant. default is 0.01
27+
average-participant-stress = "{{ .Env.BRIDGE_AVG_PARTICIPANT_STRESS }}"
28+
{{ end }}
29+
30+
{{ if .Env.BRIDGE_STRESS_THRESHOLD }}
31+
// The stress level above which a bridge is considered overstressed. 0.8 is the default value
32+
stress-threshold = "{{ .Env.BRIDGE_STRESS_THRESHOLD }}"
33+
{{ end }}
34+
35+
{{ if .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}
36+
selection-strategy = "{{ .Env.OCTO_BRIDGE_SELECTION_STRATEGY }}"
37+
{{ end }}
38+
39+
{{ if .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}
40+
health-checks {
41+
enabled = "{{ .Env.JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS }}"
42+
}
43+
{{ end }}
44+
45+
brewery-jid = "{{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
46+
}
47+
// Configure the codecs and RTP extensions to be used in the offer sent to clients.
48+
codec {
49+
video {
50+
{{ if .Env.ENABLE_CODEC_VP8 }}
51+
vp8 {
52+
enabled = "{{ .Env.ENABLE_CODEC_VP8 }}"
53+
}
54+
{{ end }}
55+
{{ if .Env.ENABLE_CODEC_VP9 }}
56+
vp9 {
57+
enabled = "{{ .Env.ENABLE_CODEC_VP9 }}"
58+
}
59+
{{ end }}
60+
{{ if .Env.ENABLE_CODEC_H264 }}
61+
h264 {
62+
enabled = "{{ .Env.ENABLE_CODEC_H264 }}"
63+
}
64+
{{ end }}
65+
}
66+
}
67+
68+
conference {
69+
{{ if .Env.ENABLE_AUTO_OWNER }}
70+
enable-auto-owner = "{{ .Env.ENABLE_AUTO_OWNER }}"
71+
{{ end }}
72+
73+
{{ if .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}
74+
initial-timeout = "{{ .Env.JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT }}"
75+
{{ end }}
76+
77+
{{ if .Env.JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT }}
78+
single-participant-timeout = "{{ .Env.JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT }}"
79+
{{ end }}
80+
}
81+
82+
{{ if .Env.JICOFO_ENABLE_HEALTH_CHECKS }}
83+
// Configuration for the internal health checks performed by jicofo.
84+
health {
85+
// Whether to perform health checks.
86+
enabled = "{{ .Env.JICOFO_ENABLE_HEALTH_CHECKS }}"
87+
}
88+
{{ end }}
89+
90+
{{ if $ENABLE_RECORDING }}
91+
jibri {
92+
brewery-jid = "{{ .Env.JIBRI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
93+
{{ if .Env.JIBRI_REQUEST_RETRIES }}
94+
num-retries = "{{ .Env.JIBRI_REQUEST_RETRIES }}"
95+
{{ end }}
96+
{{ if .Env.JIBRI_PENDING_TIMEOUT }}
97+
pending-timeout = "{{ .Env.JIBRI_PENDING_TIMEOUT }}"
98+
{{ end }}
99+
}
100+
{{ end }}
101+
102+
{{ if and .Env.JIGASI_SIP_URI .Env.JIGASI_BREWERY_MUC }}
103+
jigasi {
104+
brewery-jid = "{{ .Env.JIGASI_BREWERY_MUC}}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
105+
}
106+
{{ end }}
107+
108+
octo {
109+
id = "{{ .Env.JICOFO_SHORT_ID | default "1" }}"
110+
}
111+
112+
{{ if .Env.ENABLE_SCTP }}
113+
sctp {
114+
enabled = "{{ .Env.ENABLE_SCTP }}"
115+
}
116+
{{ end }}
117+
118+
xmpp {
119+
client {
120+
enabled = true
121+
hostname = "{{ .Env.XMPP_SERVER }}"
122+
domain = "{{ .Env.XMPP_AUTH_DOMAIN }}"
123+
username = "{{ .Env.JICOFO_AUTH_USER }}"
124+
password = "{{ .Env.JICOFO_AUTH_PASSWORD }}"
125+
conference-muc-jid = "{{ first (splitList "." .Env.XMPP_MUC_DOMAIN) }}"
126+
disable-certificate-verification = true
127+
}
128+
}
129+
130+
{{ if .Env.JICOFO_RESERVATION_ENABLED | default "false" | toBool }}
131+
reservation {
132+
enabled = "{{ .Env.JICOFO_RESERVATION_ENABLED }}"
133+
base-url = "{{ .Env.JICOFO_RESERVATION_REST_BASE_URL }}"
134+
}
135+
{{ end }}
136+
}

jicofo/rootfs/defaults/sip-communicator.properties

Lines changed: 0 additions & 34 deletions
This file was deleted.

jicofo/rootfs/etc/cont-init.d/10-config

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ if [[ "$JICOFO_AUTH_PASSWORD" == "$OLD_JICOFO_AUTH_PASSWORD" ]]; then
1717
exit 1
1818
fi
1919

20-
tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties
21-
if [[ -f /config/custom-sip-communicator.properties ]]; then
22-
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
23-
fi
20+
tpl /defaults/jicofo.conf > /config/jicofo.conf
2421

2522
if [[ ! -f /config/logging.properties ]]; then
2623
cp /defaults/logging.properties /config

jicofo/rootfs/etc/services.d/jicofo/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/with-contenv bash
22

3-
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"
3+
JAVA_SYS_PROPS="-Djava.util.logging.config.file=/config/logging.properties -Dconfig.file=/config/jicofo.conf"
44
DAEMON=/usr/share/jicofo/jicofo.sh
55
DAEMON_DIR=/usr/share/jicofo/
66
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"

0 commit comments

Comments
 (0)