add updates
This commit is contained in:
parent
8d29e7ae23
commit
564d238405
21
README.md
21
README.md
|
@ -23,23 +23,12 @@ Then, restart BBB:
|
||||||
bbb-conf --restart
|
bbb-conf --restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running as the greenlight user
|
## Installing Greenlight
|
||||||
Add the following lines to `/opt/greenlight/.profile`:
|
See [here](https://docs.bigbluebutton.org/greenlight/gl-install.html) for
|
||||||
```
|
instructions.
|
||||||
export PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH
|
|
||||||
export $(grep -v '^#' ~/.env)
|
|
||||||
export RAILS_ENV=production
|
|
||||||
export BUNDLE_APP_CONFIG=~/.bundle
|
|
||||||
```
|
|
||||||
This will allow you to use the `bundle` command after running
|
|
||||||
`su - greenlight`, if you need to do so.
|
|
||||||
|
|
||||||
## Running Greenlight
|
**Important**: Add 'PORT=5000' to the top of your env file for Greenlight.
|
||||||
Enable and run the systemd service:
|
Otherwise it will listen on port 80, which NGINX is already listening on.
|
||||||
```sh
|
|
||||||
systemctl enable greenlight
|
|
||||||
systemctl start greenlight
|
|
||||||
```
|
|
||||||
|
|
||||||
## Creating an administrator account
|
## Creating an administrator account
|
||||||
Theoretically, there is a [bundle command](https://docs.bigbluebutton.org/greenlight/gl-admin.html#creating-an-administrator-account)
|
Theoretically, there is a [bundle command](https://docs.bigbluebutton.org/greenlight/gl-admin.html#creating-an-administrator-account)
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Routes requests to Greenlight based on the '/b' prefix.
|
||||||
|
# Use this file to route '/b' paths on your BigBlueButton server
|
||||||
|
# to the Greenlight application. If you are using a different
|
||||||
|
# subpath, you should change it here.
|
||||||
|
|
||||||
|
location /b {
|
||||||
|
proxy_pass http://127.0.0.1:5000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /b/cable {
|
||||||
|
proxy_pass http://127.0.0.1:5000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_read_timeout 6h;
|
||||||
|
proxy_send_timeout 6h;
|
||||||
|
client_body_timeout 6h;
|
||||||
|
send_timeout 6h;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Allow larger body size for uploading presentations
|
||||||
|
location ~ /preupload_presentation$ {
|
||||||
|
client_max_body_size 30m;
|
||||||
|
|
||||||
|
proxy_pass http://127.0.0.1:5000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Only needed if using presentations and deployed at a relative root (ex "/b")
|
||||||
|
# If deploying at "/", delete the section below
|
||||||
|
|
||||||
|
location /rails/active_storage {
|
||||||
|
return 301 /b$request_uri;
|
||||||
|
}
|
146
playbook.yml
146
playbook.yml
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
- hosts: 127.0.0.1
|
- hosts: 127.0.0.1
|
||||||
connection: local
|
connection: local
|
||||||
vars:
|
#vars:
|
||||||
ruby_version: 2.7.0
|
# ruby_version: 2.7.0
|
||||||
gem: gem2.7
|
# gem: gem2.7
|
||||||
bundle: "/opt/greenlight/.gem/ruby/{{ ruby_version }}/bin/bundle"
|
# bundle: "/opt/greenlight/.gem/ruby/{{ ruby_version }}/bin/bundle"
|
||||||
tasks:
|
tasks:
|
||||||
- name: install prerequisites
|
- name: install prerequisites
|
||||||
apt:
|
apt:
|
||||||
|
@ -50,16 +50,16 @@
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb https://ubuntu.bigbluebutton.org/bionic-23/ bigbluebutton-bionic main
|
repo: deb https://ubuntu.bigbluebutton.org/bionic-23/ bigbluebutton-bionic main
|
||||||
filename: bigbluebutton
|
filename: bigbluebutton
|
||||||
- name: add repo for Brightbox ruby-ng
|
#- name: add repo for Brightbox ruby-ng
|
||||||
apt_repository:
|
# apt_repository:
|
||||||
repo: ppa:brightbox/ruby-ng
|
# repo: ppa:brightbox/ruby-ng
|
||||||
- name: add GPG key for CSC
|
#- name: add GPG key for CSC
|
||||||
apt_key:
|
# apt_key:
|
||||||
url: http://debian.csclub.uwaterloo.ca/csclub.asc
|
# url: http://debian.csclub.uwaterloo.ca/csclub.asc
|
||||||
- name: add CSC Debian repo
|
#- name: add CSC Debian repo
|
||||||
apt_repository:
|
# apt_repository:
|
||||||
repo: deb http://debian.csclub.uwaterloo.ca bionic main
|
# repo: deb http://debian.csclub.uwaterloo.ca bionic main
|
||||||
filename: csclub
|
# filename: csclub
|
||||||
- name: update apt cache
|
- name: update apt cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
- nodejs
|
- nodejs
|
||||||
- bigbluebutton
|
- bigbluebutton
|
||||||
- bbb-html5
|
- bbb-html5
|
||||||
- greenlight
|
#- greenlight
|
||||||
- name: set BBB hostname
|
- name: set BBB hostname
|
||||||
# We should only need to do this once. Make sure to remove
|
# We should only need to do this once. Make sure to remove
|
||||||
# /tmp/bbb-setip-done if the FQDN changes for whatever reason.
|
# /tmp/bbb-setip-done if the FQDN changes for whatever reason.
|
||||||
|
@ -211,67 +211,67 @@
|
||||||
loop:
|
loop:
|
||||||
- 'rtp'
|
- 'rtp'
|
||||||
- 'sip'
|
- 'sip'
|
||||||
- name: install bundler for greenlight
|
#- name: install bundler for greenlight
|
||||||
become: yes
|
# become: yes
|
||||||
become_user: greenlight
|
# become_user: greenlight
|
||||||
command: '{{ gem }} install --user-install bundler'
|
# command: '{{ gem }} install --user-install bundler'
|
||||||
args:
|
# args:
|
||||||
creates: '{{ bundle }}'
|
# creates: '{{ bundle }}'
|
||||||
- name: configure NGINX to route to Greenlight
|
- name: configure NGINX to route to Greenlight
|
||||||
copy:
|
copy:
|
||||||
src: /opt/greenlight/greenlight.nginx
|
src: ./greenlight.nginx
|
||||||
dest: /etc/bigbluebutton/nginx/greenlight.nginx
|
dest: /etc/bigbluebutton/nginx/greenlight.nginx
|
||||||
- name: create secret key for Rails
|
#- name: create secret key for Rails
|
||||||
become: yes
|
# become: yes
|
||||||
become_user: greenlight
|
# become_user: greenlight
|
||||||
shell: '{{ bundle }} exec rake secret | tee /opt/greenlight/rake_secret'
|
# shell: '{{ bundle }} exec rake secret | tee /opt/greenlight/rake_secret'
|
||||||
args:
|
# args:
|
||||||
creates: /opt/greenlight/rake_secret
|
# creates: /opt/greenlight/rake_secret
|
||||||
- name: assert rake secret was created
|
#- name: assert rake secret was created
|
||||||
assert:
|
# assert:
|
||||||
that:
|
# that:
|
||||||
- lookup('file', '/opt/greenlight/rake_secret') != ''
|
# - lookup('file', '/opt/greenlight/rake_secret') != ''
|
||||||
- name: obtain BBB API secret
|
#- name: obtain BBB API secret
|
||||||
shell: "bbb-conf --secret | grep -oP 'Secret: \\K[[:alnum:]]+'"
|
# shell: "bbb-conf --secret | grep -oP 'Secret: \\K[[:alnum:]]+'"
|
||||||
register: api_secret
|
# register: api_secret
|
||||||
- name: create .env file for greenlight
|
#- name: create .env file for greenlight
|
||||||
copy:
|
# copy:
|
||||||
src: /opt/greenlight/sample.env
|
# src: /opt/greenlight/sample.env
|
||||||
dest: /opt/greenlight/.env
|
# dest: /opt/greenlight/.env
|
||||||
force: no
|
# force: no
|
||||||
owner: greenlight
|
# owner: greenlight
|
||||||
group: greenlight
|
# group: greenlight
|
||||||
- name: update .env file for greenlight
|
#- name: update .env file for greenlight
|
||||||
replace:
|
# replace:
|
||||||
path: /opt/greenlight/.env
|
# path: /opt/greenlight/.env
|
||||||
regexp: '^{{ item.key }}=.*$'
|
# regexp: '^{{ item.key }}=.*$'
|
||||||
replace: '{{ item.key }}={{ item.value }}'
|
# replace: '{{ item.key }}={{ item.value }}'
|
||||||
with_dict:
|
# with_dict:
|
||||||
SECRET_KEY_BASE: "{{ lookup('file', '/opt/greenlight/rake_secret') }}"
|
# SECRET_KEY_BASE: "{{ lookup('file', '/opt/greenlight/rake_secret') }}"
|
||||||
BIGBLUEBUTTON_ENDPOINT: 'https://{{ ansible_fqdn }}/bigbluebutton/'
|
# BIGBLUEBUTTON_ENDPOINT: 'https://{{ ansible_fqdn }}/bigbluebutton/'
|
||||||
BIGBLUEBUTTON_SECRET: '{{ api_secret.stdout }}'
|
# BIGBLUEBUTTON_SECRET: '{{ api_secret.stdout }}'
|
||||||
SAFE_HOSTS: '{{ ansible_fqdn }}'
|
# SAFE_HOSTS: '{{ ansible_fqdn }}'
|
||||||
LDAP_SERVER: auth1.csclub.uwaterloo.ca
|
# LDAP_SERVER: auth1.csclub.uwaterloo.ca
|
||||||
LDAP_PORT: '636'
|
# LDAP_PORT: '636'
|
||||||
LDAP_METHOD: 'ssl'
|
# LDAP_METHOD: 'ssl'
|
||||||
LDAP_UID: 'uid'
|
# LDAP_UID: 'uid'
|
||||||
LDAP_BASE: 'dc=csclub,dc=uwaterloo,dc=ca'
|
# LDAP_BASE: 'dc=csclub,dc=uwaterloo,dc=ca'
|
||||||
LDAP_AUTH: 'user'
|
# LDAP_AUTH: 'user'
|
||||||
# make sure to create a role in Greenlight called "sysadmin"
|
# # make sure to create a role in Greenlight called "sysadmin"
|
||||||
LDAP_ROLE_FIELD: 'position'
|
# LDAP_ROLE_FIELD: 'position'
|
||||||
ALLOW_GREENLIGHT_ACCOUNTS: 'false'
|
# ALLOW_GREENLIGHT_ACCOUNTS: 'false'
|
||||||
DEFAULT_REGISTRATION: open
|
# DEFAULT_REGISTRATION: open
|
||||||
ROOM_FEATURES: 'mute-on-join,require-moderator-approval'
|
# ROOM_FEATURES: 'mute-on-join,require-moderator-approval'
|
||||||
DB_ADAPTER: postgresql
|
# DB_ADAPTER: postgresql
|
||||||
DB_HOST: coffee.csclub.uwaterloo.ca
|
# DB_HOST: coffee.csclub.uwaterloo.ca
|
||||||
DB_PORT: 5432
|
# DB_PORT: 5432
|
||||||
DB_NAME: greenlight
|
# DB_NAME: greenlight
|
||||||
DB_USERNAME: greenlight
|
# DB_USERNAME: greenlight
|
||||||
- name: reminder for DB credentials
|
#- name: reminder for DB credentials
|
||||||
debug:
|
# debug:
|
||||||
msg: >-
|
# msg: >-
|
||||||
Make sure to create a database and user for greenlight and
|
# Make sure to create a database and user for greenlight and
|
||||||
update /opt/greenlight/.env with the Postgres credentials.
|
# update /opt/greenlight/.env with the Postgres credentials.
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: reload systemd
|
- name: reload systemd
|
||||||
|
|
Loading…
Reference in New Issue