Commit db39e5c1 authored by ulif's avatar ulif 🐻

Provide a custom TURN server configuration.

Created in 2 steps:
1) we create a valid config files from a template and store it in
/etc/bigvluebutton/bbb-conf/
2) we copy this config file over to the final location on apply-config.
parent 4518e4fe
......@@ -152,3 +152,23 @@
value: '$${hold_music}'
backup: no
when: hold_sound.stat.exists
#
# enable custom TURN servers
#
- name: check whether we have a custom turn server
stat:
path: "/etc/bigbluebutton/bbb-conf/turn-stun-servers.xml"
register: custom_turn_config
- name: enable own turn servers
copy:
src: "/etc/bigbluebutton/bbb-conf/turn-stun-servers.xml"
dest: "/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml"
remote_src: yes
owner: "bigbluebutton"
group: "bigbluebutton"
mode: 0644
backup: yes
when: custom_turn_config.exists
<?xml version="1.0" encoding="UTF-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
This program is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 3.0 of the License, or (at your option) any later
version.
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
">
<bean id="stun1" class="org.bigbluebutton.web.services.turn.StunServer">
<constructor-arg index="0" value="stun:stun.freeswitch.org"/>
</bean>
<bean id="stun2" class="org.bigbluebutton.web.services.turn.StunServer">
<constructor-arg index="0" value="stun:{{ turn_server }}"/>
</bean>
<!--bean id="iceCandidate1" class="org.bigbluebutton.web.services.turn.RemoteIceCandidate">
<constructor-arg index="0" value="192.168.0.1"/>
</bean-->
<!-- Turn servers are configured with a secret that's compatible with
http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
as supported by the coturn and rfc5766-turn-server turn servers -->
<bean id="turn1" class="org.bigbluebutton.web.services.turn.TurnServer">
Secret:
<constructor-arg index="0" value="{{ static_auth_secret }}"/>
TURN server URL, use turn: or turns:
<constructor-arg index="1" value="turns:{{ turn_server }}:443"/>
TTL in seconds for shared secret
<constructor-arg index="2" value="86400"/>
</bean>
<!--bean id="turn2" class="org.bigbluebutton.web.services.turn.TurnServer">
<constructor-arg index="0" value="{{ static_auth_secret }}"/>
<constructor-arg index="1" value="turns:{ turn_server }:443"/>
<constructor-arg index="2" value="86400"/>
</bean-->
<bean id="stunTurnService" class="org.bigbluebutton.web.services.turn.StunTurnService">
<property name="stunServers">
<set>
<ref bean="stun1" />
<ref bean="stun2" />
</set>
</property>
<property name="turnServers">
<set>
<ref bean="turn1" />
<!--ref bean="turn2" /-->
</set>
</property>
<property name="remoteIceCandidates">
<set>
<!--ref bean="iceCandidate1" /-->
<!--ref bean="iceCandidate2" /-->
</set>
</property>
</bean>
</beans>
......@@ -21,6 +21,14 @@
clone: yes
update: yes
- name: Create coturn config from template
template:
src: files/turn-stun-servers.xml.tmpl
dest: /etc/bigbluebutton/bbb-conf/turn-stun-servers.xml
owner: root
group: root
mode: 0755
- name: Copy apply-config.sh to /etc/bigbluebutton/bbb-conf/apply-config.sh on target
copy:
src: files/apply-config.sh
......
$ANSIBLE_VAULT;1.1;AES256
37373338313738623737616136666435376138303831646464393861383165373430633361383166
3461396664383564646232643833346335396163613732380a356563366465386662316331646463
30353061653439303238303235666561386538373033313835326262613137346666626465646264
3463336536353131330a623062353238643037303337613030646336613437633636356639323461
33313330396331643661613966376235306166383737336533613838356536363766303532626163
61343132363230666665383239643337383036326533643164666166663862383233313734623537
35646261643161313039613734303931643430353561356133626432383436623438613366643532
66333566356539303635653133366261343064306535343333353537653332656164643866313435
34363635396138383035613865356530383766383735323533383432333361353835316330343033
37333339303130393263323661373531646463353362656334383031616139303236343335373365
35373433633764343534616538623737306237303731626633653430383331343562663363353238
39323030333035653635326530363736323663646433653065343864633433336438646536633230
65376134363531316438613366643863643839663561663061613936343965623265386333636531
62366461356536623935393433323631303261626432336565623162643630633831613433363961
31366266383332343165633937623236313139646236373839633030383536386231393964346562
63316232366234353965336234343931396438643336303463636162343661633039383030326232
63303834616533396362623130343136326365636532366537666639396536623632613465306234
66643633316239616131326637366162663939396131663435663832333663316362323132393835
31613036643537393066613464363732646664393130346336626263623131663763613235363539
32313965623061636238363331623938623861623730346131613036323561373533303035333163
34393462623963363739323065313831386237386433383030393033616435316237
62303738363163373939316435653763666164636164373566306161373536313437316537326664
6563313965366163306564643839633433623463383834380a396631383835636537656161636330
63326562333635356432666466616136303361363133626530343938646439623666343030613262
3963313437386638650a306262326335636437636236373839333564653566643933373766613239
32613539373036613562636330396533393735353739346438336161636132356536353138393063
63623666316239393337633165326133386464333765363539366439393765396138656163646432
34356666646362303561323431316462616136326666663732396139323436376230646639353430
32353666343531306538643365613035363132363464623436313236363539373131336132633630
37313164653231643933376362303564393935316437343562646332613965613238613332633037
61336439613464636238613434343333623263313730636539346263353662356437313238616463
37353462366137656331343966646536323435393465633233656361363238623633343865616331
62393562366262356630306230633362373838656436373232396264303063633831333561396466
38363839323239663236343334666639383232353132356332633863393731653235633566386337
34353266613634343266636365626231653837356166323231376239633761303738656232336165
35613139353932396438646462396432613131313564633266623666343861336530336139643636
66653866366161363937636463356565383135343232313363316466613837303834393736333437
64306139316634363830636232353965646332633735623064333863333366646630393732666433
38633233386532626438636262643163346330393064383634643234373233623364313166353532
62626366363134343137306263633337646438666332373133393165383533376234666435343937
63383534353662363130623338363533353032333733373138613338653663396364613065333239
39363362353538376436653333613339666431613630643466623733626134376663363538356466
31346230653935643030383966326366396465313135336530613666323730373933373237323866
31383130316530383932323333613064653837363434313962623831376636636463643362346539
62316639333234343233
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment