1 import ./make-test-python.nix ({ pkgs, ... }: {
3 meta = with pkgs.lib; {
4 maintainers = teams.jitsi.members;
7 nodes.machine = { config, pkgs, ... }: {
8 virtualisation.memorySize = 5120;
10 services.jitsi-meet = {
15 services.jibri.ignoreCert = true;
16 services.jitsi-videobridge.openFirewall = true;
18 networking.firewall.allowedTCPPorts = [ 80 443 ];
20 services.nginx.virtualHosts.machine = {
25 security.acme.email = "me@example.org";
26 security.acme.acceptTerms = true;
27 security.acme.server = "https://example.com"; # self-signed only
31 machine.wait_for_unit("jitsi-videobridge2.service")
32 machine.wait_for_unit("jicofo.service")
33 machine.wait_for_unit("nginx.service")
34 machine.wait_for_unit("prosody.service")
35 machine.wait_for_unit("jibri.service")
37 machine.wait_until_succeeds(
38 "journalctl -b -u prosody -o cat | grep -q 'Authenticated as focus@auth.machine'", timeout=31
40 machine.wait_until_succeeds(
41 "journalctl -b -u prosody -o cat | grep -q 'Authenticated as jvb@auth.machine'", timeout=32
43 machine.wait_until_succeeds(
44 "journalctl -b -u prosody -o cat | grep -q 'Authenticated as jibri@auth.machine'", timeout=33
46 machine.wait_until_succeeds(
47 "cat /var/log/jitsi/jibri/log.0.txt | grep -q 'Joined MUC: jibribrewery@internal.machine'", timeout=34
50 assert '"busyStatus":"IDLE","health":{"healthStatus":"HEALTHY"' in machine.succeed(
51 "curl -X GET http://machine:2222/jibri/api/v1.0/health"
54 """curl -H "Content-Type: application/json" -X POST http://localhost:2222/jibri/api/v1.0/startService -d '{"sessionId": "RecordTest","callParams":{"callUrlInfo":{"baseUrl": "https://machine","callName": "TestCall"}},"callLoginParams":{"domain": "recorder.machine", "username": "recorder", "password": "'"$(cat /var/lib/jitsi-meet/jibri-recorder-secret)"'" },"sinkType": "file"}'"""
56 machine.wait_until_succeeds(
57 "cat /var/log/jitsi/jibri/log.0.txt | grep -q 'File recording service transitioning from state Starting up to Running'", timeout=35
60 """sleep 15 && curl -H "Content-Type: application/json" -X POST http://localhost:2222/jibri/api/v1.0/stopService -d '{"sessionId": "RecordTest","callParams":{"callUrlInfo":{"baseUrl": "https://machine","callName": "TestCall"}},"callLoginParams":{"domain": "recorder.machine", "username": "recorder", "password": "'"$(cat /var/lib/jitsi-meet/jibri-recorder-secret)"'" },"sinkType": "file"}'"""
62 machine.wait_until_succeeds(
63 "cat /var/log/jitsi/jibri/log.0.txt | grep -q 'Finalize script finished with exit value 0'", timeout=36