mirror of
https://github.com/bigbluebutton/docker.git
synced 2024-11-22 16:13:20 +01:00
Updates for HTML5 client
This commit is contained in:
commit
c1854b83ea
63
Dockerfile
63
Dockerfile
@ -1,63 +0,0 @@
|
||||
FROM ubuntu:16.04
|
||||
MAINTAINER ffdixon@bigbluebutton.org
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
# RUN echo 'Acquire::http::Proxy "http://192.168.0.130:3142 ";' > /etc/apt/apt.conf.d/01proxy
|
||||
RUN apt-get update && apt-get install -y wget software-properties-common
|
||||
|
||||
RUN echo "deb http://ubuntu.bigbluebutton.org/xenial-200 bigbluebutton-xenial main " | tee /etc/apt/sources.list.d/bigbluebutton.list
|
||||
RUN wget http://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | apt-key add -
|
||||
RUN add-apt-repository ppa:jonathonf/ffmpeg-4 -y
|
||||
RUN apt-get update && apt-get -y dist-upgrade
|
||||
|
||||
# -- Setup tomcat7 to run under docker
|
||||
RUN apt-get install -y \
|
||||
haveged \
|
||||
net-tools \
|
||||
supervisor \
|
||||
sudo \
|
||||
tomcat7
|
||||
|
||||
RUN sed -i 's|securerandom.source=file:/dev/random|securerandom.source=file:/dev/urandom|g' /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
|
||||
ADD mod/tomcat7 /etc/init.d/tomcat7
|
||||
RUN chmod +x /etc/init.d/tomcat7
|
||||
|
||||
RUN apt-get install -y language-pack-en
|
||||
RUN update-locale LANG=en_US.UTF-8
|
||||
|
||||
# -- Install BigBlueButton
|
||||
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
|
||||
RUN apt-get install -y bigbluebutton
|
||||
RUN apt-get install -y bbb-demo
|
||||
|
||||
# -- Install mongodb (for HTML5 client)
|
||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
|
||||
RUN echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
|
||||
RUN sudo apt-get update && sudo apt-get install -y mongodb-org curl
|
||||
|
||||
# -- Install nodejs (for HTML5 client)
|
||||
RUN apt-get install -y apt-transport-https
|
||||
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
||||
RUN echo 'deb http://deb.nodesource.com/node_8.x xenial main' > /etc/apt/sources.list.d/nodesource.list
|
||||
RUN echo 'deb-src http://deb.nodesource.com/node_8.x xenial main' >> /etc/apt/sources.list.d/nodesource.list
|
||||
RUN apt-get update && apt-get install -y nodejs
|
||||
|
||||
# -- Install HTML5 client
|
||||
RUN apt-get install -y bbb-html5
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y coturn vim
|
||||
|
||||
# -- Install supervisor to run all the BigBlueButton processes (replaces systemd)
|
||||
RUN apt-get install -y supervisor
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# -- Modify FreeSWITCH event_socket.conf.xml to listen to IPV4
|
||||
ADD mod/event_socket.conf.xml /opt/freeswitch/etc/freeswitch/autoload_configs
|
||||
ADD mod/external.xml /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
|
||||
# -- Finish startup
|
||||
ADD setup.sh /root/setup.sh
|
||||
ENTRYPOINT ["/root/setup.sh"]
|
||||
CMD []
|
@ -1,11 +1,11 @@
|
||||
# Overview
|
||||
|
||||
This repository contains the scripts create a single docker container running BigBlueButton.
|
||||
Note: This branch contains work in progress for incorporating the HTML5 client into the Docker image.
|
||||
|
||||
To run BigBlueButton in Docker, run the command
|
||||
|
||||
~~~
|
||||
docker run -p 80:80/tcp -p 1935:1935/tcp -p 5066:5066/tcp -p 16384-16484:16384-16484/udp -p 2202:2202 --cap-add=NET_ADMIN --name bigbluebutton bigbluebutton/bigbluebutton -h <YOUR_HOST_IP>
|
||||
docker run -p 80:80/tcp -p 443:443/tcp -p 1935:1935 -p 5066:5066 -p 3478:3478 -p 3478:3478/udp b2 -h <HOST_IP>
|
||||
~~~
|
||||
|
||||
Make sure you provide the host IP at the end of the command. This will take some time to pull the image from Docker hub.
|
||||
|
51
setup.sh
51
setup.sh
@ -23,7 +23,7 @@ change_var_value () {
|
||||
sed -i "s<^[[:blank:]#]*\(${2}\).*<\1=${3}<" $1
|
||||
}
|
||||
|
||||
# docker run -p 80:80/tcp -p 443:443/tcp -p 1935:1935/tcp -p 5066:5066/tcp -p 3478:3478/udp -p 3478:3478/tcp --cap-add=NET_ADMIN bigbluebutton/d2 -h 10.0.9.74
|
||||
# docker run -p 80:80/tcp -p 443:443/tcp -p 1935:1935 -p 5066:5066 -p 3478:3478 -p 3478:3478/udp b2 -h 192.168.0.130
|
||||
|
||||
while getopts "eh:" opt; do
|
||||
case $opt in
|
||||
@ -64,27 +64,19 @@ while [ ! -f /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp ]; do sleep 1; done
|
||||
sudo /etc/init.d/tomcat7 stop
|
||||
|
||||
|
||||
# Setup loopback address so FreeSWITCH can bind WS-BIND-URL to host IP
|
||||
#
|
||||
sudo ip addr add $HOST dev lo
|
||||
|
||||
# Setup the BigBlueButton configuration files
|
||||
#
|
||||
PROTOCOL_HTTP=http
|
||||
PROTOCOL_RTMP=rtmp
|
||||
|
||||
IP=$(echo "$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^et.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')$(LANG=c ifconfig | awk -v RS="" '{gsub (/\n[ ]*inet /," ")}1' | grep ^en.* | grep addr: | head -n1 | sed 's/.*addr://g' | sed 's/ .*//g')" | head -n1)
|
||||
|
||||
sed -i "s/stun:stun.freeswitch.org/$HOST/g" /opt/freeswitch/etc/freeswitch/vars.xml
|
||||
sed -i "s/<X-PRE-PROCESS cmd=\"set\" data=\"local_ip_v4=.*//g" /opt/freeswitch/etc/freeswitch/vars.xml
|
||||
|
||||
#sed -i "s/ext-rtp-ip\" value=\"\$\${local_ip_v4/ext-rtp-ip\" value=\"\$\${external_rtp_ip/g" /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
#sed -i "s/ext-sip-ip\" value=\"\$\${local_ip_v4/ext-sip-ip\" value=\"\$\${external_sip_ip/g" /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
#sed -i "s/<param name=\"ws-binding\".*/<param name=\"ws-binding\" value=\":5066\"\/>/g" /opt/freeswitch/conf/sip_profiles/external.xml
|
||||
xmlstarlet edit --inplace --update '//X-PRE-PROCESS[@cmd="set" and starts-with(@data, "external_rtp_ip=")]/@data' --value "stun:coturn" /opt/freeswitch/conf/vars.xml
|
||||
xmlstarlet edit --inplace --update '//X-PRE-PROCESS[@cmd="set" and starts-with(@data, "external_sip_ip=")]/@data' --value "stun:coturn" /opt/freeswitch/conf/vars.xml
|
||||
xmlstarlet edit --inplace --update '//X-PRE-PROCESS[@cmd="set" and starts-with(@data, "local_ip_v4=")]/@data' --value "${IP}" /opt/freeswitch/conf/vars.xml
|
||||
|
||||
sed -i "s/proxy_pass .*/proxy_pass $PROTOCOL_HTTP:\/\/$IP:5066;/g" /etc/bigbluebutton/nginx/sip.nginx
|
||||
|
||||
#sed -i "s/porttest host=\(\"[^\"]*\"\)/porttest host=\"$HOST\"/g" /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i "s/publishURI=\"[^\"]*\"/publishURI=\"$HOST\"/" /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i "s/http[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_HTTP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
|
||||
sed -i "s/rtmp[s]*:\/\/\([^\"\/]*\)\([\"\/]\)/$PROTOCOL_RTMP:\/\/$HOST\2/g" /var/www/bigbluebutton/client/conf/config.xml
|
||||
|
||||
@ -110,20 +102,15 @@ sed -i "s/deskshareip[ ]*=[ ]*\"[^\"]*\"/deskshareip=\"$HOST\"/g" \
|
||||
sed -i "s/defaultPresentationURL[ ]*=[ ]*\"[^\"]*\"/defaultPresentationURL=\"${PROTOCOL_HTTP}:\/\/$HOST\/default.pdf\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
|
||||
#cat > /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini << HERE
|
||||
#minPort=16435
|
||||
#maxPort=16484
|
||||
#HERE
|
||||
|
||||
cat > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini << HERE
|
||||
; Only IP address are supported, not domain names for addresses
|
||||
; You have to find a valid stun server. You can check if it works
|
||||
; usin this tool:
|
||||
; using this tool:
|
||||
; http://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
|
||||
stunServerAddress=64.233.177.127
|
||||
stunServerPort=19302
|
||||
;stunServerAddress=64.233.177.127
|
||||
;stunServerPort=19302
|
||||
|
||||
turnURL=user:password@${HOST}:3478
|
||||
turnURL=kurento:kurento@${HOST}:3478
|
||||
|
||||
;pemCertificate is deprecated. Please use pemCertificateRSA instead
|
||||
;pemCertificate=<path>
|
||||
@ -131,13 +118,6 @@ turnURL=user:password@${HOST}:3478
|
||||
;pemCertificateECDSA=<path>
|
||||
HERE
|
||||
|
||||
#sed -i 's/.*stunServerAddress.*/stunServerAddress=64.233.177.127/g' /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
|
||||
#sed -i 's/.*stunServerPort.*/stunServerPort=19302/g' /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
|
||||
#sed -i 's/.*turnURL*/turnURL=user:password@$IP:3478/g' /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
|
||||
|
||||
echo "denied-peer-ip=0.0.0.0-255.255.255.255" >> /etc/turnserver.conf
|
||||
echo "allowed-peer-ip=$IP" >> /etc/turnserver.conf
|
||||
|
||||
TURN_SECRET=`openssl rand -hex 16`
|
||||
|
||||
# Configure coturn to handle incoming UDP connections
|
||||
@ -149,9 +129,10 @@ lt-cred-mech
|
||||
use-auth-secret
|
||||
static-auth-secret=$TURN_SECRET
|
||||
user=user:password
|
||||
log-file=/var/log/turn.log
|
||||
HERE
|
||||
|
||||
# Setup tomcat7 to use the TURN server (wiht matching secret)
|
||||
# Setup tomcat7 to share the TURN server information with clients (with matching secret)
|
||||
cat > /var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/spring/turn-stun-servers.xml << HERE
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
@ -203,7 +184,7 @@ cat > /opt/freeswitch/conf/autoload_configs/acl.conf.xml << HERE
|
||||
HERE
|
||||
|
||||
|
||||
# Fix to ensure application.conf has the latest shared secret
|
||||
# Ensure bbb-apps-akka has the latest shared secret from bbb-web
|
||||
SECRET=$(cat /var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | grep securitySalt | cut -d= -f2);
|
||||
sed -i "s/sharedSecret[ ]*=[ ]*\"[^\"]*\"/sharedSecret=\"$SECRET\"/g" \
|
||||
/usr/share/bbb-apps-akka/conf/application.conf
|
||||
@ -221,6 +202,7 @@ sed -i "s|\"wsUrl.*|\"wsUrl\": \"ws://$HOST/bbb-webrtc-sfu\",|g" \
|
||||
rm /usr/share/red5/log/sip.log
|
||||
|
||||
# Add a sleep to each recording process so we can restart with supervisord
|
||||
# (This works around the limitation that supervisord can't restart after intervals)
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-archive-worker done")/sleep 20; BigBlueButton.logger.debug("rap-archive-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-archive-worker.rb
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-process-worker done")/sleep 20; BigBlueButton.logger.debug("rap-process-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-process-worker.rb
|
||||
sed -i 's/BigBlueButton.logger.debug("rap-sanity-worker done")/sleep 20 ; BigBlueButton.logger.debug("rap-sanity-worker done")/g' /usr/local/bigbluebutton/core/scripts/rap-sanity-worker.rb
|
||||
@ -237,9 +219,12 @@ export KURENTO_LOGS_PATH=$DAEMON_LOG
|
||||
|
||||
cat << HERE
|
||||
|
||||
BigBlueButton is running at http://$HOST/
|
||||
BigBlueButton is now starting up at this address
|
||||
|
||||
http://$HOST
|
||||
|
||||
HERE
|
||||
|
||||
exec /usr/bin/supervisord
|
||||
updatedb
|
||||
exec /usr/bin/supervisord > /var/log/supervisord.log
|
||||
|
||||
|
@ -108,5 +108,5 @@ command=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java -Djava.util.logging.c
|
||||
startsecs = 0
|
||||
autorestart = false
|
||||
user=turnserver
|
||||
command=/usr/bin/turnserver -c /etc/turnserver.conf
|
||||
command=/usr/bin/turnserver -c /etc/turnserver.conf -u kurento:kurento
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user