matrix-docker-ansible-deploy
matrix-docker-ansible-deploy copied to clipboard
Add Element Call, Livekit Server and JWT Service integrations for Element Call functionality
This Pull Request adds support for deploying Element Call, JWT Service, and Livekit Server as part of the Matrix stack. The changes introduce new roles and corresponding tasks, systemd services, configuration files, and updates to existing configurations to support these new components.
Summary of Changes:
-
New Roles Added:
- Element Call: Handles the setup, configuration, and deployment of the Element Call container.
- JWT Service: Deploys the JWT Service for managing Livekit authentication.
- Livekit Server: Configures and runs the Livekit server for video conferencing.
-
Key Additions:
- Systemd Services: Added systemd files for each service to manage the Docker containers for Element Call, JWT Service, and Livekit.
- Configuration Updates:
- Updated
homeserver.yamlto include listener settings for Element Call. - Modified the well-known client JSON to support the RTC FOCI needed for Element Call and Livekit.
- Updated the Element Web
config.jsonto include configuration settings for using Element Call. - Added well-known configuration for Element X to point to Element Call.
- Updated
-
Traefik Configuration:
- Added appropriate Traefik labels for Element Call, JWT Service, and Livekit Server containers to ensure that requests are correctly proxied to the appropriate service.
- Created separate labels files for each service for better organization and maintainability.
-
Tasks and Templates:
- Refactored common tasks into reusable components where possible.
- Added validation tasks to ensure all required configurations are present before deployment.
- Created and updated necessary templates (
config.json,element.json,livekit.yaml.j2, etc.) to provide the correct settings for each service.
Testing Performed:
- Each role was tested independently, and the full deployment was validated to ensure that:
- Containers start successfully with the correct configurations.
- Systemd services are set up and managed properly.
- Element Call integrates seamlessly with the Matrix ecosystem, allowing users to initiate video calls through Element.
- Traefik correctly routes requests for each service based on defined hostnames.
Documentation:
- Updated documentation in the
docsdirectory to include setup and configuration details for:- Element Call: Including required DNS changes and settings for the well-known client.
- JWT Service and Livekit Server: Configuration steps, default variables, and examples of customization.
Limitations:
- Standalone Element Call: While Element Call works within the Element apps, the standalone
call.DOMAINwebsite for ad-hoc calls will not function correctly until the Matrix Authentication Service (MAS) is implemented. This is due to the requirement of an OIDC header from MAS, which is currently not in place.
Checklist:
- [x] Roles for Element Call, JWT Service, and Livekit Server created and tested.
- [x] Systemd files for service management added.
- [x] Traefik labels set correctly for each container.
- [x] Configuration files updated or created as required.
- [x] Documentation updated with detailed setup instructions.
- [x] Group Vars and Setup Playbook modified to accommodate new roles.
- [x] Testing performed to ensure no regression and correctness of new additions.
Notes for Reviewers:
- The changes involve significant updates to the configuration and introduction of multiple new roles. Please verify that all group variables and systemd services have been defined as required.
- Special attention should be given to the well-known client configuration and the integration of Traefik labels to ensure that requests are correctly proxied.
- Please note the current limitation regarding the standalone Element Call website until MAS integration is complete.