diff --git a/labs/docker/README.md b/labs/docker/README.md index 8f8d4cfcc420f151117e6a4cb06e522ba6d14353..654d2201a6633e6810e84b566893f62e4d4db29b 100644 --- a/labs/docker/README.md +++ b/labs/docker/README.md @@ -8,39 +8,39 @@ The purpose of this repo is to get BigBlueButton working in a multi-container Do ## Prerequisites -Ensure you have the latest version of Docker-CE by following the install steps +#### Ensure you have the latest version of Docker-CE by following the install steps Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/ Fedora: https://docs.docker.com/install/linux/docker-ce/fedora/ -Make sure to also do the post install steps +#### Make sure to also do the post install steps https://docs.docker.com/install/linux/linux-postinstall/ -Install docker-compose +#### Install docker-compose Ubuntu: ``` -$ sudo dnf install docker-compose +sudo apt-get install docker-compose ``` Fedora: ``` -$ sudo apt-get install docker-compose +sudo dnf install docker-compose ``` ## Build all docker images -You should now be able to build all docker images with one command +#### Build all docker images with one command ``` -$ cd labs/docker/ -$ make release +cd labs/docker/ +make release ``` -Verify that you have all the necessary images +#### Verify that you have all the necessary images ``` -$ docker images +docker images ``` You should see: @@ -48,7 +48,7 @@ You should see: * bbb-common-message * bbb-common-web * bbb-fsesl-client -* bbb-akka-apps +* bbb-apps-akka * bbb-fsesl-akka * bbb-web * bbb-html5 @@ -67,133 +67,147 @@ In the event that any of the above images are missing, you'll need to build them sbt is needed to build the Scala components ``` -$ cd labs/docker/sbt/ -$ docker build -t 'sbt:0.13.8' . +cd labs/docker/sbt/ +docker build -t 'sbt:0.13.8' . ``` Build libraries ``` -$ cd bbb-common-message/ -$ docker build -t 'bbb-common-message' --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd bbb-common-message/ +docker build -t 'bbb-common-message' --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . -$ cd bbb-common-web/ -$ docker build -t 'bbb-common-web' --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd bbb-common-web/ +docker build -t 'bbb-common-web' --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . -$ cd bbb-fsesl-client/ -$ docker build -t 'bbb-fsesl-client' --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd bbb-fsesl-client/ +docker build -t 'bbb-fsesl-client' --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . ``` Build akka components ``` -$ cd akka-bbb-apps/ -$ docker build -t bbb-apps-akka --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd akka-bbb-apps/ +docker build -t bbb-apps-akka --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . # Not needed since we're setting up HTML5 only -$ cd akka-bbb-transcode/ -$ docker build -t bbb-transcode --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd akka-bbb-transcode/ +docker build -t bbb-transcode --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . -$ cd akka-bbb-fsesl/ -$ docker build -t bbb-fsesl-akka --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd akka-bbb-fsesl/ +docker build -t bbb-fsesl-akka --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . ``` Build bbb-web ``` -$ cd bigbluebutton-web/ -$ docker build -t bbb-web --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . +cd bigbluebutton-web/ +docker build -t bbb-web --build-arg COMMON_VERSION=0.0.1-SNAPSHOT . ``` Build bbb-html5 ``` -$ cd bigbluebutton-html5/ -$ docker build -t bbb-html5 . +cd bigbluebutton-html5/ +docker build -t bbb-html5 . ``` Build bbb-webrtc-sfu ``` -$ cd labs/bbb-webrtc-sfu/ -$ docker build -t bbb-webrtc-sfu . +cd labs/bbb-webrtc-sfu/ +docker build -t bbb-webrtc-sfu . ``` Build bbb-webhooks ``` -$ cd bbb-webhooks/ -$ docker build -t bbb-webhooks . +cd bbb-webhooks/ +docker build -t bbb-webhooks . ``` Build Kurento Media Server ``` -$ cd labs/docker/kurento/ -$ docker build -t bbb-kurento . +cd labs/docker/kurento/ +docker build -t bbb-kurento . ``` Build FreeSWITCH ``` -$ cd labs/docker/freeswitch/ -$ docker build -t bbb-freeswitch . +cd labs/docker/freeswitch/ +docker build -t bbb-freeswitch . ``` Build nginx ``` -$ cd labs/docker/nginx/ -$ docker build -t bbb-nginx . -``` - -Build nginx-dhp (used to generate the Diffie-Hellman file) -``` -$ cd labs/docker/nginx-dhp/ -$ docker build -t nginx-dhp . +cd labs/docker/nginx/ +docker build -t bbb-nginx . ``` Build coturn ``` -$ cd labs/docker/coturn -$ docker build -t bbb-coturn . +cd labs/docker/coturn +docker build -t bbb-coturn . ``` (Optional) Build bbb-lti ``` -$ cd bbb-lti/ -$ docker build -t bbb-lti . +cd bbb-lti/ +docker build -t bbb-lti . ``` ## Setup -Export your configuration as environment variables, make sure to replace the SERVER_DOMAIN value with your hostname +#### Export your configuration as environment variables +NOTE: replace the example SERVER_DOMAIN's value with your own FQDN ``` -$ export SERVER_DOMAIN=docker.bigbluebutton.org -$ export EXTERNAL_IP=$(dig +short $SERVER_DOMAIN | grep '^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$' | head -n 1) -$ export SHARED_SECRET=`openssl rand -hex 16` -$ export COTURN_REST_SECRET=`openssl rand -hex 16` -$ export SECRET_KEY_BASE=`openssl rand -hex 64` -$ export SCREENSHARE_EXTENSION_KEY=akgoaoikmbmhcopjgakkcepdgdgkjfbc -$ export SCREENSHARE_EXTENSION_LINK=https://chrome.google.com/webstore/detail/bigbluebutton-screenshare/akgoaoikmbmhcopjgakkcepdgdgkjfbc -$ export TAG_PREFIX= -$ export TAG_SUFFIX= +export SERVER_DOMAIN=docker.bigbluebutton.org +export EXTERNAL_IP=$(dig +short $SERVER_DOMAIN | grep '^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$' | head -n 1) +export SHARED_SECRET=`openssl rand -hex 16` +export COTURN_REST_SECRET=`openssl rand -hex 16` +export SECRET_KEY_BASE=`openssl rand -hex 64` +export SCREENSHARE_EXTENSION_KEY=akgoaoikmbmhcopjgakkcepdgdgkjfbc +export SCREENSHARE_EXTENSION_LINK=https://chrome.google.com/webstore/detail/bigbluebutton-screenshare/akgoaoikmbmhcopjgakkcepdgdgkjfbc +export TAG_PREFIX= +export TAG_SUFFIX= ``` -Create a volume for the static files (optional) +#### Create a volume for the SSL certs ``` -$ docker volume create docker_static -$ cd bigbluebutton-config/web/ -$ docker run -d --rm --name nginx -v docker_static:/var/www/bigbluebutton-default nginx tail -f /dev/null -$ docker cp . nginx:/var/www/bigbluebutton-default -$ docker exec -it nginx chown -R www-data:www-data /var/www/bigbluebutton-default -$ docker stop nginx +docker volume create docker_ssl-conf +``` + +#### Generate SSL certs +``` +docker run --rm -p 80:80 -v docker_ssl-conf:/etc/letsencrypt -it certbot/certbot certonly --non-interactive --register-unsafely-without-email --agree-tos --expand --domain $SERVER_DOMAIN --standalone + +# certificate path: docker_ssl-conf/live/$SERVER_DOMAIN/fullchain.pem +# key path: docker_ssl-conf/live/$SERVER_DOMAIN/privkey.pem ``` +NOTE: If running on AWS, you won't be able to use the default Public DNS for your SERVER_DOMAIN as Let's Encrypt doesn't allow generating SSL certs from any *.amazonaws.com domain. Alternatively, you can create a PTR record that goes from a non-AWS FQDN to the AWS FQDN. + +#### Create a volume for the static files (optional) +``` +docker volume create docker_static +cd bigbluebutton-config/web/ +docker run -d --rm --name nginx -v docker_static:/var/www/bigbluebutton-default nginx tail -f /dev/null +docker cp . nginx:/var/www/bigbluebutton-default +docker exec -it nginx chown -R www-data:www-data /var/www/bigbluebutton-default +docker stop nginx +``` + +#### Ensure the following ports are open +* TCP/UDP 3478 +* TCP 80 +* TCP 443 ## Run -Launch everything with docker compose +#### Launch everything with docker compose ``` -$ cd labs/docker/ -$ docker-compose up +cd labs/docker/ +docker-compose up ``` -You should be able to start using greenlight to access your server and create meetings +#### Access your server via greenlight and create meetings -https://<your_hostname>/b +https://<your_fqdn_here>/b -To exit +#### To shut down and exit gracefully ``` CTRL+C ``` @@ -203,58 +217,58 @@ CTRL+C ## Prerequisites -Install kubeadm, kubelet, and kubectl +#### Install kubeadm, kubelet, and kubectl https://kubernetes.io/docs/setup/independent/install-kubeadm/ -To disable swap, comment out the "swap" line in the following file, then do a reboot: +#### Disable swap by commenting out the "swap" line in /etc/fstab, then do a reboot ``` -$ sudo vi /etc/fstab -$ sudo systemctl reboot +sudo vi /etc/fstab +sudo systemctl reboot ``` -Verify swap is disabled +#### Verify swap is disabled ``` -$ sudo free -h +sudo free -h ``` -Install Minikube +#### Install Minikube https://kubernetes.io/docs/tasks/tools/install-minikube/ -Install VirtualBox Manager +#### Install VirtualBox Manager Ubuntu: ``` -$ sudo dnf install virtualbox +sudo apt-get install virtualbox ``` Fedora: ``` -$ sudo apt-get install virtualbox +sudo dnf install virtualbox ``` ## Setup -Ensure you have the following kernel modules loaded to avoid preflight errors and warnings when setting up your cluster: +#### The following kernel modules are required to avoid preflight errors and warnings during cluster setup * ip_vs * ip_vs_rr * ip_vs_wrr * ip_vs_sh -You can check if you already have these loaded with +#### Check if kernel modules are already loaded ``` -$ lsmod | grep ip_vs +lsmod | grep ip_vs ``` -If the kernel modules aren't loaded, go ahead and add them +#### Add the kernel modules (if not already loaded) ``` -$ sudo modprobe ip_vs -$ sudo modprobe ip_vs_rr -$ sudo modprobe ip_vs_wrr -$ sudo modprobe ip_vs_sh +sudo modprobe ip_vs +sudo modprobe ip_vs_rr +sudo modprobe ip_vs_wrr +sudo modprobe ip_vs_sh ``` -Create a single master cluster with kubeadm +#### Create a single master cluster with kubeadm https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/