summaryrefslogtreecommitdiff
path: root/README.md
blob: c9de67591abd536e1d0dc25ee9b07204bbcd8868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# scalelite-run

This document provides instructions on how to deploy scalelite + redis behind a nginx proxy
using docker-compose.


## Prerequisites

- Install
[docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04)
  and
[docker-compose](https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04)

- Make sure you have access to Blindside Networks private repository in
  [dockerhub](https://cloud.docker.com/u/blindsidenetwks/repository/list) particularly to:

  - [scalelite](https://cloud.docker.com/u/blindsidenetwks/repository/docker/blindsidenetwks/scalelite)

- Make sure you have your own DNS and a public domain name or a delegated one under blindside-dev.com
  (e.g. <JOHN>.blindside-dev.com)


## Preliminary steps


## Steps

Clone this repository:

```
git clone git@github.com:blindsidenetworks/scalelite-run.git
cd scalelite-run
```

Copy  `dotenv` file located in the root of the project as `.env` and edit it

```
vi .env
```

You will need to replace both variables as in:
`DOMAIN_ROOT=bigbluebutton.org` to the one assigned to you (e.g. `DOMAIN_ROOT=blindside-dev.com`)
`DOMAIN_SUB=lab` to the one assigned to you (e.g. `DOMAIN_SUB=<JOHN>`)

Create your own SSL Letsencrypt certificates. As you are normally going to
have this deployment running on your own computer (or in a private VM), you
need to generate the SSL certificates with certbot by adding the challenge to
your DNS.

Install letsencrypt in your own computer

```
sudo apt-get update
sudo apt-get -y install letsencrypt
```

Make yourself root

```
sudo -i
```

Start creating the certificates

```
certbot certonly --manual -d sl.<JOHN>.blindside-dev.com --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges=dns --email hostmaster@blindsdie-dev.com --server https://acme-v02.api.letsencrypt.org/directory
```

You will see something like this
```
-server https://acme-v02.api.letsencrypt.org/directory
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for gl.<JOHN>.blindside-dev.com
dns-01 challenge for gl.<JOHN>.blindside-dev.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.sl.<JOHN>.blindside-dev.com with the following value:

2dxWYkcETHnimmQmCL0MCbhneRNxMEMo9yjk6P_17kE

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
```

Create a TXT record in your DNS for
`_acme-challenge.sl.<JOHN>.blindside-dev.com` with the challenge string as
its value `2dxWYkcETHnimmQmCL0MCbhneRNxMEMo9yjk6P_17kE`

Copy the certificates to your scalelite-run directory. Although `/etc/letsencrypt/live/`
holds the latest certificate, they are only symbolic links. The real files must be copied and renamed

```
cp -R /etc/letsencrypt/archive/sl.<JOHN>.blindside-dev.com <YOUR ROOT>/scalelite-run/nginx/letsencrypt/live
```

```
cd <YOUR ROOT>/scalelite-run/nginx/letsencrypt/live/sl.<JOHN>.blindside-dev.com/
mv cert1.pem cert.pem
mv chain1.pem chain.pem
mv fullchain1.pem fullchain.pem
mv privkey1.pem privkey.pem
```

As you have to have access to dockerhub private repositories sign in into docker hub with your account
with `docker login -u <YOUR_USERNAME> -p <YOUR_PASSWORD>` or `docker login -u <YOUR_USERNAME>` if you
want to type your password using the stdin

And finally, start your environment with docker-compose

```
cd <YOUR ROOT>/scalelite-run
docker-compose up
```

If everything goes well, you will see all the containers starting and at the
end you will have access to scalelite through:

```
https://sl.<JOHN>.blindside-dev.com/bigbluebutton/api
```