Merge branch 'element-call-integration' of github.com:wjbeckett/matrix-docker-ansible-deploy into element-call-integration

This commit is contained in:
Slavi Pantaleev 2024-11-21 16:31:50 +02:00
commit 79ae704a24
5 changed files with 49 additions and 41 deletions

View File

@ -19,9 +19,9 @@ If you'd like to run Element Call on another hostname or path, use the `matrix_e
If you've changed the default hostname, **you may need to adjust your DNS** records accordingly to point to the correct server. If you've changed the default hostname, **you may need to adjust your DNS** records accordingly to point to the correct server.
Ensure that the following DNS names have a public IP/FQDN: Ensure that the following DNS names have a public IP/FQDN:
- `call.DOMAIN` - `call.example.com`
- `sfu.DOMAIN` - `sfu.example.com`
- `sfu-jwt.DOMAIN` - `sfu-jwt.example.com`
## Adjusting the playbook configuration ## Adjusting the playbook configuration
@ -31,25 +31,21 @@ NOTE: Element call is dependent on two other services for it to function as inte
Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file: Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file:
```yaml ```yaml
# Enable dependent services
keydb_enabled: true
matrix_element_call_enabled: true matrix_element_call_enabled: true
livekit_server_enabled: true
matrix_jwt_service_enabled: true
# Set a secure key for LiveKit authentication # Set a secure key for LiveKit authentication
livekit_server_dev_key: 'your-secure-livekit-key' livekit_server_dev_key: 'your-secure-livekit-key'
``` ```
## Installing ## Installing
After potentially adjusting DNS records and configuring the playbook, run the installation command again:
```yaml After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records), run the [installation](installing.md) command: `just install-all` or `just setup-all`
ansible-playbook -i inventory setup.yml
```
## Usage ## Usage
Once installed, Element Call integrates seamlessly with Matrix clients like Element Web. When the Element Call service is installed, the `/.well-known/matrix/client` file is also updated. A new `org.matrix.msc4143.rtc_foci` section is added to point to your JWT service URL (e.g., `https://sfu-jwt.DOMAIN`).
Additionally, the `/.well-known/element/element.json` file is created to help Element clients discover the Element Call URL (e.g., `https://call.DOMAIN`). Once installed, Element Call integrates seamlessly with Matrix clients like Element Web. When the Element Call service is installed, the `/.well-known/matrix/client` file is also updated. A new `org.matrix.msc4143.rtc_foci` section is added to point to your JWT service URL (e.g., `https://sfu-jwt.example.com`).
Additionally, the `/.well-known/element/element.json` file is created to help Element clients discover the Element Call URL (e.g., `https://call.example.com`).
## Required Firewall and Port Forwarding Rules ## Required Firewall and Port Forwarding Rules

View File

@ -23,22 +23,22 @@ Ensure that the following DNS names have a public IP/FQDN:
## Adjusting the playbook configuration ## Adjusting the playbook configuration
Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file: Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
```yaml ```yaml
matrix_jwt_service_enabled: true matrix_jwt_service_enabled: true
# Set a secure key for LiveKit authentication # Set a secure key for LiveKit authentication
matrix_element_call_livekit_dev_key: 'your-secure-livekit-key' matrix_element_call_livekit_dev_key: 'your-secure-livekit-key'
``` ```
## Installing ## Installing
After potentially adjusting DNS records and configuring the playbook, run the installation command again:
```yaml After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records), run the [installation](installing.md) command: `just install-all` or `just setup-all`
ansible-playbook -i inventory setup.yml
```
## Usage ## Usage
Once installed, a new `org.matrix.msc4143.rtc_foci` section is added to the element web client to point to your JWT service URL (e.g., `https://sfu-jwt.DOMAIN`).
Once installed, a new `org.matrix.msc4143.rtc_foci` section is added to the element web client to point to your JWT service URL (e.g., `https://sfu-jwt.example.com`).
## Additional Information ## Additional Information

View File

@ -1,6 +1,6 @@
# Setting up Livekit (optional) # Setting up LiveKit (optional)
The playbook can install and configure [Livekit](https://github.com/livekit/livekit) for you. The playbook can install and configure [LiveKit](https://github.com/livekit/livekit) for you.
LiveKit is an open source project that provides scalable, multi-user conferencing based on WebRTC. It's designed to provide everything you need to build real-time video audio data capabilities in your applications. LiveKit is an open source project that provides scalable, multi-user conferencing based on WebRTC. It's designed to provide everything you need to build real-time video audio data capabilities in your applications.
@ -8,7 +8,7 @@ See the project's [documentation](https://github.com/livekit/livekit) to learn m
## Decide on a domain and path ## Decide on a domain and path
By default, Livekit is configured to be served on the Matrix domain (`sfu.DOMAIN`, controlled by the `livekit_server_hostname` variable). By default, LiveKit is configured to be served on the Matrix domain (`sfu.example.com`, controlled by the `livekit_server_hostname` variable).
This makes it easy to set it up, **without** having to adjust your DNS records manually. This makes it easy to set it up, **without** having to adjust your DNS records manually.
@ -19,23 +19,22 @@ If you'd like to run Livekit on another hostname or path, use the `livekit_serve
If you've changed the default hostname, **you may need to adjust your DNS** records accordingly to point to the correct server. If you've changed the default hostname, **you may need to adjust your DNS** records accordingly to point to the correct server.
Ensure that the following DNS names have a public IP/FQDN: Ensure that the following DNS names have a public IP/FQDN:
- `sfu.DOMAIN` - `sfu.example.com`
## Adjusting the playbook configuration ## Adjusting the playbook configuration
Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file: Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
```yaml ```yaml
livekit_server_enabled: true livekit_server_enabled: true
# Set a secure key for LiveKit authentication # Set a secure key for LiveKit authentication
matrix_element_call_livekit_dev_key: 'your-secure-livekit-key' livekit_server_dev_key: 'your-secure-livekit-key'
``` ```
## Installing ## Installing
After potentially adjusting DNS records and configuring the playbook, run the installation command again:
```yaml After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records), run the [installation](installing.md) command: `just install-all` or `just setup-all`
ansible-playbook -i inventory setup.yml
```
## Usage ## Usage
Once installed, and in conjunction with Element Call and JWT Service, Livekit will become the WebRTC backend for all Element client calls. Once installed, and in conjunction with Element Call and JWT Service, Livekit will become the WebRTC backend for all Element client calls.

View File

@ -4424,7 +4424,7 @@ redis_base_path: "{{ matrix_base_data_path }}/redis"
# #
###################################################################### ######################################################################
keydb_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_experimental_encryption_enabled) }}" keydb_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_experimental_encryption_enabled) or matrix_element_call_enabled }}"
keydb_identifier: matrix-keydb keydb_identifier: matrix-keydb
@ -6058,13 +6058,12 @@ matrix_element_call_container_labels_traefik_tls_certResolver: "{{ traefik_certR
######################################################################## ########################################################################
# # # #
# matrix-livekit-server # # livekit-server #
# # # #
######################################################################## ########################################################################
# Matrix Livekit Server Configuration livekit_server_enabled: "{{ matrix_element_call_enabled }}"
livekit_server_enabled: false # Default is false; should be enabled in host_vars as needed
livekit_server_version: "latest" # Default version; can be overridden in host_vars
livekit_server_scheme: "https" livekit_server_scheme: "https"
livekit_server_hostname: "sfu.{{ matrix_domain }}" # Default hostname; should be overridden in host_vars if different livekit_server_hostname: "sfu.{{ matrix_domain }}" # Default hostname; should be overridden in host_vars if different
livekit_server_path_prefix: "/" livekit_server_path_prefix: "/"
@ -6074,7 +6073,7 @@ livekit_server_container_image_force_pull: true
# Docker network configuration for Livekit # Docker network configuration for Livekit
livekit_server_container_network: "{{ matrix_addons_container_network }}" livekit_server_container_network: "{{ matrix_addons_container_network }}"
livekit_server_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (livekit_server_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}" livekit_server_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (livekit_server_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
# Traefik Configuration for Livekit # Traefik Configuration for Livekit
matrix_livekit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" matrix_livekit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
@ -6087,7 +6086,7 @@ livekit_server_livekit_dev_key: "{{ livekit_server_dev_key }}" # LiveKit dev ke
######################################################################## ########################################################################
# # # #
# /matrix-livekit-server # # /livekit-server #
# # # #
######################################################################## ########################################################################
@ -6097,8 +6096,8 @@ livekit_server_livekit_dev_key: "{{ livekit_server_dev_key }}" # LiveKit dev ke
# # # #
######################################################################## ########################################################################
# Matrix JWT Service Configuration matrix_jwt_service_enabled: "{{ matrix_element_call_enabled }}"
matrix_jwt_service_enabled: false # Default is false; should be enabled in host_vars as needed
matrix_jwt_service_version: "latest-ci" # Default version; can be overridden in host_vars matrix_jwt_service_version: "latest-ci" # Default version; can be overridden in host_vars
matrix_jwt_service_scheme: "https" # Scheme for Element Call (e.g., https) matrix_jwt_service_scheme: "https" # Scheme for Element Call (e.g., https)
matrix_jwt_service_hostname: "sfu-jwt.{{ matrix_domain }}" # Default hostname; should be overridden in host_vars if different matrix_jwt_service_hostname: "sfu-jwt.{{ matrix_domain }}" # Default hostname; should be overridden in host_vars if different

View File

@ -1,17 +1,31 @@
--- ---
# Enable or disable matrix-livekit-server deployment
# Project source code URL: https://github.com/livekit/livekit
livekit_server_enabled: false livekit_server_enabled: false
# Base path configuration # Base path configuration
livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server" livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server"
# renovate: datasource=docker depName=livekit/livekit-server
livekit_server_version: v1.8.0
# Docker network configuration # Docker network configuration
livekit_server_container_network: '' livekit_server_container_network: ''
livekit_server_container_http_host_bind_port: '' livekit_server_container_http_host_bind_port: ''
livekit_server_container_additional_networks: [] # No additional networks by default
# Docker images livekit_server_container_additional_networks: "{{ livekit_server_container_additional_networks_auto + livekit_server_container_additional_networks_custom }}"
livekit_server_container_additional_networks_auto: []
livekit_server_container_additional_networks_custom: []
livekit_server_container_image_self_build: false
livekit_server_container_repo: "https://github.com/livekit/livekit.git"
livekit_server_container_repo_version: "{{ 'main' if livekit_server_version == 'latest' else livekit_server_version }}"
livekit_server_container_src_files_path: "{{ livekit_server_base_path }}/container-src"
livekit_server_container_image: "livekit/livekit-server:latest" livekit_server_container_image: "livekit/livekit-server:latest"
livekit_server_container_image_name_prefix: "{{ 'localhost/' if livekit_server_container_image_self_build else 'docker.io/' }}"
livekit_server_container_image_force_pull: "{{ livekit_server_container_image.endswith(':latest') }}"
# LiveKit configuration # LiveKit configuration
livekit_server_livekit_server_dev_key: "{{ livekit_server_dev_key }}" # Must be defined in host_vars livekit_server_livekit_server_dev_key: "{{ livekit_server_dev_key }}" # Must be defined in host_vars