From 9a8ef5e047344447b8432c87ed0cffe5bfe93775 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 17 Jul 2025 16:04:05 +0200 Subject: [PATCH] Implemented new appid for bbb --- group_vars/all/09_ports.yml | 6 ++-- group_vars/all/10_networks.yml | 2 +- roles/web-app-bigbluebutton/tasks/main.yml | 6 ++-- roles/web-app-bigbluebutton/vars/main.yml | 29 ++++++++++++-------- roles/web-app-nextcloud/config/main.yml | 2 +- roles/web-app-nextcloud/vars/plugins/bbb.yml | 4 +-- templates/roles/web-app/vars/main.yml.j2 | 16 +++++++++-- 7 files changed, 41 insertions(+), 24 deletions(-) diff --git a/group_vars/all/09_ports.yml b/group_vars/all/09_ports.yml index 446477bd..e5736d43 100644 --- a/group_vars/all/09_ports.yml +++ b/group_vars/all/09_ports.yml @@ -67,7 +67,7 @@ ports: simpleicons: 8044 libretranslate: 8055 pretix: 8056 - bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port + web-app-bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port # Ports which are exposed to the World Wide Web public: @@ -78,8 +78,8 @@ ports: ldaps: svc-db-openldap: 636 stun: - bigbluebutton: 3478 # Not sure if it's right placed here or if it should be moved to localhost section + web-app-bigbluebutton: 3478 # Not sure if it's right placed here or if it should be moved to localhost section web-app-nextcloud: 3479 turn: - bigbluebutton: 5349 # Not sure if it's right placed here or if it should be moved to localhost section + web-app-bigbluebutton: 5349 # Not sure if it's right placed here or if it should be moved to localhost section web-app-nextcloud: 5350 # Not used yet \ No newline at end of file diff --git a/group_vars/all/10_networks.yml b/group_vars/all/10_networks.yml index 234144a8..ac13cc44 100644 --- a/group_vars/all/10_networks.yml +++ b/group_vars/all/10_networks.yml @@ -94,7 +94,7 @@ defaults_networks: subnet: 192.168.103.144/28 # /24 Networks / 254 Usable Clients - bigbluebutton: + web-app-bigbluebutton: subnet: 10.7.7.0/24 # This variable does not have an impact. It's just there for documentation reasons, because this network is used in bbb svc-db-postgres: subnet: 192.168.200.0/24 diff --git a/roles/web-app-bigbluebutton/tasks/main.yml b/roles/web-app-bigbluebutton/tasks/main.yml index e869f316..20023613 100644 --- a/roles/web-app-bigbluebutton/tasks/main.yml +++ b/roles/web-app-bigbluebutton/tasks/main.yml @@ -59,7 +59,7 @@ - name: Wait for BigBlueButton wait_for: - host: "{{ domains | get_domain('bigbluebutton') }}" + host: "{{ domains | get_domain('web-app-bigbluebutton') }}" port: 80 delay: 5 timeout: 600 @@ -68,11 +68,11 @@ command: cmd: docker compose exec greenlight bundle exec rake admin:create chdir: "{{ docker_compose.directories.instance }}" - when: applications.bigbluebutton.setup | bool + when: bigbluebutton_setup ignore_errors: true register: admin_creation_result - name: print admin user data debug: msg: "{{ admin_creation_result.stdout }}" - when: applications.bigbluebutton.setup | bool \ No newline at end of file + when: bigbluebutton_setup \ No newline at end of file diff --git a/roles/web-app-bigbluebutton/vars/main.yml b/roles/web-app-bigbluebutton/vars/main.yml index c5a055d2..b754389c 100644 --- a/roles/web-app-bigbluebutton/vars/main.yml +++ b/roles/web-app-bigbluebutton/vars/main.yml @@ -1,15 +1,22 @@ -application_id: "bigbluebutton" -bbb_repository_directory: "{{ docker_compose.directories.services }}" -docker_compose_file_origine: "{{ docker_compose.directories.services }}docker-compose.yml" -docker_compose_file_final: "{{ docker_compose.directories.instance }}docker-compose.yml" +application_id: "web-app-bigbluebutton" +bbb_repository_directory: "{{ docker_compose.directories.services }}" +docker_compose_file_origine: "{{ docker_compose.directories.services }}docker-compose.yml" +docker_compose_file_final: "{{ docker_compose.directories.instance }}docker-compose.yml" # Database configuration -database_type: "postgres" -database_password: "{{ applications.bigbluebutton.credentials.postgresql_secret }}" +database_type: "postgres" +database_password: "{{ applications | get_app_conf(application_id, 'credentials.postgresql_secret') }}" -domain: "{{ domains | get_domain(application_id) }}" -http_port: "{{ ports.localhost.http[application_id] }}" -bbb_env_file_link: "{{ docker_compose.directories.instance }}.env" -bbb_env_file_origine: "{{ bbb_repository_directory }}.env" +domain: "{{ domains | get_domain(application_id) }}" +http_port: "{{ ports.localhost.http[application_id] }}" +bbb_env_file_link: "{{ docker_compose.directories.instance }}.env" +bbb_env_file_origine: "{{ bbb_repository_directory }}.env" -docker_compose_skipp_file_creation: true # Skipp creation of docker-compose.yml file \ No newline at end of file +docker_compose_skipp_file_creation: true # Skipp creation of docker-compose.yml file + +# Setup +bigbluebutton_setup: "{{ applications | get_app_conf(application_id, 'setup') }}" + +# Credentials +bigbluebutton_shared_secret: "{{ applications | get_app_conf(application_id, 'credentials.shared_secret') }}" +bigbluebutton_api_suffix: "{{ applications | get_app_conf(application_id, 'api_suffix') }}" \ No newline at end of file diff --git a/roles/web-app-nextcloud/config/main.yml b/roles/web-app-nextcloud/config/main.yml index 25ec9355..60e1c937 100644 --- a/roles/web-app-nextcloud/config/main.yml +++ b/roles/web-app-nextcloud/config/main.yml @@ -76,7 +76,7 @@ plugins: enabled: true bbb: # Nextcloud BigBlueButton integration: enables video conferencing using BigBlueButton (https://apps.nextcloud.com/apps/bbb) - enabled: "{{ 'bigbluebutton' in group_names | lower }}" + enabled: "{{ 'web-app-bigbluebutton' in group_names | lower }}" #- bookmarks # # Nextcloud Bookmarks: manage and share your bookmarks easily (https://apps.nextcloud.com/apps/bookmarks) # enabled: false diff --git a/roles/web-app-nextcloud/vars/plugins/bbb.yml b/roles/web-app-nextcloud/vars/plugins/bbb.yml index 75fadbd2..63360861 100644 --- a/roles/web-app-nextcloud/vars/plugins/bbb.yml +++ b/roles/web-app-nextcloud/vars/plugins/bbb.yml @@ -1,7 +1,7 @@ plugin_configuration: - appid: "bbb" configkey: "api.secret" - configvalue: "{{ applications.bigbluebutton.credentials.shared_secret }}" + configvalue: "{{ bigbluebutton_shared_secret }}" - appid: "bbb" configkey: "api.url" - configvalue: "{{ domains | get_url('bigbluebutton', web_protocol) }}{{applications.bigbluebutton.api_suffix}}" \ No newline at end of file + configvalue: "{{ domains | get_url('web-app-bigbluebutton', web_protocol) }}{{ bigbluebutton_api_suffix }}" \ No newline at end of file diff --git a/templates/roles/web-app/vars/main.yml.j2 b/templates/roles/web-app/vars/main.yml.j2 index 700708e4..0e2c50b4 100644 --- a/templates/roles/web-app/vars/main.yml.j2 +++ b/templates/roles/web-app/vars/main.yml.j2 @@ -1,6 +1,16 @@ -application_id: {{ application_id }} # ID of the application, should be the name of the role folder -database_type: 0 # Database type [postgres, mariadb] -docker_compose_flush_handlers: true # When this is set to true an auto-flush after the docker-compose.yml, and env deploy is triggered, otherwise you have todo it manual. +# This file is just used for internal configurations by the developer. +# All configuration possibilities are available in the config/main.yml file. + +# General +application_id: {{ application_id }} # ID of the application, should be the name of the role folder + +# Database +database_type: 0 # Database type [postgres, mariadb] + +# Docker +docker_compose_flush_handlers: true # When this is set to true an auto-flush after the docker-compose.yml, and env deploy is triggered, otherwise you have todo it manual. +docker_compose_skipp_file_creation: false # Skipp creation of docker-compose.yml file + # The following variable mapping is optional, but imt makes it easier to read the code. # I recommend, to use this mappings, but you can skipp it and access the config entries direct via get_app_conf