Skip to content

Commit

Permalink
Added LRS details to docs (#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad authored Jun 25, 2024
1 parent 40a673a commit b3aa5e6
Showing 1 changed file with 127 additions and 97 deletions.
224 changes: 127 additions & 97 deletions docs/rake-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,103 +4,6 @@ Scalelite comes with a set of rake tasks that allow for the management of tenant

In a Docker deployment, these should be run from in the Docker container. You can enter the Docker container using a command like `docker exec -it scalelite-api /bin/sh`

## Rake Tasks for Tenant Management

### Show Tenants
```sh
./bin/rake tenants
```

When you run this command, Scalelite will return a list of all tenants, along with their IDs, names, and secrets. For example:

```
id: 9a870f45-ec23-4d29-828b-4673f3536d7b
name: tenant1
secrets: secret1
id: 4f3e4bb8-2a4e-41a6-9af8-0678c651777f
name: tenant2
secrets: secret2:secret2a:secret2b
```

### Add Tenant
```sh
./bin/rake tenants:add[id,secrets]
```

If you need to add multiple secrets for a tenant, you can provide a colon-separated (`:`) list of secrets when creating the tenant in Scalelite.

When you run this command, Scalelite will print out the ID of the newly created tenant, followed by `OK` if the operation was successful.

### Update Tenant
```sh
./bin/rake tenants:update[id,name,secrets]
```

You can update an existing tenants name or secrets using this rake command.

When you run this command, Scalelite will print out the ID of the updated tenant, followed by `OK` if the operation was successful.

### Remove Tenant
```sh
./bin/rake tenants:remove[id]
```

Warning: Removing a tenant with data still in the database may cause some inconsistencies.

### Associate Old Recordings with a Tenant
```sh
./bin/rake recordings:addToTenant[tenant-id]
```

If you are switching over from single-tenancy to multitenancy, the existing recordings will have to be transferred to the new tenant. The above task updates the recordings' metadata with the tenant id.

## Rake Tasks for Tenant Settings Management
If you have enabled multitenancy for your Scalelite deployment, you gain the ability to customize the parameters passed into the `create` and `join` calls on a per-tenant basis. This functionality empowers you to tailor the user experience according to the specific needs and preferences of each tenant.

By customizing these parameters for each tenant, you can modify various aspects of the meeting experience, such as recording settings, welcome messages, and lock settings, among others. This level of customization ensures that each tenant receives a unique and tailored experience within the Scalelite platform.

### Show Tenant Settings
```sh
./bin/rake tenantSettings
```

When you run this command, Scalelite will return a list of all settings for all tenants. For example:

```
Tenant: tenant1
id: 18dcd4eb-769b-4c59-a441-5a9f7c0bf209
param: param1
value: value1
override: true
Tenant: tenant2
id: 9867dd51-9065-4486-9216-afb238a04748
param: param2
value: value2
override: false
id: ac7d7443-3515-4b02-bdcf-6f6452a3e00a
param: param3
value: value3
override: true
```

### Add Tenant Setting
```sh
./bin/rake tenantSettings:add[tenant_id,param,value,override]
```

To add a new TenantSetting, Scalelite requires 4 values:
1. `tenant_id`: This is the unique identifier of the tenant to which you want to add the setting.
2. `param`: Specify the name of the parameter you wish to set. For example, you can use values like record, welcome, or lockSettingsLockOnJoin. To view a comprehensive list of available options, refer to the [create](https://docs.bigbluebutton.org/development/api#create) and [join](https://docs.bigbluebutton.org/development/api#join) documentation.
3. `value` -> Assign the desired value to the parameter you specified. It can be a boolean value like 'true' or 'false', a numeric value like '5' or a string like 'Welcome to BigBlueButton'.
4. `override` -> This field should be set to either 'true' or 'false'. If set to 'true', the provided value will override any value passed by the person making the create/join call. If set to 'false', the value will only be applied if the user making the create/join call does not provide any value for the specified parameter.

When you run this command, Scalelite will print out the ID of the newly created setting, followed by `OK` if the operation was successful.

### Remove Tenant Setting
```sh
./bin/rake tenantSettings:remove[id]
```

## Rake Tasks for Server Management

### Show configured server details
Expand Down Expand Up @@ -523,3 +426,130 @@ Tenant: tenant2
value: value3
override: true
```


## Rake Tasks for Tenant Management

### Show Tenants
```sh
./bin/rake tenants
```

When you run this command, Scalelite will return a list of all tenants, along with their IDs, names, and secrets. For example:

```
id: 9a870f45-ec23-4d29-828b-4673f3536d7b
name: tenant1
secrets: secret1
id: 4f3e4bb8-2a4e-41a6-9af8-0678c651777f
name: tenant2
secrets: secret2:secret2a:secret2b
```

### Add Tenant
```sh
./bin/rake tenants:add[id,secrets]
```

If you need to add multiple secrets for a tenant, you can provide a colon-separated (`:`) list of secrets when creating the tenant in Scalelite.

When you run this command, Scalelite will print out the ID of the newly created tenant, followed by `OK` if the operation was successful.

### Update Tenant
```sh
./bin/rake tenants:update[id,name,secrets]
```

You can update an existing tenants name or secrets using this rake command.

When you run this command, Scalelite will print out the ID of the updated tenant, followed by `OK` if the operation was successful.

### Update Tenant xAPI

Scalelite supports setting xAPI credentials on a per-tenant basis, which is passed to BigBlueButton. Scalelite currently supports 2 options: Basic Auth and Dynamic Bearer Auth.

**IMPORTANT NOTE:** xAPI functionality requires bbb-webhooks version [3.2.0](https://github.com/bigbluebutton/bbb-webhooks/releases/tag/v3.2.0) or greater to be installed on your BigBlueButton Server

#### LRS Credentials (Basic Authentication)
```sh
./bin/rake tenants:update_lrs_basic[id,lrs_endpoint,lrs_username,lrs_password]
```

To enable xAPI using Basic Authentication, set the following variables:
1. `lrs_endpoint`: The endpoint of the LRS system
2. `lrs_username`: The username to be used to authenticate against the LRS system
3. `lrs_password`: The password to be used to authenticate against the LRS system

#### Keycloak Credentials (Bearer Authentication)
```sh
./bin/rake tenants:update_lrs_kc[id,lrs_endpoint,kc_token_url,kc_client_id,kc_client_secret,kc_username,kc_password]
```
To dynamically fetch the token from any OIDC Provider (ex: Keycloak), you can enable xAPI support by setting the following variables:
1. `lrs_endpoint`: The endpoint of the LRS system
1. `kc_token_url`: The full url to fetch the token from Keycloak (should be in the format https://{KEYCLOAK_URL}/realms/{REALM_NAME}/protocol/openid-connect/token)
1. `kc_client_id`: The keycloak client id
1. `kc_client_secret`: The keycloak client secret
1. `kc_client_username`: The keycloak username that has access to fetch the token
1. `kc_client_password`: The keycloak password for the above user


### Remove Tenant
```sh
./bin/rake tenants:remove[id]
```

Warning: Removing a tenant with data still in the database may cause some inconsistencies.

### Associate Old Recordings with a Tenant
```sh
./bin/rake recordings:addToTenant[tenant-id]
```

If you are switching over from single-tenancy to multitenancy, the existing recordings will have to be transferred to the new tenant. The above task updates the recordings' metadata with the tenant id.

## Rake Tasks for Tenant Settings Management
If you have enabled multitenancy for your Scalelite deployment, you gain the ability to customize the parameters passed into the `create` and `join` calls on a per-tenant basis. This functionality empowers you to tailor the user experience according to the specific needs and preferences of each tenant.

By customizing these parameters for each tenant, you can modify various aspects of the meeting experience, such as recording settings, welcome messages, and lock settings, among others. This level of customization ensures that each tenant receives a unique and tailored experience within the Scalelite platform.

### Show Tenant Settings
```sh
./bin/rake tenantSettings
```

When you run this command, Scalelite will return a list of all settings for all tenants. For example:

```
Tenant: tenant1
id: 18dcd4eb-769b-4c59-a441-5a9f7c0bf209
param: param1
value: value1
override: true
Tenant: tenant2
id: 9867dd51-9065-4486-9216-afb238a04748
param: param2
value: value2
override: false
id: ac7d7443-3515-4b02-bdcf-6f6452a3e00a
param: param3
value: value3
override: true
```

### Add Tenant Setting
```sh
./bin/rake tenantSettings:add[tenant_id,param,value,override]
```

To add a new TenantSetting, Scalelite requires 4 values:
1. `tenant_id`: This is the unique identifier of the tenant to which you want to add the setting.
2. `param`: Specify the name of the parameter you wish to set. For example, you can use values like record, welcome, or lockSettingsLockOnJoin. To view a comprehensive list of available options, refer to the [create](https://docs.bigbluebutton.org/development/api#create) and [join](https://docs.bigbluebutton.org/development/api#join) documentation.
3. `value` -> Assign the desired value to the parameter you specified. It can be a boolean value like 'true' or 'false', a numeric value like '5' or a string like 'Welcome to BigBlueButton'.
4. `override` -> This field should be set to either 'true' or 'false'. If set to 'true', the provided value will override any value passed by the person making the create/join call. If set to 'false', the value will only be applied if the user making the create/join call does not provide any value for the specified parameter.

When you run this command, Scalelite will print out the ID of the newly created setting, followed by `OK` if the operation was successful.

### Remove Tenant Setting
```sh
./bin/rake tenantSettings:remove[id]
```

0 comments on commit b3aa5e6

Please sign in to comment.