Coder Social home page Coder Social logo

rohitcoder / bbb-aws-s3 Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 7.0 527 KB

This script is written in python, and it keeps migrating your all recorded videos/sessions from Big Blue Button server to your desired s3 bucket.

Python 100.00%
big-blue-button bbb bbb-api conferencing webrtc video collaboration

bbb-aws-s3's Introduction

BBB-AWS-S3

This script is written in python, and it keeps migrating your all recorded videos/sessions from Big Blue Button server to your desired s3 bucket.

Installation process & AWS Environment Setup

Run these all commands line by line
$ cd /var/bigbluebutton/published/presentation
$ sudo su
$ export LC_ALL=C
$ apt install python-pip
$ pip install awscli
$ pip install boto3
$ pip install python-magic==0.4.15
$ wget https://raw.githubusercontent.com/rohitcoder/BBB-AWS-S3/master/bbb-s3.py

Get ready with AWS keys, How to get AWS Access Key ID and Secret Access Key ?

  1. Follow this video https://youtu.be/665RYobRJDY
  2. Note: At this step https://youtu.be/665RYobRJDY?t=101 you have to search "S3 Full Access" and then go ahead.

Now, Let's setup our AWS CLI

$ export AWS_ACCESS_KEY_ID=PASTE_AWS_KEY_ID_HERE
$ export AWS_SECRET_ACCESS_KEY=PASTE_AWS_SECRET_HERE

$ aws configure
  AWS Access Key ID [None]: PASTE_AWS_KEY_ID_HERE
  AWS Secret Access Key [None]: PASTE_AWS_SECRET_HERE
  AWS region name [None]: Press enter without typing anything
  Default output format [None]: Again, press enter without typing anything

AWS CLI

Now, Lets edit bbb-s3.py

open bbb-s3.py with any editor and edit value for BUCKET_NAME, DELETE_SERVER_FILES.

DELETE_SERVER_FILES => SET value "True" if you want to delete recordings from Local EC2 instance after gettting uploaded to s3, default value is False

Now, lets configure our s3 path with BBB

$ cd /var/bigbluebutton/playback/presentation/2.0/lib
$ vi writing.js

Here you need to change value of url to your s3 bucket address and add meetinID variable at end.

Editing Writing.js

Now, final step.
  1. Make sure your bucket is publicly accessible.
  2. Open your s3 bucket settings in aws console, and click on Permissions->CORS configuration and add this
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>

Now, you need to setup a cron to automate this upload process

$ crontab -e

add this to your crontab

This will run bbb-s3.py after every 5 minutes. */5 * * * * cd /var/bigbluebutton/published/presentation/ && python bbb-s3.py

It should look like this

Note: we used * * * * * in above screenshot, you can use any timings for cron. We suggest using */5 * * * *

Now, you are ready to go, it should work on your side!

For any question, you can create issues under this repo, and i'll try to answer your question ASAP! ๐ŸคŸ

You can follow me or add me on https://twitter.com/@rohitcoder & https://linkedin.com/in/rohitcoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.