Newer
Older
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
# Configuration
## SSH
The Ansible deployment will be done through SSH, so you must be able to connect to all the involved hosts by using SSH public key authentication.
If you or your team do not have a SSH key pair, please create one with `ssh-keygen` :
```sh
ssh-keygen -t ed25519
```
The SSH **public key** (`~/.ssh/id_ed25519.pub`) must then be added to the authorized keys (`~/.ssh/authorized_keys`) of the `root` account of all the involved hosts (mymediaserver, mymediaworker, mymediavault, etc.).
It is recommended to also use a SSH config file for your hosts, especially if some of them are protected by a bastion host. For example, let's assume that "mymediaserver" is used as a bastion to join "mymediaworker" and "mymediavault":
```ssh
Host mymediaserver
Hostname 1.2.3.4
IdentityFile ~/.ssh/id_ed25519
User root
Host mymediaworker
Hostname 10.0.0.2
IdentityFile ~/.ssh/id_ed25519
User root
# use mymediaserver as a jump host
ProxyJump mymediaserver
Host mymediavault
Hostname 10.0.0.3
IdentityFile ~/.ssh/id_ed25519
User root
# use mymediaserver as a jump host
ProxyJump mymediaserver
```
## Customer informations
The customer must provides some informations about its network, desired URLs, etc. You can use this [deployment form template](https://docs.google.com/document/d/13_t6LqlIkIMo3KEOsLWKfk_kB3Xw1JHktOOFbCHhxwY/) as a base to send to the customer.
When the deployment form is completed by the customer, send it to the [UbiCast deployment team](mailto:deploiements@ubicast.eu) who will put the data in the [fleet management](https://mirismanager.ubicast.eu/) tool.
Once the deployment team have updated the data for the hosts, the deployment can begin.
## Inventory
Make a copy of the `example` inventory and eventually customize it with the customer informations.
```sh
cp -r inventories/example inventories/my-customer
```
### Hosts and Groups
Edit `inventories/my-customer/hosts` to match with `my-customer` inrastructure.
For example, if there is only a MediaServer and a MediaWorker you can remove all other hosts and groups:
```ini
mymediaserver
mymediaworker
mymediavault
mymediaserver
[postgres]
mymediaserver
mymediaserver
[wowza]
mymediaserver
[celerity]
mymediaserver
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
mymediavault
```
### Variables
You **must at least** configure:
- `skyreach_system_key` values in `inventories/my-customer/host_vars/<host>.yml`
If you want to set/override a variable for:
- all: `inventories/my-customer/group_vars/all.yml`.
- a group:`inventories/my-customer/group_vars/<group>.yml`.
- a host: `inventories/my-customer/host_vars/<host>.yml`.
## Testing
Make sure Ansible can connect to all the hosts:
```sh
ansible -i inventories/my-customer -m ping all
```
If it works, it should looks like this:
```
mymediaserver | SUCCESS => {
"changed": false,
"ping": "pong"
}
mymediaworker | SUCCESS => {
"changed": false,
"ping": "pong"
}
mymediavault | SUCCESS => {
"changed": false,
"ping": "pong"
}
```