Migrates jetty config to nginx one (#5413)

* Completely removes jetty config and defaults to nginx.

* Force configuring nginx or apache.

* Fixes certs when upgrading from jetty.

* Fixes certs and restarts jvb.

* Turnserver config conflicts apache2.

* Multi-domain sed only for nginx.

* Updates docs removing jetty.
This commit is contained in:
Дамян Минков 2020-03-27 09:07:47 -05:00 committed by GitHub
parent e5d87e66bf
commit 9a5b19babe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 24 deletions

11
debian/control vendored
View File

@ -16,8 +16,7 @@ Description: WebRTC JavaScript video conferences
Videobridge to provide high quality, scalable video conferences.
.
It is a web interface to Jitsi Videobridge for audio and video
forwarding and relaying, configured to work with jetty instance
running embedded into Jitsi Videobridge
forwarding and relaying.
Package: jitsi-meet-web-config
Architecture: all
@ -27,9 +26,7 @@ Description: Configuration for web serving of Jitsi Meet
Videobridge to provide high quality, scalable video conferences.
.
It is a web interface to Jitsi Videobridge for audio and video
forwarding and relaying, configured to work with jetty instance
running embedded into Jitsi Videobridge or using a webserver Nginx or
Apache2.
forwarding and relaying, using a webserver Nginx or Apache2.
.
This package contains configuration for Nginx to be used with
Jitsi Meet.
@ -43,8 +40,7 @@ Description: Prosody configuration for Jitsi Meet
Videobridge to provide high quality, scalable video conferences.
.
It is a web interface to Jitsi Videobridge for audio and video
forwarding and relaying, configured to work with jetty instance
running embedded into Jitsi Videobridge
forwarding and relaying.
.
This package contains configuration for Prosody to be used with
Jitsi Meet.
@ -56,5 +52,6 @@ Description: Prosody token authentication plugin for Jitsi Meet
Package: jitsi-meet-turnserver
Architecture: all
Breaks: apache2
Depends: ${misc:Depends}, nginx (>= 1.13.10) | nginx-full (>= 1.13.10) | nginx-extras (>= 1.13.10), jitsi-meet-prosody, coturn, dnsutils
Description: Configures coturn to be used with Jitsi Meet

View File

@ -68,12 +68,11 @@ case "$1" in
FORCE_APACHE="true"
fi
UPLOADED_CERT_CHOICE="I want to use my own certificate"
# if first time config ask for certs, or if we are reconfiguring
if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
# SSL for nginx
db_get jitsi-meet/cert-choice
CERT_CHOICE="$RET"
UPLOADED_CERT_CHOICE="I want to use my own certificate"
if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
@ -104,24 +103,55 @@ case "$1" in
if [ ! -f $JITSI_MEET_CONFIG ] ; then
cp /usr/share/jitsi-meet-web-config/config.js $JITSI_MEET_CONFIG
# replaces needed config for multidomain as it works only with nginx
sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
if [[ "$FORCE_NGINX" = "true" ]] ; then
sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
fi
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
fi
# this is new install let's configure jvb to serve meet
# no-nginx, no-apache installed on machine, this is new install or reconfiguring old one which have jvb_serve set
# getting rid of jetty serving web
if [[ "$JVB_SERVE" = "true" ]] ; then
echo ""
echo "------------------------------------------------"
echo "You are using jetty to serve jitsi-meet, it is recommended to uninstall(purge) and use default installation that comes with nginx!"
echo ""
echo "When using the following command, any custom config will be LOST, please backup /etc/jitsi !!!"
echo ""
echo "You can purge your installation using the following command:"
echo "apt-get purge jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-web jicofo jitsi-videobridge"
echo "------------------------------------------------"
echo ""
elif [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
JVB_CONFIG="/etc/jitsi/videobridge/sip-communicator.properties"
# we will write to the file if missing create it
if [ -f $JVB_CONFIG ] ; then
echo ""
echo "------------------------------------------------"
echo ""
echo "You are using jetty to serve jitsi-meet, we are now upgrading you to use nginx!"
echo ""
echo "------------------------------------------------"
echo ""
sed -i "s/org.jitsi.videobridge.rest.jetty/#org.jitsi.videobridge.rest.jetty/g" $JVB_CONFIG
sed -i "s/org.jitsi.videobridge.TCP_HARVESTER_PORT/#org.jitsi.videobridge.TCP_HARVESTER_PORT/g" $JVB_CONFIG
if [ -d /run/systemd/system ]; then
systemctl restart jitsi-videobridge2.service >/dev/null || true
fi
# Removing this value will force nginx or apache to be locally configured
JVB_HOSTNAME_OLD=""
db_get jitsi-meet/cert-choice
CERT_CHOICE="$RET"
# Fix certs on upgrade from jetty
if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
db_get jitsi-meet/cert-path-key
CERT_KEY="$RET"
db_get jitsi-meet/cert-path-crt
CERT_CRT="$RET"
else
# create self-signed certs
CERT_KEY="/etc/jitsi/meet/$JVB_HOSTNAME.key"
CERT_CRT="/etc/jitsi/meet/$JVB_HOSTNAME.crt"
fi
fi
db_set jitsi-meet/jvb-serve "false"
fi
if [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
# this is a reconfigure, lets just delete old links
if [ "$RECONFIGURING" = "true" ] ; then

View File

@ -43,7 +43,7 @@ apt-get install apt-transport-https
### Install Jitsi Meet
Note: Something to consider before installation is how you're planning to serve Jitsi Meet. The installer will check if [Nginx](https://nginx.org/) or [Apache](https://httpd.apache.org/) is present (in that order) and configure a virtualhost within the web server it finds to serve Jitsi Meet. If none of the above is found it then configures itself to be served via [Jetty](https://www.eclipse.org/jetty/). So if for example you are planning on deploying Jitsi Meet with a web server, you have to make sure to install the server **before** installing jitsi-meet.
Note: The installer will check if [Nginx](https://nginx.org/) or [Apache](https://httpd.apache.org/) is present (in that order) and configure a virtualhost within the web server it finds to serve Jitsi Meet. If none of the above is found it then defaults to Nginx.
```sh
apt-get -y install jitsi-meet