Browse Source

Changed default values

master
farhatahmad 4 years ago
parent
commit
1b960a0625
3 changed files with 10 additions and 13 deletions
  1. 4
    3
      README.md
  2. 5
    9
      scalelite/bin/start
  3. 1
    1
      scalelite/dotenv

+ 4
- 3
README.md View File

75
 
75
 
76
 You can start it as is, but you may want to replace both variables with your own values.
76
 You can start it as is, but you may want to replace both variables with your own values.
77
 
77
 
78
-- `SECRET_KEY_BASE` is the Ruby On Rails secret key and should be replaced with a random one generated with `openssl rand -hex 64`.
79
-- `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).
78
+- `SECRET_KEY_BASE` is the Ruby On Rails secret key and must be replaced with a random one generated with `openssl rand -hex 64`.
79
+- `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`
80
 
80
 
81
 ```
81
 ```
82
 vi scalelite/.env
82
 vi scalelite/.env
245
 <a name="initializing-pool"/>
245
 <a name="initializing-pool"/>
246
 
246
 
247
 #### 4.1. Initializing pool of servers
247
 #### 4.1. Initializing pool of servers
248
-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.
248
+Since there are no servers added by default, atleast 1 server must be added and enabled in order to get started. 
249
 
249
 
250
 Open a new console and get the IDs of the docker containers running:
250
 Open a new console and get the IDs of the docker containers running:
251
 
251
 
262
 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.
262
 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.
263
 
263
 
264
 ```
264
 ```
265
+bundle exec rake servers:add[BIGBLUEBUTTON_SERVER_URL,BIGBLUEBUTTON_SERVER_SECRET]
265
 bundle exec rake servers
266
 bundle exec rake servers
266
 bundle exec rake servers:enable["SERVER_ID_AS SHOWN"]
267
 bundle exec rake servers:enable["SERVER_ID_AS SHOWN"]
267
 ```
268
 ```

+ 5
- 9
scalelite/bin/start View File

1
 #!/bin/sh
1
 #!/bin/sh
2
 
2
 
3
-
3
+if [ "$LOADBALNCER_SECRET" == "loadbalancer_secret" ] || [ "$SECRET_KEY_BASE" == "secret_key_base" ]; then
4
+  echo "ERROR: Detected default SECRET_KEY_BASE or LOADBALANCER_SECRET. Please generate a random value."
5
+  echo "Exiting..."
6
+  exit 1
7
+fi
4
 
8
 
5
 servers="$(RAILS_ENV=$RAILS_ENV bundle exec rake servers 2>&1)"
9
 servers="$(RAILS_ENV=$RAILS_ENV bundle exec rake servers 2>&1)"
6
 echo $servers
10
 echo $servers
7
 
11
 
8
-if [ "$(echo "$servers" | cut -c0-2)" == "No" ]; then
9
-  echo ">>> Adding test-install as the default server"
10
-  bundle exec rake servers:add["https://test-install.blindsidenetworks.com/bigbluebutton/api","8cd8ef52e8e101574e400365b55e11a6"]
11
-  bundle exec rake servers
12
-  bundle exec rake status
13
-  echo ">>> Server added by default must be enabled using the rake command"
14
-fi
15
-
16
 if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
12
 if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
17
   while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
13
   while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
18
   do
14
   do

+ 1
- 1
scalelite/dotenv View File

1
 SECRET_KEY_BASE=secret_key_base
1
 SECRET_KEY_BASE=secret_key_base
2
-LOADBALANCER_SECRET=8cd8ef52e8e101574e400365b55e11a6
2
+LOADBALANCER_SECRET=loadbalancer_secret

Loading…
Cancel
Save