From 6d1743c83e239806b1b6fb635e184a59a5f28f5a Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Tue, 11 Oct 2022 12:19:46 -0400 Subject: Etherpad starting setup --- README.org | 58 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 13 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index b49bd3f..0b3c622 100644 --- a/README.org +++ b/README.org @@ -1,23 +1,55 @@ This repository contains infrastructure-as-code ansible configurations for various pieces of the EmacsConf infrastructure. -To run the playbook: -ansible-playbook -i inventory.yaml playbook.yaml +* 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 -/etc/ansible/hosts: +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 -#+begin_example -[emacsconf-web] -front0.emacsconf.org -#+end_example +Reusing an existing container: +ansible-playbook -i docker-inventory.yaml docker-reuse-playbook.yaml --tags pad -~/.ssh/config +Connecting: +docker exec -it emacsconf-pad /bin/bash + + +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: -#+begin_example -Host front0.emacsconf.org - Hostname front0.emacsconf.org - User orga -#+end_example -- cgit v1.2.3