From a6b94de18d358f36ff3a3ea406792613d9fe7f14 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 2 Dec 2022 12:57:15 +0100 Subject: [PATCH] Implemented big blue button draft --- playbook.yml | 8 ++++ roles/docker-bigbluebutton/handlers/main.yml | 8 ++++ roles/docker-bigbluebutton/meta/main.yml | 2 + roles/docker-bigbluebutton/readme.md | 5 +++ roles/docker-bigbluebutton/tasks/main.yml | 43 ++++++++++++++++++++ roles/docker-bigbluebutton/vars/main.yml | 1 + 6 files changed, 67 insertions(+) create mode 100644 roles/docker-bigbluebutton/handlers/main.yml create mode 100644 roles/docker-bigbluebutton/meta/main.yml create mode 100644 roles/docker-bigbluebutton/readme.md create mode 100644 roles/docker-bigbluebutton/tasks/main.yml create mode 100644 roles/docker-bigbluebutton/vars/main.yml diff --git a/playbook.yml b/playbook.yml index b707dc9a..540a6f99 100644 --- a/playbook.yml +++ b/playbook.yml @@ -136,6 +136,14 @@ vars: domain: peertube.{{top_domain}} http_port: 8011 +- name: setup bigbluebutton hosts + hosts: bigbluebutton_hosts + become: true + roles: + - role: docker-bigbluebutton + vars: + domain: bbb.{{top_domain}} + http_port: 8012 - name: setup akaunting hosts hosts: akaunting_hosts become: true diff --git a/roles/docker-bigbluebutton/handlers/main.yml b/roles/docker-bigbluebutton/handlers/main.yml new file mode 100644 index 00000000..5d1a9b11 --- /dev/null +++ b/roles/docker-bigbluebutton/handlers/main.yml @@ -0,0 +1,8 @@ +--- +- name: setup bigbluebutton + command: + cmd: docker-compose -p bigbluebutton up -d --force-recreate + chdir: "{{docker_compose_bigbluebutton_path}}" + environment: + COMPOSE_HTTP_TIMEOUT: 600 + DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-bigbluebutton/meta/main.yml b/roles/docker-bigbluebutton/meta/main.yml new file mode 100644 index 00000000..fb4d4f7b --- /dev/null +++ b/roles/docker-bigbluebutton/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: +- native-docker-reverse-proxy diff --git a/roles/docker-bigbluebutton/readme.md b/roles/docker-bigbluebutton/readme.md new file mode 100644 index 00000000..c32e5a7f --- /dev/null +++ b/roles/docker-bigbluebutton/readme.md @@ -0,0 +1,5 @@ +# docker bigbluebutton + +## Further information +- https://github.com/bigbluebutton/docker +- https://goneuland.de/big-blue-button-mit-docker-und-traefik-installieren/ \ No newline at end of file diff --git a/roles/docker-bigbluebutton/tasks/main.yml b/roles/docker-bigbluebutton/tasks/main.yml new file mode 100644 index 00000000..1d22530e --- /dev/null +++ b/roles/docker-bigbluebutton/tasks/main.yml @@ -0,0 +1,43 @@ +--- +- name: recieve {{domain}} certificate + command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}} + +- name: configure {{domain}}.conf + template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf + notify: restart nginx + +- name: register directory + stat: + path: "{{docker_compose_bigbluebutton_path}}" + register: docker_compose_bigbluebutton_path_register + +- name: checkout repository + ansible.builtin.shell: git checkout . + become: true + args: + chdir: "{{docker_compose_bigbluebutton_path}}" + when: docker_compose_bigbluebutton_path_register.stat.exists + +- name: pull docker repository + git: + repo: "https://github.com/bigbluebutton/docker.git" + dest: "{{docker_compose_bigbluebutton_path}}" + update: yes + recursive: yes + version: main +# notify: setup bigbluebutton + become: true +# +#- name: set bigbluebutton version +# ansible.builtin.shell: find . -type f -exec sed -i 's/bigbluebutton:latest/bigbluebutton:{{bigbluebutton_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{bigbluebutton_version}}/' {} + +# become: true +# args: +# chdir: "{{docker_compose_bigbluebutton_path}}" +# +#- name: configure db.env +# template: src=db.env.j2 dest={{docker_compose_bigbluebutton_path}}/env/db.env +# notify: setup bigbluebutton +# +#- name: configure run.env +# template: src=run.env.j2 dest={{docker_compose_bigbluebutton_path}}/env/run.env +# notify: setup bigbluebutton diff --git a/roles/docker-bigbluebutton/vars/main.yml b/roles/docker-bigbluebutton/vars/main.yml new file mode 100644 index 00000000..01b26970 --- /dev/null +++ b/roles/docker-bigbluebutton/vars/main.yml @@ -0,0 +1 @@ +docker_compose_bigbluebutton_path: "/home/administrator/docker-compose/bigbluebutton/"