summaryrefslogtreecommitdiffstats
path: root/README.org
blob: 755408271298a0605d5176a48b33aea173208877 (plain) (blame)
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
This repository contains infrastructure-as-code ansible configurations
for various pieces of the EmacsConf infrastructure.

ansible-galaxy collection install community.general

* Front - publishing
** Prod
To run the playbook and publish the main schedule:
ansible-playbook -i inventory.yaml prod-playbook.yaml

Update a specific talk's before/nav and the main schedule: (ex: wayland)
ansible-playbook playbook.yaml -e '{"slug": "wayland"}' -i inventory.yaml
** Docker
Creating:
- ansible-playbook -i docker-inventory.yaml docker-playbook.yaml

Reusing:
- ansible-playbook -i docker-inventory.yaml docker-reuse-playbook.yaml
With docker:
https://stackoverflow.com/questions/24738264/how-to-test-ansible-playbook-using-docker
* Pad
** Docker
Creating:
ansible-playbook -i docker-inventory.yaml docker-playbook.yaml --tags pad

Reusing an existing container:
ansible-playbook -i docker-inventory.yaml docker-reuse-playbook.yaml --tags pad

Connecting:
docker exec -it emacsconf-pad /bin/bash

Creating pads
ansible-playbook -i docker-inventory.yaml docker-reuse-playbook.yaml --tags create-pads

file:/docker:emacsconf-pad:/home/etherpad/etherpad/

Getting the API key

#+NAME: pad-key
#+begin_src sh
docker exec  emacsconf-pad cat /home/etherpad/etherpad/APIKEY.txt
#+end_src

#+RESULTS: pad-key
:results:
b7a15dc34cc7f6917cca6cd9a2b4b92145af7c7cd9b341af34869ab8cd3568be
:end:

#+begin_src sh :var padkey=pad-key
echo curl "http://localhost:9001/api/1/createPad?apikey=$padkey&padID=emacsconf-2022"
curl "http://localhost:9001/api/1/createPad?apikey=$padkey&padID=emacsconf-2022"
#+end_src

#+RESULTS:
:results:
curl http://localhost:9001/api/1/createPad?apikey=b7a15dc34cc7f6917cca6cd9a2b4b92145af7c7cd9b341af34869ab8cd3568be&padID=emacsconf-2022
{"code":0,"message":"ok","data":null}
:end:
** TODO Set etherpad_database_password and etherpad_api_key using the vault or the command-line

ansible-playbook .... --extra-vars prod-vars.yml