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 * Wiki ** Ikiwiki *** Docker Creating: ansible-playbook -i docker-inventory.yml docker-playbook.yml --tags wiki Reusing: ansible-playbook -i docker-inventory.yml docker-reuse-playbook.yml --tags wiki http://localhost:28080/ ** Publishing *** Prod To run the playbook and publish the main schedule: ansible-playbook -i inventory.yml prod-playbook.yml --tags publish Update a specific talk's before/nav and the main schedule: (ex: wayland) ansible-playbook playbook.yml -e '{"slug": "wayland"}' -i inventory.yml --tags publish Force-publish the schedule: ansible-playbook -i inventory.yml prod-playbook.yml --tags publish -e force_publish=true *** Docker Creating: ansible-playbook -i docker-inventory.yml docker-playbook.yml --tags wiki,publish Reusing: ansible-playbook -i docker-inventory.yml docker-reuse-playbook.yml --tags publish 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,proxy To fall back to wikimedia rewrite: ansible-playbook -i inventory.yml prod-playbook.yml --tags proxy -e "use_wikimedia=true" You can still access pads directly with direct/p like this: http://pad.emacsconf.org/direct/p/2022-journalism To undo wikimedia rewrite: ansible-playbook -i inventory.yml prod-playbook.yml --tags proxy -e "use_wikimedia=false" ** 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: ** Useful https://github.com/systemli/ansible-role-etherpad https://gist.github.com/aaronpk/7307172