summaryrefslogblamecommitdiffstats
path: root/README.org
blob: 1e7945f8501787610a7e42f6f9fec89da108e329 (plain) (tree)
1
2
3
4
5
6
7
8

                                                                      
 

                                                   
                                                         
                                                         
 


                                                  
                                                   

                                                                        
                                                                       

         
                                                              
 
        
                                                                    


                                                                                      

                                                              

         
                                                                       
 
                              
                                                                             
 


                                       
             
                                                                                     














                                                                 
 









                                                                                                                                       
                                                                                               
 
                                                
This repository contains infrastructure-as-code ansible configurations
for various pieces of the EmacsConf infrastructure.

ansible-galaxy collection install community.general

Production: needs prod-vars.yml, see prod-vars.yml.sample
Docker: needs docker-vars.yml, see docker-vars.yml.sample

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

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

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

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

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

Creating pads
ansible-playbook -i docker-inventory.yml docker-reuse-playbook.yml --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