Customizing The Bigbuebutton Greenlight Customization
Customizing The Bigbuebutton Greenlight Customization
Switching
from Install to Customize
In the case that you would like to make changes to your code without losing
your current data, there are steps you can take to switch from
the Install version to the Customize version without losing any data.
In the Greenlight directory, take down Greenlight and rename the Greenlight
directory to avoid conflicts using these commands:
docker-compose down
cd ..
mv greenlight/ greenlight-old/
Then, install Greenlight by following the Customize instructions
Customizing Greenlight
Greenlight is written in Ruby on Rails. If you know how Ruby on Rails works,
you can easily customize Greenlight to your own needs.
The default install instructions will run Greenlight within docker. To customize
Greenlight, you’ll want to checkout the source code and build your own
docker image.
1. Install Docker
The official Docker documentation is the best resource for Docker install
steps. To install Docker (we recommend installing Docker CE unless you
have a subscription to Docker EE),
Install Docker Engine on Ubuntu
Estimated reading time: 11 minutes
To get started with Docker Engine on Ubuntu, make sure you meet the prerequisites, then install
Docker.
Prerequisites
OS requirements
To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions:
Docker Engine is supported on x86_64 (or amd64), armhf, arm64, s390x (IBM Z), and ppc64le (IBM
Power) architectures.
Installation methods
You can install Docker Engine in different ways, depending on your needs:
Most users set up Docker’s repositories and install from them, for ease of installation and
upgrade tasks. This is the recommended approach.
Some users download the DEB package and install it manually and manage upgrades
completely manually. This is useful in situations such as installing Docker on air-gapped
systems with no access to the internet.
In testing and development environments, some users choose to use
automated convenience scripts to install Docker.
1. Update the apt package index and install packages to allow apt to use a repository over
HTTPS:
2. $ sudo apt-get update
3.
4. $ sudo apt-get install \
5. apt-transport-https \
6. ca-certificates \
7. curl \
8. gnupg-agent \
9. software-properties-common
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8
8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
12. Use the following command to set up the stable repository. To add
the nightly or test repository, add the word nightly or test (or both) after the
word stable in the commands below. Learn about nightly and test channels.
Note: The lsb_release -cs sub-command below returns the name of your Ubuntu
distribution, such as xenial. Sometimes, in a distribution like Linux Mint, you might need to
change $(lsb_release -cs) to your parent Ubuntu distribution. For example, if you are
using Linux Mint Tessa, you could use bionic. Docker does not offer any guarantees on
untested and unsupported Ubuntu distributions.
o x86_64 / amd64
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
1. Update the apt package index, and install the latest version of Docker Engine and
containerd, or go to the next step to install a specific version:
2. $ sudo apt-get update
3. $ sudo apt-get install docker-ce docker-ce-cli containerd.io
If you have multiple Docker repositories enabled, installing or updating without specifying a
version in the apt-get install or apt-get update command always installs the highest
possible version, which may not be appropriate for your stability needs.
4. To install a specific version of Docker Engine, list the available versions in the repo, then
select and install:
b. Install a specific version using the version string from the second column, for
example, 5:18.09.1~3-0~ubuntu-xenial.
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-
cli=<VERSION_STRING> containerd.io
5. Verify that Docker Engine is installed correctly by running the hello-world image.
6. $ sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it
prints an informational message and exits.
Docker Engine is installed and running. The docker group is created but no users are added to it.
You need to use sudo to run Docker commands. Continue to Linux postinstall to allow non-privileged
users to run Docker commands and for other optional configuration steps.
.
Before moving onto the next step, verify that Docker is installed by running:
docker -v
2. Install Greenlight
Using your GitHub account, do the following
On branch custom-changes
Your branch is up to date with 'upstream/v2'.
nothing to commit, working tree clean
3. Configure Greenlight
Greenlight will read its environment configuration from the .env file. To
generate this file, enter ~/greenlight directory and run:
cp sample.env .env
If you open the .env file you’ll see that it contains information for all of the
Greenlight configuration options. Some of these are mandatory.
Verifying Configuration
Once you have finished setting the environment variables above in
your .env file, to verify that you configuration is valid, run:
docker run --rm --env-file .env bigbluebutton/greenlight:v2 bundle
exec rake conf:check
If you have configured an SMTP server in your .env file, then all four tests
must pass before you proceed. If you have not configured an SMTP server,
then only the first three tests must pass before you proceed.
Using docker-compose
Before you continue, verify that you have docker-compose installed by
running:
docker-compose -v
Once you have verified that it is installed correctly, create your Docker image
by running (image name can be any name of your choosing):
./scripts/image_build.sh <image name> release-v2
Example
./scripts/image_build.sh bigbluebutton/greenlight release-v2
Next, in the docker-compose.yml file, replace:
services:
app:
entrypoint: [bin/start]
image: bigbluebutton/greenlight:v2
With
services:
app:
entrypoint: [bin/start]
image: <image name>:release-v2
Finally, from the ~/greenlight directory, start the application using:
docker-compose up -d
This will start Greenlight, and you should be able to access it
at https://<hostname>/b.
The database is saved to the BigBlueButton server so data persists when you
restart. This can be found at ~/greenlight/db.
All of the logs from the application are also saved to the BigBlueButton
server, which can be found at ~/greenlight/log.
If you don’t wish for either of these to persist, simply remove the volumes
from the docker-compose.yml file.
To stop the application, run:
docker-compose down
Restart Greenlight
After you edit the .env file or make any change to the code, you are required
to rebuild the Greenlight image in order for it to pick up the changes. Ensure
you are in the Greenlight directory when restarting Greenlight. To do this,
enter the following commands:
docker-compose down
./scripts/image_build.sh <image name> release-v2
docker-compose up -d
Updating to the Latest Version of
Greenlight
If a new version of Greenlight has been released, you’ll need to fetch the
most up to date version of the remote repository.
git fetch upstream
To merge the code:
git merge upstream/v2
Once you’ve merged your code, you should look through the latest version of
the sample.env file here, and see if there are any new settings you would like
to change or add to Greenlight. If you come across something you want to
add, simply copy paste it to the bottom of your .env, then restart Greenlight.
here. Don’t worry about any of the .env configuration, as it will be overwritten
by the version you are currently using.
Copy over your database file and .env file using these commands:
cp ~/greenlight-old/.env ~/greenlight/.env
sudo cp -r ~/greenlight-old/db ~/greenlight/
Finally, restart Greenlight with:
cd ~/greenlight
docker-compose down
docker-compose up -d
Updating the code
A common customization is to modify the default landing page. For a simple
change, let’s rename the welcome banner to say “Welcome to MyServer”.
The welcome banner is generated by index.html.erb. To customize this
message, open app/views/main/index.html.erb in an editor.
<%
# BigBlueButton open source conferencing system -
http://www.bigbluebutton.org/.
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors
(see below).
# This program is free software; you can redistribute it and/or
modify it under the
# terms of the GNU Lesser General Public License as published by
the Free Software
# Foundation; either version 3.0 of the License, or (at your
option) any later
# version.
#
# BigBlueButton is distributed in the hope that it will be useful,
but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
# You should have received a copy of the GNU Lesser General Public
License along
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<div class="background">
<div class="container pt-9 pb-8">
<div class="row">
<div class="col-md-12 col-sm-12 text-center">
<h1 id="main-text" class="display-4 mb-4"> <%=
t("landing.welcome").html_safe %></h1>
<p class="lead offset-lg-2 col-lg-8 col-sm-12 "><%=
t("landing.about", href: link_to(t("greenlight"),
"https://bigbluebutton.org/2018/07/09/greenlight-2-0/", target:
"_blank")).html_safe %></p>
<%= link_to "https://youtu.be/Hso8yLzkqj8", target:
"_blank" do %>
<h4><%= t("landing.video") %> <i class="far fa-play-
circle ml-1"></i></h4>
<% end %>
</div>
</div>
</div>
</div>