Просмотр исходного кода

PR review comments and additional documentation

pull/2166/head
Warren Bailey 3 лет назад
Родитель
Сommit
8d2e2342be
3 измененных файлов: 40 добавлений и 15 удалений
  1. +29
    -4
      docs/configuring-playbook-jitsi.md
  2. +8
    -5
      roles/matrix-nginx-proxy/defaults/main.yml
  3. +3
    -6
      roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-jitsi.conf.j2

+ 29
- 4
docs/configuring-playbook-jitsi.md Просмотреть файл

@@ -134,19 +134,44 @@ By default a single JVB is deployed on the same hosts as the matrix server. To t
There is a ansible role that can be run with the following tag:
` ansible-playbook -i inventory/hosts --limit jitsi_jvb_servers setup.yml --tags=common,setup-additional-jitsi-jvb `

For this role to work you will need an additional section in the ansible hosts file with the details of the JVB hosts, for example
For this role to work you will need an additional section in the ansible hosts file with the details of the JVB hosts, for example:
```
[jitsi_jvb_servers]
<your jvb hosts> ansible_host=<ip address of the jvb host>
```

The followings variables will need to be set in the vars file for each JVB:
Each JVB will require a server id to be set so that it can be uniquely identify and this allows jitsi to keep track of which conferences are on which JVB.
The server id is set with the variable `matrix_jitsi_jvb_server_id` which ends up as the JVB_WS_SERVER_ID environment variables in the JVB docker container.
This variable can be set via the host file, a parameter to the ansible command or in the vars.yaml for the host which will have the additional JVB. For example:

``` yaml
matrix_jitsi_jvb_server_id: '<ip address of the jvb host>'
matrix_jitsi_jvb_server_id: 'jvb-2'
```

This will provision a single JVB instance to that host which will then register itself with the prosody service and make itself available for jicofo to route conferences too.
``` INI
[jitsi_jvb_servers]
jvb-2.example.com ansible_host=192.168.0.1 matrix_jitsi_jvb_server_id=jvb-2
jvb-3.example.com ansible_host=192.168.0.1 matrix_jitsi_jvb_server_id=jvb-2
```

Note that the server id jvb-1 is reserved for JVB instance running on the main host and therefore should not be used as the id of an additional jvb host.

The nginx configuration will also need to be updated in order to deal with the additional jvbs server. This is achieved via its own configuration variable
`matrix_nginx_proxy_proxy_jitsi_additional_jvbs`, which contains a dictionary of server ids to ip addresses.

For example,

``` yaml
matrix_nginx_proxy_proxy_jitsi_additional_jvbs:
jvb-2: 192.168.0.1
jvb-3: 192.168.0.2
```
matrix_nginx_proxy_proxy_jitsi_additional_jvbs: {}


Applied together this will allow you to provision a extra JVB instances which will register themselves with the prosody service and be available for jicofo
to route conferences too.



## Apply changes


+ 8
- 5
roles/matrix-nginx-proxy/defaults/main.yml Просмотреть файл

@@ -647,8 +647,11 @@ matrix_nginx_proxy_synapse_cache_proxy_cache_valid_time: "24h"
matrix_nginx_proxy_worker_processes: auto
matrix_nginx_proxy_worker_connections: 1024

# A mapping of JVB ids to hostname for additional jvb blocks to add to Jitsi's server configuration (matrix-jitsi.conf)
matrix_nginx_proxy_proxy_jitsi_additional_jvbs_enabled: false
matrix_nginx_proxy_proxy_jitsi_additional_jvbs:
- jvb-2: 192.168.0.1
- jvb-3: 192.168.0.2
# A mapping of JVB server ids to hostname/ipa addresses used to add additional jvb blocks
# to the Jitsi's server configuration (matrix-jitsi.conf)
# Note: avoid using the JVB server id "jvb-1" as this is reserved for the main host.
# Example:
# matrix_nginx_proxy_proxy_jitsi_additional_jvbs:
# jvb-2: 192.168.0.1
# jvb-3: 192.168.0.2
matrix_nginx_proxy_proxy_jitsi_additional_jvbs: {}

+ 3
- 6
roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-jitsi.conf.j2 Просмотреть файл

@@ -53,12 +53,10 @@

tcp_nodelay on;
}
{% if matrix_nginx_proxy_proxy_jitsi_additional_jvbs_enabled %}
{% for jvb in matrix_nginx_proxy_proxy_jitsi_additional_jvbs %}
{% for id in jvb %}
{% for id, ip_address in matrix_nginx_proxy_proxy_jitsi_additional_jvbs %}
# colibri (JVB) websockets for additional JVBs
location ~ ^/colibri-ws/{{ id | regex_escape }}/(.*) {
proxy_pass http://{{ jvb[id] }}:9090/colibri-ws/{{ id }}/$2$is_args$args;
proxy_pass http://{{ ip_address }}:9090/colibri-ws/{{ id }}/$1$is_args$args;

proxy_set_header Host $host;
proxy_set_header X-Forwarded-For {{ matrix_nginx_proxy_x_forwarded_for }};
@@ -70,8 +68,7 @@
tcp_nodelay on;
}
{% endfor %}
{% endfor %}
{% endif %}


# XMPP websocket
location = /xmpp-websocket {


Загрузка…
Отмена
Сохранить