Skip to content

Terraform setup for Jitsi Meet with scalability in mind

License

Notifications You must be signed in to change notification settings

scp7/jitsi-terraform-scalable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform configuration for a scalable Jitsi Meet setup

Currently supports Google Cloud Platform (GCP) only.

Warning: terraform apply will delete old resources also, if you rename the shard for example.

How it works

  • Creates an 3 kinds of instances:

    1. jitsi-meet (prosody, jicofo, jitsi-meet, nginx): 1 jitsi-meet server
    2. jitsi-video-bridge (JVB/SFU): more than 2 jvb for scalability joined in a Managed Instance Group with autoscaling
    3. coturn
  • Creates startup scripts for each of the instances above

  • Creates required firewall configuration

Manual steps

Example configuration

terraform workspace list
terraform workspace new [MYNAME]
terraform workspace select [MYNAME]

terraform init
terraform import -var-file=terraform.tfvars.json google_compute_network.default default
terraform import -var-file=terraform.tfvars.json google_dns_managed_zone.default [name of your preconfigured dns zone]
terraform apply -var-file terraform.tfvars.json

terraform.tfvars.json could look like this:

{
  "gcp_project": "your-gcp-project-1234",
  "dnszone_name": "yourdnszone",
  "dnszone_dnsname": "yourdnszone.example.org.",
  "lets_encrypt_email": "[email protected]",
  "jitsi_shard": {
    "id": 1,
    "size": 2,
    "random": "random",
    "region": "europe-west4",
    "zone": "europe-west4-b",
    "sfuMachineType": "n2-standard-4",
    "xmppMachineType": "n2-standard-2",
  }
}

Debugging

# jitsi-meet
journalctl -f
tail -f /var/log/prosody/prosody.* /var/log/jitsi/jicofo.log
journalctl --since "1 hour ago" -f
# errors only:
journalctl --since "1 hour ago" -f -p "emerg".."crit"

# JVB
tail -f /var/log/jitsi/jvb.log
journalctl --since "1 hour ago" -f

You can test Coturn servers with time-limited credentials with a bit of effort:

Debug coturn with tail -f /var/log/turnserver*

TODO

References / contribution

About

Terraform setup for Jitsi Meet with scalability in mind

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 58.8%
  • Smarty 38.9%
  • Shell 2.3%