summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/apps/jitsi/meet/defaults/main.yml10
-rw-r--r--roles/apps/jitsi/meet/tasks/main.yml96
-rw-r--r--roles/apps/jitsi/meet/templates/pod-spec.yml.j218
3 files changed, 74 insertions, 50 deletions
diff --git a/roles/apps/jitsi/meet/defaults/main.yml b/roles/apps/jitsi/meet/defaults/main.yml
index 4885d827..f60e8ad9 100644
--- a/roles/apps/jitsi/meet/defaults/main.yml
+++ b/roles/apps/jitsi/meet/defaults/main.yml
@@ -13,7 +13,7 @@ jitsi_meet_p2p_enable: yes
jitsi_meet_timezone: Europe/Vienna
-# jitsi_resolution:
+# jitsi_meet_resolution:
# default:
# width: 1280
# height: 720
@@ -21,6 +21,14 @@ jitsi_meet_timezone: Europe/Vienna
# width: 320
# height: 180
+# jitsi_meet_jvb_config_extra: |
+# videobridge {
+# cc {
+# trust-bwe = false
+# onstage-preferred-framerate = 25
+# }
+# }
+
### generate these using: openssl rand -hex 16
# jitsi_meet_secrets:
# jicofo_component_secret: "" ### only needed for versions older than stable-5765-1
diff --git a/roles/apps/jitsi/meet/tasks/main.yml b/roles/apps/jitsi/meet/tasks/main.yml
index a2624024..b16fad07 100644
--- a/roles/apps/jitsi/meet/tasks/main.yml
+++ b/roles/apps/jitsi/meet/tasks/main.yml
@@ -9,6 +9,32 @@
path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/{{ item }}"
state: directory
+- name: configure base pod config hash items
+ set_fact:
+ kubernetes_standalone_pod_config_hash_items_base:
+ - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh"
+ properties:
+ - checksum
+ kubernetes_standalone_pod_config_hash_items_streamui: []
+ kubernetes_standalone_pod_config_hash_items_jvb_conf_extra: []
+
+- name: generate generic prosody cont-init script
+ copy:
+ content: |
+ #!/usr/bin/with-contenv bash
+ sed -e 's#^\(component_interface\s*=\)#-- \1#g' -i /config/prosody.cfg.lua
+ {% if jitsi_meet_auth is defined %}
+
+ echo "authentication enabled:"
+ {% for username, password in jitsi_meet_auth.users.items() %}
+ echo " * registering user: {{ username }}"
+ prosodyctl --config "/config/prosody.cfg.lua" register "{{ username }}" $XMPP_DOMAIN "{{ password }}"
+ {% endfor %}
+ {% endif %}
+ dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh"
+ mode: 0750
+
+
- name: generate stream-ui specific cont-init scripts
when: jitsi_meet_streamui is defined
block:
@@ -39,52 +65,38 @@
dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/web/streamui.sh"
mode: 0755
-- name: generate generic prosody cont-init script
- copy:
- content: |
- #!/usr/bin/with-contenv bash
- sed -e 's#^\(component_interface\s*=\)#-- \1#g' -i /config/prosody.cfg.lua
- {% if jitsi_meet_auth is defined %}
+ - name: configure stream-ui pod config hash items
+ set_fact:
+ kubernetes_standalone_pod_config_hash_items_streamui:
+ - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/streamui.sh"
+ properties:
+ - checksum
+ - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/web/streamui.sh"
+ properties:
+ - checksum
- echo "authentication enabled:"
- {% for username, password in jitsi_meet_auth.users.items() %}
- echo " * registering user: {{ username }}"
- prosodyctl --config "/config/prosody.cfg.lua" register "{{ username }}" $XMPP_DOMAIN "{{ password }}"
- {% endfor %}
- {% endif %}
- dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh"
- mode: 0750
-- name: generate generic jvb cont-init script
- copy:
- content: |
- #!/usr/bin/with-contenv bash
- echo "videobridge.cc.trust-bwe=false" >> /config/jvb.conf
- dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh"
- mode: 0750
+- name: generate jvb cont-init script for extra config snippet
+ when: jitsi_meet_jvb_config_extra is defined
+ block:
+ - name: add jvb extra config snippet to cont-init script of jvb
+ copy:
+ content: |
+ #!/usr/bin/with-contenv bash
+ cat << EOF >> /config/jvb.conf
+ {{ jitsi_meet_jvb_config_extra }}
+ EOF
+ dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh"
+ mode: 0750
-- name: configure base pod config hash items
- set_fact:
- kubernetes_standalone_pod_config_hash_items_base:
- - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh"
- properties:
- - checksum
- - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh"
- properties:
- - checksum
- kubernetes_standalone_pod_config_hash_items_streamui: []
+ - name: configure jvb extra config pod config hash items
+ set_fact:
+ kubernetes_standalone_pod_config_hash_items_jvb_conf_extra:
+ - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh"
+ properties:
+ - checksum
-- name: configure stream-ui pod config hash items
- when: jitsi_meet_streamui is defined
- set_fact:
- kubernetes_standalone_pod_config_hash_items_streamui:
- - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/streamui.sh"
- properties:
- - checksum
- - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/streamui.sh"
- properties:
- - checksum
- name: install pod manifest
vars:
@@ -92,7 +104,7 @@
name: "jitsi-meet-{{ jitsi_meet_inst_name }}"
spec: "{{ lookup('template', 'pod-spec.yml.j2') }}"
mode: "0600"
- config_hash_items: "{{ kubernetes_standalone_pod_config_hash_items_base + kubernetes_standalone_pod_config_hash_items_streamui }}"
+ config_hash_items: "{{ kubernetes_standalone_pod_config_hash_items_base + kubernetes_standalone_pod_config_hash_items_streamui + kubernetes_standalone_pod_config_hash_items_jvb_conf_extra }}"
include_role:
name: kubernetes/standalone/pod
diff --git a/roles/apps/jitsi/meet/templates/pod-spec.yml.j2 b/roles/apps/jitsi/meet/templates/pod-spec.yml.j2
index 4137cec4..c6fed105 100644
--- a/roles/apps/jitsi/meet/templates/pod-spec.yml.j2
+++ b/roles/apps/jitsi/meet/templates/pod-spec.yml.j2
@@ -183,19 +183,19 @@ containers:
- name: TZ
value: {{ jitsi_meet_timezone }}
-{% if jitsi_resolution is defined %}
+{% if jitsi_meet_resolution is defined %}
-{% if 'default' in jitsi_resolution %}
+{% if 'default' in jitsi_meet_resolution %}
- name: RESOLUTION
- value: "{{ jitsi_resolution.default.height }}"
+ value: "{{ jitsi_meet_resolution.default.height }}"
- name: RESOLUTION_WIDTH
- value: "{{ jitsi_resolution.default.width }}"
+ value: "{{ jitsi_meet_resolution.default.width }}"
{% endif %}
-{% if 'min' in jitsi_resolution %}
+{% if 'min' in jitsi_meet_resolution %}
- name: RESOLUTION_MIN
- value: "{{ jitsi_resolution.min.height }}"
+ value: "{{ jitsi_meet_resolution.min.height }}"
- name: RESOLUTION_WIDTH_MIN
- value: "{{ jitsi_resolution.min.width }}"
+ value: "{{ jitsi_meet_resolution.min.width }}"
{% endif %}
{% endif %}
@@ -212,10 +212,12 @@ containers:
hostPort: {{ jitsi_meet_jvb_port }}
hostIP: "{{ external_ip | default(ansible_default_ipv4.address) }}"
volumeMounts:
+{% if jitsi_meet_jvb_config_extra is defined %}
- name: scripts
subPath: jvb/cont-init.sh
mountPath: /etc/cont-init.d/99-k8s
readOnly: yes
+{% endif %}
- name: config
subPath: jvb
mountPath: /config
@@ -244,6 +246,8 @@ containers:
value: "true"
- name: DOCKER_HOST_ADDRESS
value: "{{ external_ip | default(ansible_default_ipv4.address) }}"
+ - name: JVB_WS_SERVER_ID
+ value: "127.0.0.1"
- name: TZ
value: {{ jitsi_meet_timezone }}