aws-scalable-big-blue-button-example

Status: Work-in-progress. Please create issues or pull requests if you have ideas for improvement.

Scalable Big Blue Button Video Conference Example

Example deployment of a scalable Video Conference System

Summary

This project demonstrates the deployment of a scalable Video Conference Setup jointly using open-source software components and AWS Services.

High-Level architecture

EC2 based deployment - architecture

Architecture

Serverless based deployment - architecture

Architecture

Disclaimer

This project is an example of an deployment and meant to be used for testing and learning purposes only. Do not use in production.

Please note that running this code will cause software that is licensed under AGPL-3.0 to be deployed in the user’s account.

Be aware that the deployment is not covered by the AWS free tier. Please use the AWS pricing calculator to an estimation beforehand

Table of Contents

  1. Getting started
  2. Prerequisites
  3. Parameters
  4. Templates
  5. Code updates
  6. Versioning
  7. Troubleshooting common errors
  8. Resources
  9. Security
  10. License

Getting started

Just a few steps are needed to get started with the example deployment. the deployment process is separated in a prerequisites deployment containing the creation of the source file Amazon S3 Bucket and another containing the actual deployment of the infrastructure and application layer.

You may use the included setup script to simplify and automatic deployment or alternatively you can run the deployment step-by-step.

Prerequisites

To run the automated, setup script based deployment you need to have some software installed and configured on your device:

To run the step-by-step setup:

either way you choose the following have to be in place:

Be sure to check the Troubleshooting common errors when deploying.

Parameters

Dynamic parameters

These parameters you have to pass to the setup script

Parameter Name Value
-p the aws-cli profile to use
-e the operators email address
-h the hosted zone ID the DNS records to be added
-s the Cloudformation stack name you want to use
-d the FQDN for (aligned to the hosted zone )
-l the log level choose DEBUG, INFO, WARN, ERROR

Deployment parameters:

The deployment parameters are placed into the bbb-on-aws-param.json or to be set via cli/console ( if you choose the step-by-step setup. )

| Parameter Name | Default Value | Description | Comment | | —- | —- | —- | —- | | BBBApplicationVersion | focal-270 | Big Blue Button Version to be deployed | Refer to the Big Blue Button documentation to check for supported versions. | | BBBApplicationInstanceAMIParameter | /aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id | Big Blue Button Application Instance AMI Parameter to be resolved | Refer to the Big Blue Button documentation to check for supported versions of Ubuntu for the application version you set using “BBBApplicationVersion” parameter. | | BBBECSInstanceType| fargate | Instance size of the ECS Cluster worker nodes or “fargate” for serverless deployment | EC2 instance sizes should be aligned with the size VCPU and Memory limits of the to be deployed tasks. setting this parameter to fargate will cause a Serverless Setup using AWS Fargate | | BBBApplicationInstanceType| t3a.xlarge| Instance size of the Big Blue Button Application node(s) | please refer to the Big Blue Button Documentation for rightsizing | | BBBApplicationDataVolumeSize | 20 | the size of the application data volume used for recording buffer | | BBBApplicationRootVolumeSize | 20 | the size of the application root volume | | BBBDBInstanceType | db.t3.medium| Instance size of the Aurora Database Instance or “serverless” for serverless deployment | Heavily related to usage, collect metrics and test. | BBBCACHEDBInstanceType | cache.t3.micro| Instance size of the Amazon ElastiCache for security token and call ID handling | Depends on usage. | BBBVPC| 10.1.0.0/16 | The Cidr block or ID for the VPC created during the deployment | we deploy an own VPC for the deployment containing public and private subnets as well nas internet and nat gateways. If an ID is passed over (vpc-*) the deployment will use the existing custom VPC and it’s subnets. be sure to add the subnet ids into the parameters as well! | BBBApplicationSubnets | 10.1.5.0/24,10.1.6.0/24,10.1.7.0/24 | The cidr blocks or IDs of subnets within the VPC for the components of the application deployment | count have to be = BBBNumberOfAZs only to set for existing VPCs | BBBDatastoreSubnets | 10.1.9.0/24,10.1.10.0/24,10.1.11.0/24| The cidr blocks or IDs of subnets within the VPC for the database backend. | count have to be = BBBNumberOfAZs only set for existing VPCS | BBBNumberOfAZs | 3 | Number of AZs to be utilized by the deployment | valid value 1,2 or 3 | BBBECSMaxInstances| 10| The maximum amount of instances the ECS cluster should scale out to | set a reasonable maximum to prevent cost explosion on unexpected usage | BBBECSMinInstances| 1| The minimum amount of worker instances at the ECS cluster| | BBBECSDesiredInstances| 3| The desired amount of instances of worker instances at the ECS cluster | | BBBApplicationMaxInstances| 1| The maximum amount of Big Blue Button Application servers | Set depending on the awaited load and planned instance size. | | BBBApplicationMinInstances| 1| The minimum amount of Big Blue Button Application servers | As EC2 Autoscaling is currently not aware of ongoing video conferences, i recommend set min=max=desired and not use dynamic here (planned scale out/in) | | BBBApplicationDesiredInstances| 1| The desired amount of Big Blue Button Application servers | As EC2 Autoscaling is currently not aware of ongoing video conferences, i recommend set min=max=desired and not use dynamic here (planned scale out/in) | | BBBDBEngineVersion| 16.4| Set the Postgres version to be used at the Amazon Aurora setup | please refer to the Amazon Aurora documentation for supported versions | BBBServerlessAuroraMinCapacity | The minimum capacity for the Amazon Aurora Serverless Cluster. | Value has to be >= 2 | BBBServerlessAuroraMaxCapacity | The maximum capacity for the Amazon Aurora Serverless Cluster. | BBBEnvironmentName | bbbonaws| the name of the environment | BBBgreenlightImage | bigbluebutton/greenlight:v3.4.1| greenlight container image to be used | BBBScaleliteApiImage | blindsidenetwks/scalelite:v1.6-api| scalelite api container image to be used | BBBScaleliteNginxImage | blindsidenetwks/scalelite:v1.6-nginx| scalelite nginx container image to be used | BBBScalelitePollerImage | blindsidenetwks/scalelite:v1.6-poller| scalelite poller container image to be used | BBBScaleliteImporterImage | blindsidenetwks/scalelite:v1.6-recording-importer| scalelite recording importer container image to be used | BBBCacheAZMode| cross-az | Deploy the Amazon Elasticcache cluster cross-az or single-az | only cross-az supported atm | BBBGreenlightMemory| 1024 | memory limit of the Greenlight task | BBBGreenlightCPU| 512| vCPU limit of the Greenlight task | BBBScaleliteMemory | 2048 | Memory limit for the Scalelite tasks | setting per task for all inheritated containers | BBBScaleliteCPU | 1024 | vCPU limit for the Scalelite tasks if deployed | setting once per task for all containers | BBBSesRegion| - | Region of the SES Service to be used | if the setup is planned to be deployed in a Region w/o Amazon SES, choose a proper region here. | BBBSESValidated| false | controls if a pre validated SES domain is used | set to true if you setup the SES domain outside of this deployment | BBBACMCertArn | - | existing SSL/TLS Certificate ARN for HTTPS | add your Certificate ARN here. e.g. if you imported your own Cert into ACM. | BBBFrontendType | Greenlight | choose “Greenlight” for deploying a scalable Greenlight Frontend and “External” to only get the Scalelite API endpoint to be able to connect an externally managed LMS” | BBBUsePublicApplicationIP | ENABLED | Automatic Public IPs for ECS Tasks ENABLED/DISABLED - enabled for default deployment incl VPC creation

Deployment

Automatic

For the automatic deployment just run the included setup script

Example:

./setup.sh -e johndoe@example.com -p bbb_example -h 1XXX02XXXXBMXXXXXZXXXX -s bbbexample -d bbbexample.example.com

The automatic deployment works as follows:

Step-by-step

If you want to attempt the deployment step-by-step via Console or aws-cli please use the following steps:

aws cloudformation deploy --stack-name bbbexample-sources --profile=bbb_example --template ./templates/bbb-on-aws-buildbuckets.template.yaml
    aws s3 sync --profile=bbb_example ./templates s3://NAMEOFCREATEDBUCKET
    aws s3 sync --profile=bbb_example ./scripts s3://NAMEOFCREATEDBUCKET

using aws-cli:

aws cloudformation deploy --profile=bbb_example --stack-name bbbexample \
    --capabilities CAPABILITY_NAMED_IAM \
    --parameter-overrides BBBOperatorEMail=johndoe@example.com BBBStackBucketStack=bbbexample-sources BBBDomainName=bbbexample.example.com BBBHostedZone=1XXX02XXXXBMXXXXXZXXXX \
    --template ./bbb-on-aws-master.template.yaml

The deployment will take approx 30-45 minutes.

Logging into the Big Blue Button:

When deployment went through you find the Administrator login within Secretsmanager. The password is located at the secret starting with BBBAdministratorlogin- While your login has been set to your selected Operator Email Address the password has been generated for you.

log into the Frontend using conference.example.com

Template structure and deployment workflow

The Deployment consists of 2 main templates and 13 nested templates.

Main templates

Custom scripts

During the deployment the EC2 instances will be bootstrapped using UserData.

Configuration adjustments (diffs from the defaults)

Customizing your Big Blue Button deployment

There are several ways how you can further customize your deployment. Apart from the infrastructure components you can customize using the parameters mentioned earlier at the documentation you can also adjust the bootstrap of the Big Blue Button or Greenlight deployment according to your needs. A good starting point is to take a look at the UserData Section of the nested stack for the application instances like: bbb-on-aws-bbbappscalable.template.yaml (for single server deployments bbb-on-aws-bbbappsingle.template.yaml)

Our recommendation is to hook into the bootstrap and alter/extend the Scripts and/or code there. this makes sure your customization will be persistent for all of your deployments and also if you decide to scale-out the application servers. Basically the customization section of the Big Blue Button documentation does content all steps you need.

When it comes to Greenlight there is also a part at the official documentation covering this. As we do use the containerized version of the Greenlight deployment at the scalable option the best way to approach it is to customize and extend the related Greenlight container, push it into your private container registy. Amazon ECR or any docker compatible registry of your choise. And continue with your customized container image setting the related parameter.

Integrating with Learning Management Systems

Integrating the Big Blue Button Setup into a LMS is possible. As example to integrate with Moodle a few steps need to be taken

Important, with the scalable setup used with Scalelite recordings of sessions are transferred to the central Shared Storage at Amazon EFS. Your LMS setup should either mount the volume or you need to change that strategy. Please read through the Amazon EFS documentation to get the needed access and prerequisites setup we’re using AccessPoints and IAM support to grant least privileges and secure access. You might want to adjust the template to your needs (Roles added for access as an example).

Code updates

to update an already deployed stack just pull the current version of the IaC code repository. Afterwards you can start the upgrade process the same way as you would do the initial setup.

Versioning

We’re using the Semantic Versioning for this repo. Each major release will be tagged and can be pulled seperately. Be sure NOT to use the main branch if you want to be sure not pulling potential huge changes to the infrastrucutre unintentionally. Use the branches regarding to the major Version you want to stick to.


Troubleshooting common errors


Resources

Security

See CONTRIBUTING for more information.

License

This Example is licensed under the MIT-0 License. See the LICENSE file.

3rd party Licensing

Please be aware of the deviating licenses of the deployed open-source software components.

Please note that running this code will cause software that is licensed under AGPL-3.0 to be deployed in the user’s account.