Переглянути джерело

Updated documentation

master
jfederico 4 роки тому
джерело
коміт
5593ced6d8
2 змінених файлів з 72 додано та 24 видалено
  1. 71
    23
      README.md
  2. 1
    1
      docker-compose.yml

+ 71
- 23
README.md Переглянути файл

@@ -3,7 +3,6 @@
3 3
 This document provides instructions on how to deploy scalelite + redis behind a nginx proxy
4 4
 using docker-compose.
5 5
 
6
-
7 6
 ## Prerequisites
8 7
 
9 8
 - Install
@@ -16,14 +15,22 @@ using docker-compose.
16 15
 
17 16
   - [scalelite](https://cloud.docker.com/u/blindsidenetwks/repository/docker/blindsidenetwks/scalelite)
18 17
 
19
-- Make sure you have your own DNS and a public domain name or a delegated one (e.g. <JOHN>.blindside-dev.com).
18
+- Make sure you have your own DNS and a public domain name (e.g. example.com) or a delegated one (e.g. <JOHN>.blindside-dev.com).
20 19
 
21 20
 
22
-## Preliminary steps
21
+- As you have to have access to dockerhub private repositories sign in into docker hub with your account
22
+with `docker login` any type your username and password using the stdin.
23 23
 
24
+```
25
+docker login
26
+```
24 27
 
25 28
 ## Steps
26 29
 
30
+These steps were written for an Ubuntu 18.04 machine. It is assumed that your machine has the same (or a compatible version).
31
+
32
+### Getting the scripts
33
+
27 34
 Clone this repository:
28 35
 
29 36
 ```
@@ -31,20 +38,44 @@ git clone git@github.com:blindsidenetworks/scalelite-run.git
31 38
 cd scalelite-run
32 39
 ```
33 40
 
34
-Copy  `dotenv` file located in the root of the project as `.env` and edit it
41
+Copy `dotenv` file located in the root of the project as `.env` and edit it
35 42
 
36 43
 ```
44
+cp dotenv .env
37 45
 vi .env
38 46
 ```
39 47
 
40
-You will need to replace both variables as in:
41
-`DOMAIN_ROOT=bigbluebutton.org` to the one assigned to you (e.g. `DOMAIN_ROOT=blindside-dev.com`)
42
-`DOMAIN_SUB=lab` to the one assigned to you (e.g. `DOMAIN_SUB=<JOHN>`)
48
+You need to replace the variable `HOST_NAME=sl.xlab.blindside-dev.com` with a hostname under your own domain name (e.g. `HOST_NAME=sl.john.blindside-dev.com`) or delegated sub-domain.
49
+
50
+
51
+Copy `dotenv` file located in the scalelite directory as `.env` and in the same way as before, edit it:
52
+
53
+```
54
+cp scalelite/dotenv scalelite/.env
55
+vi scalelite/.env
56
+```
57
+
58
+You can start it as is, but you may want to replace both variables with your own values.
59
+
60
+`SECRET_KEY_BASE` is the Ruby On Rails secret key and should be replaced with a random one generated with `bundle exec rake secret`
61
+
62
+`LOADBALANCER_SECRET` is the shared secret used by external applications for accessing the Load Balancer 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).
63
+
64
+
65
+### Using SSL Letsencrypt in the cloud
66
+
67
+If all the previous steps were followed properly and the machine is accessible in the Internet, only execute:
68
+
69
+```
70
+./init-letsencrypt.sh
71
+```
72
+
73
+This will generate the SSL certificates and run scalelite for the first time, so all the required files are automatically generated.
74
+
43 75
 
44
-Create your own SSL Letsencrypt certificates. As you are normally going to
45
-have this deployment running on your own computer (or in a private VM), you
46
-need to generate the SSL certificates with certbot by adding the challenge to
47
-your DNS.
76
+### Using SSL Letsencrypt certificate in private Networks
77
+
78
+If you are trying to install scalelite locally or in a private network, the process is more manual. You need to generate the SSL certificates with certbot by adding the challenge to your DNS.
48 79
 
49 80
 Install letsencrypt in your own computer
50 81
 
@@ -94,20 +125,10 @@ Copy the certificates to your scalelite-run directory. Although `/etc/letsencryp
94 125
 holds the latest certificate, they are only symbolic links. The real files must be copied and renamed
95 126
 
96 127
 ```
97
-cp -R /etc/letsencrypt/archive/sl.<JOHN>.blindside-dev.com <YOUR ROOT>/scalelite-run/nginx/letsencrypt/live
128
+cp -R /etc/letsencrypt <YOUR ROOT>/scalelite-run/data/certbot/conf
98 129
 ```
99 130
 
100
-```
101
-cd <YOUR ROOT>/scalelite-run/nginx/letsencrypt/live/sl.<JOHN>.blindside-dev.com/
102
-mv cert1.pem cert.pem
103
-mv chain1.pem chain.pem
104
-mv fullchain1.pem fullchain.pem
105
-mv privkey1.pem privkey.pem
106
-```
107
-
108
-As you have to have access to dockerhub private repositories sign in into docker hub with your account
109
-with `docker login -u <YOUR_USERNAME> -p <YOUR_PASSWORD>` or `docker login -u <YOUR_USERNAME>` if you
110
-want to type your password using the stdin
131
+### Starting the application
111 132
 
112 133
 And finally, start your environment with docker-compose
113 134
 
@@ -122,3 +143,30 @@ end you will have access to scalelite through:
122 143
 ```
123 144
 https://sl.<JOHN>.blindside-dev.com/bigbluebutton/api
124 145
 ```
146
+
147
+Note that you can always run the application in the background `docker-compose up -d`
148
+
149
+### Final Steps
150
+
151
+As the only BigBlueButton Server configured by default is test-install, this comes intentionally disabled. You would have to either enable it or to add new ones. Either way this has to be done through the console.
152
+
153
+Open a new console and get the ids of the docker containers running:
154
+
155
+```
156
+docker ps
157
+```
158
+
159
+Get into the container running the api
160
+
161
+```
162
+docker exec -it <CONTAINER_ID> sh
163
+```
164
+
165
+Once inside, you can see execute all the rails commands as needed. In this case, lets assume that you want to enable the current BigBlueButton server
166
+
167
+```
168
+bundle exec rake servers
169
+bundle exec rake servers:enable["SERVER_ID_AS SHOWN"]
170
+```
171
+
172
+For more information on what rake commands can be executed, see scalelite documentation.

+ 1
- 1
docker-compose.yml Переглянути файл

@@ -14,7 +14,7 @@ services:
14 14
       - ./nginx/sites.template:/etc/nginx/sites-available/sites.template
15 15
       - ./nginx/default/html:/var/www/html
16 16
       - ./nginx/log/nginx:/var/log/nginx
17
-      - ./data/certbot/conf/live:/etc/letsencrypt/live
17
+      - ./data/certbot/conf:/etc/letsencrypt
18 18
       - ./data/certbot/www:/var/www/certbot
19 19
     ports:
20 20
       - "80:80"

Завантаження…
Відмінити
Зберегти