Vagrant Setup for development and testing

67 views
Skip to first unread message

DWAYNE SANDALL

unread,
Jun 15, 2021, 2:09:41 PM6/15/21
to BigBlueButton-dev
I had been digging around here for info on setting up a development environment and found various snippets, but not one collection of how-to or what worked for me, so here it is - How I manage to get my dev environment set up for local testing on my MacBook

I am running vagrant/virtualbox on Mac Big Sur, so your mileage may vary, rtfm, etc... but this is what got me up and running. Please note, that although I've been using vagrant for years, I've never really dug into the nitty-gritty of it because, well, the homestead iteration I've been using has been great out of the box and I've never needed to. So, with that in mind, please feel free to add comments on how to streamline this if there are things that could be done better.

In particular, I couldn't figure out how to do the DNS challenge with the certbot in a vagrant provision script as it requires user input once you set the dns challenge.

Vagrant File:
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/bionic64"
  config.vm.provider "virtualbox" do |v|
    v.memory = 8192
    v.cpus = 4
  end
  config.vm.hostname = "bbb-dev-local.mydomain.com"
  config.vm.network "private_network", ip: "192.168.10.20"
  config.vm.network :forwarded_port, guest: 80, host: 8880
  config.vm.provision :shell, path: "bootstrap.sh"
end


Bootstrap.sh
#!/usr/bin/env bash

sudo su

apt-get update

snap install core; snap refresh core

snap install --classic certbot
# end bootstrap.sh

Now after doing my vagrant up --provision, a couple things to do manually.

vagrant ssh, followed by a sudo su to get to root.

Then run the certbot with dns challenge:
certbot --manual certonly -d bbb-dev-local.mydomain.com --preferred-challenges dns

And then, install bbb using the installer script:

From here I am almost ready to go, but some additions to the hosts files required to make things talk back and forth between vms on my machine.

In the bbb vm I had to modify /etc/hosts as follows: (probably easily done in the provision script, but I haven't had time to go figure it out)

192.168.10.10 my-frontend-dev.local

The second entry is pointing to the other vm I run for developing the custom front end we use for our BBB installation, without it, bbb won't send webhooks across the virtual network.

And then on my host machine, I add an entry to /etc/hosts to point my browser to the vms instead of going out to the internet
192.168.10.10 my-frontend-dev.local

Now there is the issue of setting up shared folders for the bbb-dev environment and your local host machine, but if you're actively developing the bbb components themselves, you'll know that part - I'm not there yet, but moving that way.

There you have it, how I got it all set up, only took a half day of experimenting and reading the docs on all the little bits I knew just enough to be slightly dangerous with :-)

If anyone has thoughts on streamlining, etc, let me know. I'm going to set up a quick repo for this and will share that later this week, 

Dwayne

Ghazi TRIKI

unread,
Jun 15, 2021, 4:31:28 PM6/15/21
to BigBlueButton-dev
Hi Dwayne,

I have been using Vagrant a lot for BigBlueButton dev. What I can assure is that it works perfectly. The process I follow is install BigBlueButton manually, then configure the HTTPS manually and use my own wildcard certificate. Creating a certificate with certbot locally is possible but difficult to achieve.

However I moved to another solution. I have now a VPS online or cheap bare-metal server; choose your hosting provider carefully to avoid surprises. I sync the local code to the remote VM using https://mutagen.io/. Easier, faster and you save on local resources.

Ali Alhaidary

unread,
Jun 16, 2021, 2:33:05 AM6/16/21
to bigblueb...@googlegroups.com
Hi,

The attached is displayed when playing a recording, however,
participants count is always not correct.

Ali

Screenshot 2021-06-16 at 09-28-52 المجلس.png
Reply all
Reply to author
Forward
0 new messages