ソースを参照

Changed default values

master
farhatahmad 4年前
コミット
1b960a0625
3個のファイルの変更10行の追加13行の削除
  1. 4
    3
      README.md
  2. 5
    9
      scalelite/bin/start
  3. 1
    1
      scalelite/dotenv

+ 4
- 3
README.md ファイルの表示

@@ -75,8 +75,8 @@ cp scalelite/dotenv scalelite/.env
75 75
 
76 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 82
 vi scalelite/.env
@@ -245,7 +245,7 @@ Note that the application can be run in the background with `docker-compose up -
245 245
 <a name="initializing-pool"/>
246 246
 
247 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 250
 Open a new console and get the IDs of the docker containers running:
251 251
 
@@ -262,6 +262,7 @@ docker exec -it <CONTAINER_ID> sh
262 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 266
 bundle exec rake servers
266 267
 bundle exec rake servers:enable["SERVER_ID_AS SHOWN"]
267 268
 ```

+ 5
- 9
scalelite/bin/start ファイルの表示

@@ -1,18 +1,14 @@
1 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 9
 servers="$(RAILS_ENV=$RAILS_ENV bundle exec rake servers 2>&1)"
6 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 12
 if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
17 13
   while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
18 14
   do

+ 1
- 1
scalelite/dotenv ファイルの表示

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

読み込み中…
キャンセル
保存