some updates for simplifying the dev script and added documentation for dev

This commit is contained in:
jfederico
2022-10-17 14:31:59 -04:00
parent d5e973802b
commit 0c775b4400
16 changed files with 124 additions and 608 deletions

View File

@@ -1,9 +1,84 @@
- Install a BBB server
- Add a BBB server
## Installation (short version)
# Setup recordings
On an Ubuntu 22.04 as the host machine.
## Configuring the BBB server
### Prerequisites
This machine needs to be updated and have installed:
- Git
- [Docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04)
- [Docker Compose](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04)
- Certbot
### Fetching the scripts
```
git clone https://github.com/jfederico/scalelite-run
cd scalelite-run
```
### Initializing environment variables
Create a new `.env` file based on the `dotenv` file included.
```
cp dotenv .env
```
Most required variables are preset by default, the ones that must be set before starting are:
```
SECRET_KEY_BASE=
LOADBALANCER_SECRET=
URL_HOST=
```
Obtain the value for SECRET_KEY_BASE and LOADBALANCER_SECRET with:
```
sed -i "s/SECRET_KEY_BASE=.*/SECRET_KEY_BASE=$(openssl rand -hex 64)/" .env
sed -i "s/LOADBALANCER_SECRET=.*/LOADBALANCER_SECRET=$(openssl rand -hex 24)/" .env
```
Set the hostname on URL_HOST (E.g. sl.example.com)
```
sed -i "s/URL_HOST=.*/URL_HOST=sl.example.com" .env
```
### Generate LetsEncrypt SSL certificates manually
```
source ./.env
certbot certonly --manual -d sl.$DOMAIN_NAME --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges=dns --email <YOUR_ENMAIL> --server https://acme-v02.api.letsencrypt.org/director
certbot certonly --manual -d redis.$DOMAIN_NAME --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges=dns --email <YOUR_ENMAIL> --server https://acme-v02.api.letsencrypt.org/director
```
### Starting the app
Start the services.
```
docker-compose up -d
```
The database must be initialized.
```
docker exec -i scalelite-api bundle exec rake db:setup
```
The BBB servers must be added.
```
docker exec -i scalelite-api bundle exec rake servers:add[https://bbb25.example.com/bigbluebutton/api,secret]
docker exec -i scalelite-api bundle exec rake servers:enable[bbb25.example.com]
```
### Setup recordings
#### Configuring the BBB server
Init the bbb server as explained in the documentation
@@ -35,7 +110,7 @@ spool_dir: scalelite-spool:/home/<YOUR_USERNAME>/spool ## adapted
Accept the key, this is done only once.
## Final touches in your Local Machine
#### Final touches in your Local Machine
1. Make sure your user has rights to write in the `/mnt/scalelite-recordings/var/bigbluebutton/spool/`