summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfarhatahmad <ahmad.af.farhat@gmail.com>2020-02-19 17:47:41 -0500
committerfarhatahmad <ahmad.af.farhat@gmail.com>2020-02-19 17:47:41 -0500
commit1b960a0625d0cfd42738ffd61210417616429f43 (patch)
tree0df69d739ca04e6fa8a1840130dc0e902e7fd11f
parent86c5873ce2193c29a830545dfb33270886ff32cb (diff)
downloadscalelite-run-itzks-1b960a0625d0cfd42738ffd61210417616429f43.tar.gz
scalelite-run-itzks-1b960a0625d0cfd42738ffd61210417616429f43.tar.bz2
scalelite-run-itzks-1b960a0625d0cfd42738ffd61210417616429f43.zip
Changed default values
-rw-r--r--README.md7
-rwxr-xr-xscalelite/bin/start14
-rw-r--r--scalelite/dotenv2
3 files changed, 10 insertions, 13 deletions
diff --git a/README.md b/README.md
index ed705a9..06b5583 100644
--- a/README.md
+++ b/README.md
@@ -75,8 +75,8 @@ cp scalelite/dotenv scalelite/.env
You can start it as is, but you may want to replace both variables with your own values.
-- `SECRET_KEY_BASE` is the Ruby On Rails secret key and should be replaced with a random one generated with `openssl rand -hex 64`.
-- `LOADBALANCER_SECRET` is the shared secret used by external applications for accessing Scalelite LoadBalancer as if it was a BigBlueButton server. By default, it includes the Secret used for test-install (which is also the first server added to the pool as example).
+- `SECRET_KEY_BASE` is the Ruby On Rails secret key and must be replaced with a random one generated with `openssl rand -hex 64`.
+- `LOADBALANCER_SECRET` is the shared secret used by external applications for accessing Scalelite LoadBalancer as if it was a BigBlueButton server. This variable must be defined in order for the application to start. A secret can be generated with `openssl rand -hex 24`
```
vi scalelite/.env
@@ -245,7 +245,7 @@ Note that the application can be run in the background with `docker-compose up -
<a name="initializing-pool"/>
#### 4.1. Initializing pool of servers
-As the only BigBlueButton Server configured by default is test-install, it comes intentionally disabled. It has to be manually enabled or a new server added. Either option has to be done through the console.
+Since there are no servers added by default, atleast 1 server must be added and enabled in order to get started.
Open a new console and get the IDs of the docker containers running:
@@ -262,6 +262,7 @@ docker exec -it <CONTAINER_ID> sh
Once inside, all the rails commands can be executed as needed. In this case, and assuming that the current current BigBlueButton server is going to be enabled.
```
+bundle exec rake servers:add[BIGBLUEBUTTON_SERVER_URL,BIGBLUEBUTTON_SERVER_SECRET]
bundle exec rake servers
bundle exec rake servers:enable["SERVER_ID_AS SHOWN"]
```
diff --git a/scalelite/bin/start b/scalelite/bin/start
index 5c95e1c..2887034 100755
--- a/scalelite/bin/start
+++ b/scalelite/bin/start
@@ -1,18 +1,14 @@
#!/bin/sh
-
+if [ "$LOADBALNCER_SECRET" == "loadbalancer_secret" ] || [ "$SECRET_KEY_BASE" == "secret_key_base" ]; then
+ echo "ERROR: Detected default SECRET_KEY_BASE or LOADBALANCER_SECRET. Please generate a random value."
+ echo "Exiting..."
+ exit 1
+fi
servers="$(RAILS_ENV=$RAILS_ENV bundle exec rake servers 2>&1)"
echo $servers
-if [ "$(echo "$servers" | cut -c0-2)" == "No" ]; then
- echo ">>> Adding test-install as the default server"
- bundle exec rake servers:add["https://test-install.blindsidenetworks.com/bigbluebutton/api","8cd8ef52e8e101574e400365b55e11a6"]
- bundle exec rake servers
- bundle exec rake status
- echo ">>> Server added by default must be enabled using the rake command"
-fi
-
if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
do
diff --git a/scalelite/dotenv b/scalelite/dotenv
index 432afd5..5d25411 100644
--- a/scalelite/dotenv
+++ b/scalelite/dotenv
@@ -1,2 +1,2 @@
SECRET_KEY_BASE=secret_key_base
-LOADBALANCER_SECRET=8cd8ef52e8e101574e400365b55e11a6
+LOADBALANCER_SECRET=loadbalancer_secret