From 8d6f68084339113c980643333a37be1b323afe54 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 3 Apr 2024 20:43:23 +0200 Subject: apps/jitsi/meet: make use of storage volumes --- inventory/host_vars/ele-jitsi.yml | 4 +++- inventory/host_vars/glt-jitsi.yml | 4 +++- inventory/host_vars/sk-cloudio/jitsi.yml | 4 +++- roles/apps/jitsi/meet/defaults/main.yml | 3 ++- roles/apps/jitsi/meet/tasks/main.yml | 27 ++++++++++++++++--------- roles/apps/jitsi/meet/templates/pod-spec.yml.j2 | 2 +- 6 files changed, 30 insertions(+), 14 deletions(-) diff --git a/inventory/host_vars/ele-jitsi.yml b/inventory/host_vars/ele-jitsi.yml index 96c497ee..2ae2af5e 100644 --- a/inventory/host_vars/ele-jitsi.yml +++ b/inventory/host_vars/ele-jitsi.yml @@ -38,7 +38,9 @@ kubernetes_standalone_max_pods: 100 kubernetes_standalone_cni_variant: with-portmap -jitsi_meet_base_path: /srv/jitsi/meet +jitsi_meet_storage: + type: directory + dest: /srv/jitsi/meet jitsi_meet_version: stable-9258 jitsi_meet_hostname: remote.elev8.at diff --git a/inventory/host_vars/glt-jitsi.yml b/inventory/host_vars/glt-jitsi.yml index 4242da92..21838bc9 100644 --- a/inventory/host_vars/glt-jitsi.yml +++ b/inventory/host_vars/glt-jitsi.yml @@ -34,7 +34,9 @@ kubernetes_standalone_max_pods: 100 kubernetes_standalone_cni_variant: with-portmap -jitsi_meet_base_path: /srv/jitsi/meet +jitsi_meet_storage: + type: directory + dest: /srv/jitsi/meet jitsi_meet_version: stable-9364-1 jitsi_meet_hostname: glt-jitsi.spreadspace.org diff --git a/inventory/host_vars/sk-cloudio/jitsi.yml b/inventory/host_vars/sk-cloudio/jitsi.yml index 082497f6..65b6412d 100644 --- a/inventory/host_vars/sk-cloudio/jitsi.yml +++ b/inventory/host_vars/sk-cloudio/jitsi.yml @@ -1,5 +1,7 @@ --- -jitsi_meet_base_path: /srv/storage/jitsi/meet +jitsi_meet_storage: + type: directory + dest: /srv/storage/jitsi/meet jitsi_meet_version: stable-9258 jitsi_meet_hostname: meet.elevate.at diff --git a/roles/apps/jitsi/meet/defaults/main.yml b/roles/apps/jitsi/meet/defaults/main.yml index e383c776..e4b6bab6 100644 --- a/roles/apps/jitsi/meet/defaults/main.yml +++ b/roles/apps/jitsi/meet/defaults/main.yml @@ -1,5 +1,6 @@ --- -jitsi_meet_base_path: /srv/jitsi/meet +# jitsi_meet_storage: +# type: ... # jitsi_meet_version: stable-9258 jitsi_meet_inst_name: "{{ jitsi_meet_hostname }}" diff --git a/roles/apps/jitsi/meet/tasks/main.yml b/roles/apps/jitsi/meet/tasks/main.yml index 1d55fc78..dab48eac 100644 --- a/roles/apps/jitsi/meet/tasks/main.yml +++ b/roles/apps/jitsi/meet/tasks/main.yml @@ -1,4 +1,13 @@ --- +- name: prepare storage volume + vars: + storage_volume: "{{ jitsi_meet_storage }}" + include_role: + name: "storage/{{ jitsi_meet_storage.type }}/volume" + +- set_fact: + jitsi_meet_basepath: "{{ storage_volume_mountpoint }}" + - name: create jitsi-meet scripts subdirectories loop: - jicofo @@ -6,13 +15,13 @@ - web - jvb file: - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/{{ item }}" + path: "{{ jitsi_meet_basepath }}/{{ 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" + - path: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh" properties: - checksum kubernetes_standalone_pod_config_hash_items_streamui: [] @@ -31,7 +40,7 @@ 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" + dest: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/prosody/cont-init.sh" mode: 0750 @@ -50,7 +59,7 @@ authentication = "internal_hashed" EOF prosodyctl --config "/config/prosody.cfg.lua" register display stream-ui.meet.jitsi "{{ jitsi_meet_secrets.streamuidisplay_auth_password }}" - dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/prosody/streamui.sh" + dest: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/prosody/streamui.sh" mode: 0750 - name: generate stream-ui specific cont-init scripts for web @@ -62,16 +71,16 @@ // Hide Stream-UI Displays config.hiddenDomain = 'stream-ui.meet.jitsi'; EOF - dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/web/streamui.sh" + dest: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/web/streamui.sh" mode: 0755 - 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" + - path: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/prosody/streamui.sh" properties: - checksum - - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/web/streamui.sh" + - path: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/web/streamui.sh" properties: - checksum @@ -87,13 +96,13 @@ {{ jitsi_meet_jvb_config_extra }} EOF - dest: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh" + dest: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh" mode: 0750 - 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" + - path: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts/jvb/cont-init.sh" properties: - checksum diff --git a/roles/apps/jitsi/meet/templates/pod-spec.yml.j2 b/roles/apps/jitsi/meet/templates/pod-spec.yml.j2 index 4658ebf8..ece1ae5c 100644 --- a/roles/apps/jitsi/meet/templates/pod-spec.yml.j2 +++ b/roles/apps/jitsi/meet/templates/pod-spec.yml.j2 @@ -293,7 +293,7 @@ containers: volumes: - name: scripts hostPath: - path: "{{ jitsi_meet_base_path }}/{{ jitsi_meet_inst_name }}/scripts" + path: "{{ jitsi_meet_basepath }}/{{ jitsi_meet_inst_name }}/scripts" - name: config emptyDir: medium: Memory -- cgit v1.2.3