diff --git a/docker-compose.yml b/docker-compose.yml index f6f9d2b..278947b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,9 @@ services: WELCOME_FOOTER: ${WELCOME_FOOTER} volumes: - bigbluebutton:/var/bigbluebutton - network_mode: host + networks: + bbb-net: + ipv4_address: 10.7.7.2 freeswitch: build: mod/freeswitch diff --git a/mod/core/Dockerfile b/mod/core/Dockerfile index 49b088f..00e45e4 100644 --- a/mod/core/Dockerfile +++ b/mod/core/Dockerfile @@ -57,8 +57,13 @@ COPY bigbluebutton.yml /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml COPY web/bigbluebutton.properties /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties.tmpl COPY bbb-apps-akka/application.conf /usr/share/bbb-apps-akka/conf/application.conf.tmpl COPY bbb-fsesl-akka/application.conf /etc/bbb-fsesl-akka/application.conf +COPY bbb-transcode-akka/application.conf /etc/bbb-transcode-akka/application.conf COPY web-run.sh /usr/share/bbb-web/run-prod.sh +COPY screenshare/screenshare.properties /usr/share/red5/webapps/screenshare/WEB-INF/screenshare.properties +COPY screenshare/screenshare-app.conf /usr/share/red5/webapps/screenshare/WEB-INF/classes/screenshare-app.conf +COPY screenshare/application.conf /usr/share/red5/webapps/screenshare/WEB-INF/classes/application.conf + COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY entrypoint.sh /entrypoint.sh diff --git a/mod/core/bbb-apps-akka/application.conf b/mod/core/bbb-apps-akka/application.conf index 9b6f0fe..b7fda2f 100644 --- a/mod/core/bbb-apps-akka/application.conf +++ b/mod/core/bbb-apps-akka/application.conf @@ -65,7 +65,7 @@ sharedNotes { } http { - interface = "10.7.7.1" + interface = "10.7.7.2" port = 9999 } diff --git a/mod/core/bbb-transcode-akka/application.conf b/mod/core/bbb-transcode-akka/application.conf new file mode 100644 index 0000000..a965980 --- /dev/null +++ b/mod/core/bbb-transcode-akka/application.conf @@ -0,0 +1,48 @@ +akka { + actor { + debug { + receive = on + } + } + loggers = ["akka.event.slf4j.Slf4jLogger"] + loglevel = INFO + stdout-loglevel = "INFO" + + redis-subscriber-worker-dispatcher { + mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 512 + } +} + + +redis { + host="redis" + port=6379 + password="" + # recording keys should expire in 14 days + keyExpiry=1209600 +} + +videoconference { + #The image to use in the videoconference window and/or when the webuser has no video + videoconf-logo-image-path = /usr/share/red5/webapps/sip/WEB-INF/mconf-videoconf-logo.gif + + #Enable username subtitle on video-conf-logo (the one shown in sip-phone when + #webconference's talker has no video ) + enable-user-video-subtitle = true + + #To change the sip video resolution, edit below: + #IMPORTANT: For now, we only accept these 3 resolutions: 160x120, 320x240, 640x480 + sip-video-resolution=640x480 +} + +transcoder { + #The path where ffmpeg is installed + ffmpeg-path = /usr/bin/ffmpeg + + #The path where ffprobe is installed + ffprobe-path = /usr/bin/ffprobe +} diff --git a/mod/core/bigbluebutton-sip.properties b/mod/core/bigbluebutton-sip.properties index 2de5765..2a49875 100644 --- a/mod/core/bigbluebutton-sip.properties +++ b/mod/core/bigbluebutton-sip.properties @@ -8,7 +8,7 @@ sip.server.username=bbbuser sip.server.password=secret # The ip and port of the FreeSWITCH server -freeswitch.ip=127.0.0.1 +freeswitch.ip=10.7.7.1 freeswitch.port=5060 # The start/stop RTP port the application is going to use diff --git a/mod/core/bigbluebutton.yml b/mod/core/bigbluebutton.yml index c95ad19..b6ade01 100644 --- a/mod/core/bigbluebutton.yml +++ b/mod/core/bigbluebutton.yml @@ -14,7 +14,7 @@ notes_formats: - etherpad - html - pdf -redis_host: 127.0.0.1 +redis_host: redis redis_port: 6379 # Uncomment and set password if redis require it. # redis_password: changeme diff --git a/mod/core/red5.properties b/mod/core/red5.properties index dc7c795..a6cc740 100644 --- a/mod/core/red5.properties +++ b/mod/core/red5.properties @@ -1,9 +1,9 @@ # Socket policy -policy.host=10.7.7.1 +policy.host=0.0.0.0 policy.port=843 # HTTP -http.host=10.7.7.1 +http.host=0.0.0.0 http.port=5080 https.port=5443 http.URIEncoding=UTF-8 @@ -14,7 +14,7 @@ http.acceptor_thread_count=10 http.processor_cache=20 # RTMP -rtmp.host=10.7.7.1 +rtmp.host=0.0.0.0 rtmp.port=1935 rtmp.io_threads=8 rtmp.send_buffer_size=65536 @@ -70,7 +70,7 @@ rtmp.generateMetadata=false rtmp.max_packet_size=3145728 # RTMPS -rtmps.host=10.7.7.1 +rtmps.host=0.0.0.0 rtmps.port=8443 rtmps.ping_interval=5000 rtmps.max_inactivity=20000 @@ -85,7 +85,7 @@ rtmps.truststorepass=password rtmps.truststorefile=conf/truststore.jks # RTMPT -rtmpt.host=10.7.7.1 +rtmpt.host=0.0.0.0 rtmpt.port=8088 rtmpt.ping_interval=5000 rtmpt.max_inactivity=20000 @@ -108,7 +108,7 @@ rtmpt.max_queue_offer_time=125 rtmpt.max_queue_offer_attempts=4 # WebSocket -ws.host=10.7.7.1 +ws.host=0.0.0.0 ws.port=8081 # Debug proxy (needs to be activated in red5-core.xml) diff --git a/mod/core/screenshare/application.conf b/mod/core/screenshare/application.conf new file mode 100644 index 0000000..918155f --- /dev/null +++ b/mod/core/screenshare/application.conf @@ -0,0 +1,43 @@ +akka { + actor { + debug { + # enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill et.c.) + autoreceive = on + # enable DEBUG logging of actor lifecycle changes + lifecycle = on + } + } + loggers = ["akka.event.slf4j.Slf4jLogger"] + loglevel = "DEBUG" + + redis-publish-worker-dispatcher { + mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 512 + } + + redis-subscriber-worker-dispatcher { + mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 512 + } +} + +redis { + host="127.0.0.1" + port=6379 + password="" + # recording keys should expire in 14 days + keyExpiry=1209600 +} + +eventBus { + meetingManagerChannel = "FROM APPLICATION.CONF MeetingManagerChannel" + outMessageChannel = "OutgoingMessageChannel" + incomingJsonMsgChannel = "IncomingJsonMsgChannel" + outBbbMsgMsgChannel = "OutBbbMsgChannel" +} \ No newline at end of file diff --git a/mod/core/screenshare/screenshare-app.conf b/mod/core/screenshare/screenshare-app.conf new file mode 100644 index 0000000..098586f --- /dev/null +++ b/mod/core/screenshare/screenshare-app.conf @@ -0,0 +1,43 @@ +akka { + actor { + debug { + # enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill et.c.) + autoreceive = on + # enable DEBUG logging of actor lifecycle changes + lifecycle = on + } + } + loggers = ["akka.event.slf4j.Slf4jLoggerDDD"] + loglevel = "DEBUG" + + redis-publish-worker-dispatcher { + mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 512 + } + + redis-subscriber-worker-dispatcher { + mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 512 + } +} + +redis { + host="redis" + port=6379 + password="" + # recording keys should expire in 14 days + keyExpiry=1209600 +} + +eventBus { + meetingManagerChannel = "FROM SCREEN-APPLICATION.CONF MeetingManagerChannel" + outMessageChannel = "OutgoingMessageChannel" + incomingJsonMsgChannel = "IncomingJsonMsgChannel" + outBbbMsgMsgChannel = "OutBbbMsgChannel" +} \ No newline at end of file diff --git a/mod/core/screenshare/screenshare.properties b/mod/core/screenshare/screenshare.properties new file mode 100644 index 0000000..b0ba4b5 --- /dev/null +++ b/mod/core/screenshare/screenshare.properties @@ -0,0 +1,20 @@ +recordingDirectory=/usr/share/red5/webapps/screenshare/streams + +redis.host=redis +redis.port=6379 +redis.password= +redis.keyExpiry=1209600 + +streamBaseUrl=rtmp://10.130.218.38/screenshare +jnlpUrl=http://10.130.218.38/screenshare +jnlpFile=http://10.130.218.38/screenshare/screenshare.jnlp +useH264=false + +# NOTES: +# 1. GOP (group of pictures) is calculated as frameRate * keyFrameInterval +# 2. intra-refresh=1 doesn't work in Chrome. Late comers can't view the stream as +# the user missed the key frame +# 3. keyFrameInterval is in seconds +# 4. Make sure you encode & into & as it will break the JNLP XML +#codecOptions=crf=36&preset=veryfast&tune=animation,zerolatency&frameRate=12.0&keyFrameInterval=6 +codecOptions=crf=38&preset=veryfast&tune=zerolatency&frameRate=5.0&keyFrameInterval=5 diff --git a/mod/core/web/bigbluebutton.properties b/mod/core/web/bigbluebutton.properties index 6ca2349..03b2575 100644 --- a/mod/core/web/bigbluebutton.properties +++ b/mod/core/web/bigbluebutton.properties @@ -264,7 +264,7 @@ securitySalt={{ .Env.SHARED_SECRET }} # Directory where we drop the .done file recordStatusDir=/var/bigbluebutton/recording/status/recorded -redisHost=127.0.0.1 +redisHost=redis redisPort=6379 redisPassword= redisKeyExpiry=1209600 diff --git a/mod/nginx/bbb/screenshare.nginx b/mod/nginx/bbb/screenshare.nginx index 1b3cb88..a8c9952 100644 --- a/mod/nginx/bbb/screenshare.nginx +++ b/mod/nginx/bbb/screenshare.nginx @@ -1,7 +1,7 @@ # Handle desktop sharing tunneling. Forwards # requests to Red5 on port 5080. location /screenshare { - proxy_pass http://host.docker.internal:5080; + proxy_pass http://core:5080; proxy_redirect default; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; diff --git a/mod/nginx/bbb/web.nginx b/mod/nginx/bbb/web.nginx index a186b75..0b99434 100755 --- a/mod/nginx/bbb/web.nginx +++ b/mod/nginx/bbb/web.nginx @@ -3,7 +3,7 @@ proxy_http_version 1.1; location /bigbluebutton { - proxy_pass http://host.docker.internal:8090; + proxy_pass http://core:8090; proxy_redirect default; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -13,7 +13,7 @@ location ~ "^\/bigbluebutton\/presentation\/(?[a-zA-Z0-9_-]+)/upload$" { - proxy_pass http://host.docker.internal:8090; + proxy_pass http://core:8090; proxy_redirect default; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -50,14 +50,14 @@ if ($arg_presFilename !~ "^[0-9a-zA-Z]+\.[0-9a-zA-Z]+$") { return 404; } - proxy_pass http://host.docker.internal:8090$uri$is_args$args; + proxy_pass http://core:8090$uri$is_args$args; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Workaround IE refusal to set cookies in iframe add_header P3P 'CP="No P3P policy available"'; } location = /bigbluebutton/presentation/checkPresentation { - proxy_pass http://host.docker.internal:8090; + proxy_pass http://core:8090; proxy_redirect default; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -82,7 +82,7 @@ # and make sure to add sessionToken param in the request URI location = /bigbluebutton/connection/checkAuthorization { internal; - proxy_pass http://host.docker.internal:8090; + proxy_pass http://core:8090; proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_set_header X-Original-URI $request_uri; @@ -119,7 +119,7 @@ location = /bigbluebutton/textTrack/validateAuthToken { internal; - proxy_pass http://host.docker.internal:8090; + proxy_pass http://core:8090; proxy_redirect default; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/mod/nginx/bigbluebutton b/mod/nginx/bigbluebutton index fbfe289..bda71f4 100644 --- a/mod/nginx/bigbluebutton +++ b/mod/nginx/bigbluebutton @@ -11,7 +11,7 @@ server { # Handle RTMPT (RTMP Tunneling). Forwards requests # to Red5 on port 5080 location ~ (/open/|/close/|/idle/|/send/|/fcs/) { - proxy_pass http://10.7.7.1:5080; + proxy_pass http://core:5080; proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -29,7 +29,7 @@ server { # Handle desktop sharing tunneling. Forwards # requests to Red5 on port 5080. location /deskshare { - proxy_pass http://10.7.7.1:5080; + proxy_pass http://core:5080; proxy_redirect default; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m;