Puppet Class: jitsi::containerized_server

Defined in:
manifests/containerized_server.pp

Summary

Install Jitsi as a containerized service

Overview

This class downloads definitions from github.com/jitsi/docker-jitsi-meet and performs basic settings to produce a simple working setup of jitsi. The code in the repository uses docker-compose to start the services as containers.

Examples:

include jitsi::containerized_server

Parameters:

  • http_port (Integer)

    Set the port on which you can reach the web frontend via HTTP. Defaults to 30799. This is required in particular if you run Jitsi behin a reverse proxy.

  • https_port (Integer)

    Set the port on which you can reach the web frontend via HTTPS. Defaults to 30800.

  • timezone (String)

    Set the timezone, your jitsi instance is running in. Defaults to Europe/Amsterdam.

  • public_url (String)

    Set the URL where your users can reach the web frontend.

  • domain (String)

    FQDN of your jitsi instance.

  • version (String)

    version of the container images used

  • jibri_domain (String)

    If using jibri for recording or streaming, it enters the meeting as an additional user. If it has the domain given in this parameter it will actually be hidden.

  • enable_breakout_rooms (Boolean)

    Enables breakout rooms

  • disable_all_audio_processing (Boolean)

    Set to True if you want to disable all audio processing. Overrides all of the subsequent parameters.

  • disable_echo_cancellation (Boolean)

    Set to True if you want to disable echo cancellation.

  • disable_noise_supression (Boolean)

    Set to True if you want to disable noise suppression.

  • disable_auto_gain_control (Boolean)

    Set to True if you want to disable auto gain control.

  • disable_high_pass_filter (Boolean)

    Set to True if you want to disable high pass filtering.

  • jwt_app_id (String)

    Define an id for embedding into jwt based authentication

  • jwt_app_secret (String)

    Secret for use with JWT authentication

  • allow_guests (Integer)

    If guests access is allowed

  • disable_third_party_requests (Boolean)

    when set to true, no third parties like gravatar will be called (default)

  • noisy_mic_detection (Boolean)

    set to false if you want to disable the detection of noisy mics

  • video_resolution (Integer)

    set the preferred video resolution

  • start_muted (Boolean)

    use this to define if a user shall start muted (true) or with audio enabled (false)

  • start_without_video (Boolean)

    use this to define if a user shall start without video activatedf (true)

  • enable_prejoin_page (Boolean)

    the prejoin page is shown to users right before joining, asking for a name and the audio/video settings. Set this value to true if you want such a page

  • enable_simulcast (Boolean)

    Unsure about the actual effects.

  • require_display_name (Boolean)

    Set to true if you require your users to select a name

  • channel_last_n (Integer)

    This value can help to save bandwidth on the server. If set to a positive integer, only this amount of videostreams is sent, representing the last N speakers.

  • custom_variables (Optional[Hash[String, Variant[Integer, String, Boolean]]])

    Add custom environment variables which are documented at jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker/

  • compose_jigasi (Boolean)

    Compose and start Jigasi container, the SIP (audio only) gateway.

  • compose_jibri (Boolean)

    Compose and start Jibri container, the broadcasting infrastructure.

  • compose_etherpad (Boolean)

    Compose and start Etherpad container, a real-time collaborative editor.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'manifests/containerized_server.pp', line 78

class jitsi::containerized_server (
  Integer $http_port,
  Integer $https_port,
  String $timezone,
  String $public_url,
  String $domain,
  String $version,
  String $jibri_domain,
  Boolean $disable_all_audio_processing,
  Boolean $disable_echo_cancellation,
  Boolean $disable_noise_supression,
  Boolean $disable_auto_gain_control,
  Boolean $disable_high_pass_filter,
  Boolean $enable_breakout_rooms,
  String $jwt_app_id,
  String $jwt_app_secret,
  Integer $allow_guests,
  Boolean $disable_third_party_requests,
  Boolean $noisy_mic_detection,
  Integer $video_resolution,
  Boolean $start_muted,
  Boolean $start_without_video,
  Boolean $enable_prejoin_page,
  Boolean $enable_simulcast,
  Boolean $require_display_name,
  Integer $channel_last_n,
  Optional[Hash[String, Variant[Integer, String, Boolean]]] $custom_variables,
  Boolean $compose_jigasi,
  Boolean $compose_jibri,
  Boolean $compose_etherpad,
) {
  include docker
  include docker::compose

  $slug = "${module_name}-jitsi"

  $jicofo_component_secret = extlib::cache_data($slug, 'jicofo_component_secret', extlib::random_password(48))
  $jicofo_auth_password    = extlib::cache_data($slug, 'jicofo_auth_password', extlib::random_password(48))
  $jvb_auth_password       = extlib::cache_data($slug, 'jvb_auth_password', extlib::random_password(48))
  $jigasi_xmpp_password    = extlib::cache_data($slug, 'jigasi_xmpp_password', extlib::random_password(48))
  $jibri_recorder_password = extlib::cache_data($slug, 'jibri_recorder_password', extlib::random_password(48))
  $jibri_xmpp_password     = extlib::cache_data($slug, 'jibri_xmpp_password', extlib::random_password(48))

  # Determine effective value of variables
  if ($jwt_app_id != '' and $jwt_app_secret != '') {
    $auth_enabled = 1
    $auth_type = 'jwt'
  }
  else {
    $auth_enabled = 0
    $auth_type = 'internal'
  }

  # ensure the correct version of the directory content
  vcsrepo { '/srv/jitsi/':
    ensure   => present,
    provider => git,
    source   => 'https://github.com/jitsi/docker-jitsi-meet',
    revision => $version,
  }
  -> file { '/srv/jitsi/.env':
    ensure  => file,
    content => template('jitsi/env.erb'),
    notify  => Service['jitsi'],
  }

  systemd::unit_file { 'jitsi.service':
    content => template('jitsi/jitsi.service.erb'),
    notify  => Service['jitsi'],
  }

  if ($facts['jitsi']['version'] != $version and $facts['jitsi']['version'] != '0.0.0') {
    notify { 'Need to restart jitsi because there is a version change.':
      notify => Service['jitsi'],
    }
  }

  service { 'jitsi':
    ensure => running,
  }

  # do this at the end, otherwise the content is overwritten
  # file { '/srv/jitsi/.jitsi-meet-cfg/web/config.js':
  #   ensure  => present,
  #   content => template('jitsi/web_config.js.erb'),
  #   backup  => '.puppet-bak',
  # }

  # TODO add these entries back to config.js
  # disableThirdPartyRequests: <%= @disable_third_party_requests %>,
  # config.disableAP = <%= @disable_all_audio_processing %>;
  # config.disableAEC = <%= @disable_echo_cancellation %>;
  # config.disableNS = <%= @disable_noise_supression %>;
  # config.disableAGC = <%= @disable_auto_gain_control %>;
  # config.disableHPF = <%= @disable_high_pass_filter %>;
}