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:

  • jicofo_component_secret (String)

    (required) XMPP component password for Jicofo; set it to random string as output by ‘openssl rand -hex 16`

  • jicofo_auth_password (String)

    (required) XMPP password for Jicofo client connections; set it to random string as output by ‘openssl rand -hex 16`

  • jvb_auth_password (String)

    (required) XMPP password for JVB client connections; set it to random string as output by ‘openssl rand -hex 16`

  • jigasi_xmpp_password (String)

    (required) XMPP password for Jigasi MUC client connections; set it to random string as output by ‘openssl rand -hex 16`

  • jibri_recorder_password (String)

    (required) XMPP recorder password for Jibri client connections; set it to random string as output by ‘openssl rand -hex 16`

  • jibri_xmpp_password (String)

    (required) XMPP password for Jibri client connections; set it to random string as output by ‘openssl rand -hex 16`

  • 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

  • disable_simulcast (Boolean)

    Unsure about the actual effects. In my case disabling simulcast allowed me to use screensharing.

  • 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.



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
174
# File 'manifests/containerized_server.pp', line 87

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 $jicofo_component_secret,
  String $jicofo_auth_password,
  String $jvb_auth_password,
  String $jigasi_xmpp_password,
  String $jibri_recorder_password,
  String $jibri_xmpp_password,
  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 $disable_simulcast,
  Boolean $require_display_name,
  Integer $channel_last_n,
) {
  include docker
  include docker::compose

  # 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  => present,
    content => template('jitsi/env.erb'),
  }

  # start jitsi if it's not running yet
  if $facts['jitsi']['running'] != true {
    exec { 'turn on jitsi':
      cwd     => '/srv/jitsi',
      command => '/usr/local/bin/docker-compose up -d',
    }
  }
  else {
    if $facts['jitsi']['version'] != $version {
      exec { 'turn off jitsi':
        cwd     => '/srv/jitsi',
        command => '/usr/local/bin/docker-compose down',
      }
      exec { '/usr/bin/rm -Rf /srv/jitsi/.jitsi-meet-cfg' : }
      exec { 'turn on jitsi':
        cwd     => '/srv/jitsi',
        command => '/usr/local/bin/docker-compose up -d',
      }
    }
  }

  # 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',
  }

}