Переглянути джерело

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.
master
Дамян Минков 5 роки тому
джерело
коміт
9a5b19babe
Аккаунт користувача з таким Email не знайдено
3 змінених файлів з 51 додано та 24 видалено
  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 Переглянути файл

16
  Videobridge to provide high quality, scalable video conferences.
16
  Videobridge to provide high quality, scalable video conferences.
17
  .
17
  .
18
  It is a web interface to Jitsi Videobridge for audio and video
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
 Package: jitsi-meet-web-config
21
 Package: jitsi-meet-web-config
23
 Architecture: all
22
 Architecture: all
27
  Videobridge to provide high quality, scalable video conferences.
26
  Videobridge to provide high quality, scalable video conferences.
28
  .
27
  .
29
  It is a web interface to Jitsi Videobridge for audio and video
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
  This package contains configuration for Nginx to be used with
31
  This package contains configuration for Nginx to be used with
35
  Jitsi Meet.
32
  Jitsi Meet.
43
  Videobridge to provide high quality, scalable video conferences.
40
  Videobridge to provide high quality, scalable video conferences.
44
  .
41
  .
45
  It is a web interface to Jitsi Videobridge for audio and video
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
  This package contains configuration for Prosody to be used with
45
  This package contains configuration for Prosody to be used with
50
  Jitsi Meet.
46
  Jitsi Meet.
56
 
52
 
57
 Package: jitsi-meet-turnserver
53
 Package: jitsi-meet-turnserver
58
 Architecture: all
54
 Architecture: all
55
+Breaks: apache2
59
 Depends: ${misc:Depends}, nginx (>= 1.13.10) | nginx-full (>= 1.13.10) | nginx-extras (>= 1.13.10), jitsi-meet-prosody, coturn, dnsutils
56
 Depends: ${misc:Depends}, nginx (>= 1.13.10) | nginx-full (>= 1.13.10) | nginx-extras (>= 1.13.10), jitsi-meet-prosody, coturn, dnsutils
60
 Description: Configures coturn to be used with Jitsi Meet
57
 Description: Configures coturn to be used with Jitsi Meet

+ 46
- 16
debian/jitsi-meet-web-config.postinst Переглянути файл

68
             FORCE_APACHE="true"
68
             FORCE_APACHE="true"
69
         fi
69
         fi
70
 
70
 
71
+        UPLOADED_CERT_CHOICE="I want to use my own certificate"
71
         # if first time config ask for certs, or if we are reconfiguring
72
         # if first time config ask for certs, or if we are reconfiguring
72
         if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
73
         if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
73
-            # SSL for nginx
74
             db_get jitsi-meet/cert-choice
74
             db_get jitsi-meet/cert-choice
75
             CERT_CHOICE="$RET"
75
             CERT_CHOICE="$RET"
76
-            UPLOADED_CERT_CHOICE="I want to use my own certificate"
77
 
76
 
78
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
77
             if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
79
                 db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
78
                 db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
104
         if [ ! -f $JITSI_MEET_CONFIG ] ; then
103
         if [ ! -f $JITSI_MEET_CONFIG ] ; then
105
             cp /usr/share/jitsi-meet-web-config/config.js $JITSI_MEET_CONFIG
104
             cp /usr/share/jitsi-meet-web-config/config.js $JITSI_MEET_CONFIG
106
             # replaces needed config for multidomain as it works only with nginx
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
             sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
109
             sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
109
         fi
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
         if [[ "$JVB_SERVE" = "true" ]] ; then
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
             # this is a reconfigure, lets just delete old links
156
             # this is a reconfigure, lets just delete old links
127
             if [ "$RECONFIGURING" = "true" ] ; then
157
             if [ "$RECONFIGURING" = "true" ] ; then

+ 1
- 1
doc/quick-install.md Переглянути файл

43
 
43
 
44
 ### Install Jitsi Meet
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
 ```sh
48
 ```sh
49
 apt-get -y install jitsi-meet
49
 apt-get -y install jitsi-meet

Завантаження…
Відмінити
Зберегти