From 1e6698cb994b360b06b4d101bad4412cace6f3cc Mon Sep 17 00:00:00 2001 From: wjbeckett Date: Wed, 2 Oct 2024 13:27:02 +1000 Subject: [PATCH] updated documentation or the new roles. --- docs/configuring-playbook-jwt-service.md | 45 +++++++++++++++++ docs/configuring-playbook-livekit-server.md | 56 +++++++++++++++++++++ docs/configuring-playbook.md | 4 ++ 3 files changed, 105 insertions(+) create mode 100644 docs/configuring-playbook-jwt-service.md create mode 100644 docs/configuring-playbook-livekit-server.md diff --git a/docs/configuring-playbook-jwt-service.md b/docs/configuring-playbook-jwt-service.md new file mode 100644 index 000000000..7910c0920 --- /dev/null +++ b/docs/configuring-playbook-jwt-service.md @@ -0,0 +1,45 @@ +# Setting up JWT Service (optional) + +The playbook can install and configure [JWT Service](https://github.com/element-hq/lk-jwt-service) for you. + +LK-JWT-Service is currently used for a single reason: generate JWT tokens with a given identity for a given room, so that users can use them to authenticate against LiveKit SFU. + +See the project's [documentation](https://github.com/element-hq/lk-jwt-service/) to learn more. + +## Decide on a domain and path + +By default, JWT Service is configured to be served on the Matrix domain (`sfu-jwt.DOMAIN`, controlled by the `matrix_jwt-service_hostname` variable). + +This makes it easy to set it up, **without** having to adjust your DNS records manually. + +If you'd like to run JWT Service on another hostname or path, use the `matrix_jwt-service_hostname` variable. + +## Adjusting DNS records + +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: +- `sfu-jwt.DOMAIN` + +## Adjusting the playbook configuration + +Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file: + +```yaml +matrix_jwt_service_enabled: true +# Set a secure key for LiveKit authentication +matrix_element_call_livekit_dev_key: 'your-secure-livekit-key' +``` + +## Installing +After potentially adjusting DNS records and configuring the playbook, run the installation command again: +```yaml +ansible-playbook -i inventory setup.yml +``` + +## 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`). + +## Additional Information + +Refer to the JWT-Service documentation for more details on configuring and using JWT Service. \ No newline at end of file diff --git a/docs/configuring-playbook-livekit-server.md b/docs/configuring-playbook-livekit-server.md new file mode 100644 index 000000000..dd1b4b229 --- /dev/null +++ b/docs/configuring-playbook-livekit-server.md @@ -0,0 +1,56 @@ +# Setting up Livekit (optional) + +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. + +See the project's [documentation](https://github.com/livekit/livekit) to learn more. + +## Decide on a domain and path + +By default, Livekit is configured to be served on the Matrix domain (`sfu.DOMAIN`, controlled by the `matrix_livekit_server_hostname` variable). + +This makes it easy to set it up, **without** having to adjust your DNS records manually. + +If you'd like to run Livekit on another hostname or path, use the `matrix_livekit_server_hostname` variable. + +## Adjusting DNS records + +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: +- `sfu.DOMAIN` + +## Adjusting the playbook configuration + +Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file: + +```yaml +matrix_livekit_server_enabled: true +# Set a secure key for LiveKit authentication +matrix_element_call_livekit_dev_key: 'your-secure-livekit-key' +``` + +## Installing +After potentially adjusting DNS records and configuring the playbook, run the installation command again: +```yaml +ansible-playbook -i inventory setup.yml +``` + +## Usage +Once installed, and in conjunction with Element Call and JWT Service, Livekit will become the WebRTC backend for all Element client calls. + +## Required Firewall and Port Forwarding Rules + +To ensure the services function correctly, the following firewall rules and port forwarding settings are required: + +LiveKit: + + • Forward UDP ports 50100:50200 to the Docker instance running LiveKit. + • Forward TCP port 7881 to the Docker instance running LiveKit. + +Ensure these ports are open and forwarded appropriately to allow traffic to flow correctly between the services. + +## Additional Information + +Refer to the Livekit documentation for more details on configuring and using Livekit. \ No newline at end of file diff --git a/docs/configuring-playbook.md b/docs/configuring-playbook.md index fb0704e08..fc75ceaa6 100644 --- a/docs/configuring-playbook.md +++ b/docs/configuring-playbook.md @@ -234,3 +234,7 @@ When you're done with all the configuration you'd like to do, continue with [Ins - [Setting up Prometheus Alertmanager integration via matrix-alertmanager-receiver](configuring-playbook-alertmanager-receiver.md) (optional) - [Setting up the Element Call server](configuring-playbook-element-call.md) (optional) + +- [Setting up the JWT Service](configuring-playbook-jwt-service.md) (optional) + +- [Setting up the Livekit server](configuring-playbook-livekit-server.md) (optional)