Explorar el Código

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.
j8
Дамян Минков hace 5 años
padre
commit
9a5b19babe
No account linked to committer's email address
Se han modificado 3 ficheros con 51 adiciones y 24 borrados
  1. 4
    7
      debian/control
  2. 46
    16
      debian/jitsi-meet-web-config.postinst
  3. 1
    1
      doc/quick-install.md

+ 4
- 7
debian/control Ver fichero

@@ -16,8 +16,7 @@ Description: WebRTC JavaScript video conferences
16 16
  Videobridge to provide high quality, scalable video conferences.
17 17
  .
18 18
  It is a web interface to Jitsi Videobridge for audio and video
19
- forwarding and relaying, configured to work with jetty instance
20
- running embedded into Jitsi Videobridge
19
+ forwarding and relaying.
21 20
 
22 21
 Package: jitsi-meet-web-config
23 22
 Architecture: all
@@ -27,9 +26,7 @@ Description: Configuration for web serving of Jitsi Meet
27 26
  Videobridge to provide high quality, scalable video conferences.
28 27
  .
29 28
  It is a web interface to Jitsi Videobridge for audio and video
30
- forwarding and relaying, configured to work with jetty instance
31
- running embedded into Jitsi Videobridge or using a webserver Nginx or
32
- Apache2.
29
+ forwarding and relaying, using a webserver Nginx or Apache2.
33 30
  .
34 31
  This package contains configuration for Nginx to be used with
35 32
  Jitsi Meet.
@@ -43,8 +40,7 @@ Description: Prosody configuration for Jitsi Meet
43 40
  Videobridge to provide high quality, scalable video conferences.
44 41
  .
45 42
  It is a web interface to Jitsi Videobridge for audio and video
46
- forwarding and relaying, configured to work with jetty instance
47
- running embedded into Jitsi Videobridge
43
+ forwarding and relaying.
48 44
  .
49 45
  This package contains configuration for Prosody to be used with
50 46
  Jitsi Meet.
@@ -56,5 +52,6 @@ Description: Prosody token authentication plugin for Jitsi Meet
56 52
 
57 53
 Package: jitsi-meet-turnserver
58 54
 Architecture: all
55
+Breaks: apache2
59 56
 Depends: ${misc:Depends}, nginx (>= 1.13.10) | nginx-full (>= 1.13.10) | nginx-extras (>= 1.13.10), jitsi-meet-prosody, coturn, dnsutils
60 57
 Description: Configures coturn to be used with Jitsi Meet

+ 46
- 16
debian/jitsi-meet-web-config.postinst Ver fichero

@@ -68,12 +68,11 @@ case "$1" in
68 68
             FORCE_APACHE="true"
69 69
         fi
70 70
 
71
+        UPLOADED_CERT_CHOICE="I want to use my own certificate"
71 72
         # if first time config ask for certs, or if we are reconfiguring
72 73
         if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
73
-            # SSL for nginx
74 74
             db_get jitsi-meet/cert-choice
75 75
             CERT_CHOICE="$RET"
76
-            UPLOADED_CERT_CHOICE="I want to use my own certificate"
77 76
 
78 77
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
79 78
                 db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
@@ -104,24 +103,55 @@ case "$1" in
104 103
         if [ ! -f $JITSI_MEET_CONFIG ] ; then
105 104
             cp /usr/share/jitsi-meet-web-config/config.js $JITSI_MEET_CONFIG
106 105
             # replaces needed config for multidomain as it works only with nginx
107
-            sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
106
+            if [[ "$FORCE_NGINX" = "true" ]] ; then
107
+                sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
108
+            fi
108 109
             sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
109 110
         fi
110 111
 
111
-        # this is new install let's configure jvb to serve meet
112
-        # no-nginx, no-apache installed on machine, this is new install or reconfiguring old one which have jvb_serve set
112
+        # getting rid of jetty serving web
113 113
         if [[ "$JVB_SERVE" = "true" ]] ; then
114
-            echo ""
115
-            echo "------------------------------------------------"
116
-            echo "You are using jetty to serve jitsi-meet, it is recommended to uninstall(purge) and use default installation that comes with nginx!"
117
-            echo ""
118
-            echo "When using the following command, any custom config will be LOST, please backup /etc/jitsi !!!"
119
-            echo ""
120
-            echo "You can purge your installation using the following command:"
121
-            echo "apt-get purge jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-web jicofo jitsi-videobridge"
122
-            echo "------------------------------------------------"
123
-            echo ""
124
-        elif [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
114
+            JVB_CONFIG="/etc/jitsi/videobridge/sip-communicator.properties"
115
+
116
+            # we will write to the file if missing create it
117
+            if [ -f $JVB_CONFIG ] ; then
118
+                echo ""
119
+                echo "------------------------------------------------"
120
+                echo ""
121
+                echo "You are using jetty to serve jitsi-meet, we are now upgrading you to use nginx!"
122
+                echo ""
123
+                echo "------------------------------------------------"
124
+                echo ""
125
+
126
+                sed -i "s/org.jitsi.videobridge.rest.jetty/#org.jitsi.videobridge.rest.jetty/g" $JVB_CONFIG
127
+                sed -i "s/org.jitsi.videobridge.TCP_HARVESTER_PORT/#org.jitsi.videobridge.TCP_HARVESTER_PORT/g" $JVB_CONFIG
128
+
129
+                if [ -d /run/systemd/system ]; then
130
+                    systemctl restart jitsi-videobridge2.service >/dev/null || true
131
+                fi
132
+
133
+                # Removing this value will force nginx or apache to be locally configured
134
+                JVB_HOSTNAME_OLD=""
135
+
136
+                db_get jitsi-meet/cert-choice
137
+                CERT_CHOICE="$RET"
138
+                # Fix certs on upgrade from jetty
139
+                if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
140
+                    db_get jitsi-meet/cert-path-key
141
+                    CERT_KEY="$RET"
142
+                    db_get jitsi-meet/cert-path-crt
143
+                    CERT_CRT="$RET"
144
+                else
145
+                    # create self-signed certs
146
+                    CERT_KEY="/etc/jitsi/meet/$JVB_HOSTNAME.key"
147
+                    CERT_CRT="/etc/jitsi/meet/$JVB_HOSTNAME.crt"
148
+                fi
149
+            fi
150
+
151
+            db_set jitsi-meet/jvb-serve "false"
152
+        fi
153
+
154
+        if [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
125 155
 
126 156
             # this is a reconfigure, lets just delete old links
127 157
             if [ "$RECONFIGURING" = "true" ] ; then

+ 1
- 1
doc/quick-install.md Ver fichero

@@ -43,7 +43,7 @@ apt-get install apt-transport-https
43 43
 
44 44
 ### Install Jitsi Meet
45 45
 
46
-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.
46
+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.
47 47
 
48 48
 ```sh
49 49
 apt-get -y install jitsi-meet

Loading…
Cancelar
Guardar