summaryrefslogtreecommitdiffstats
path: root/README.org
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2026-10-31 21:57:14 -0400
committerSacha Chua <sacha@sachachua.com>2026-10-31 21:57:14 -0400
commit27ea83ca2faa5bf48b66fd01d1f63cb64b9881d9 (patch)
tree41e148f2dd4e0827395e7105d373e04408e78b34 /README.org
parent09d3baa20414c1a0db8972853c8f8aa499db3d46 (diff)
downloademacsconf-ansible-27ea83ca2faa5bf48b66fd01d1f63cb64b9881d9.tar.xz
emacsconf-ansible-27ea83ca2faa5bf48b66fd01d1f63cb64b9881d9.zip
note about specific Ansible version needed to deal with both 3.7 and 3.13
Diffstat (limited to 'README.org')
-rw-r--r--README.org139
1 files changed, 128 insertions, 11 deletions
diff --git a/README.org b/README.org
index 5282ff4..7ff9af3 100644
--- a/README.org
+++ b/README.org
@@ -6,7 +6,25 @@ 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
+
+* Ansible setup
+
+We have Python 3.7 on front/pad and Python 3.13 on res, so we need Ansible 2.14 and community.general 7.x.
+
+#+begin_src sh
+rm -rf .venv
+uv venv --python 3.11
+source .venv/bin/activate
+uv pip install "ansible-core>=2.14.0,<2.15.0"
+ansible-galaxy collection install "community.general:<8.0.0" --force
+ansible-galaxy collection install community.mysql --force
+ansible front,res -i inventory.yml -m ping
+#+end_src
+
* How to use this playbook
+:PROPERTIES:
+:CUSTOM_ID: how-to-use-this-playbook
+:END:
1. Install ansible on your local machine and check out this repo.
2. Copy the ansible_vars block from conf.org to prod-vars.yml in this repo (alongside inventory.yml), or set emacsconf-ansible-directory in Emacs and then use emacsconf-ansible-tangle-vars to tangle the file.
@@ -15,6 +33,8 @@ Docker: needs docker-vars.yml, see docker-vars.yml.sample
Debugging: add -v or -vv to the =ansible-playbook= command.
+Due to the older version of SSH installed on front0, you will need to add =LogLevel QUIET= to your =~/.ssh/config=.
+
* Setting up a vault
:PROPERTIES:
:CUSTOM_ID: vault
@@ -47,6 +67,9 @@ ansible-vault rekey $FILE --ask-vault-pass
#+end_src
* Processes
+:PROPERTIES:
+:CUSTOM_ID: processes
+:END:
At the start of the conference preparation period, change
=emacsconf-year= in [[file:group_vars/all.yml]]
@@ -54,8 +77,17 @@ At the start of the conference preparation period, change
To start a local copy of the wiki for testing, see [[#wiki-docker][Ikiwiki - Docker]].
* Wiki
+:PROPERTIES:
+:CUSTOM_ID: wiki
+:END:
** Ikiwiki
+:PROPERTIES:
+:CUSTOM_ID: wiki-ikiwiki
+:END:
*** Prod
+:PROPERTIES:
+:CUSTOM_ID: wiki-ikiwiki-prod
+:END:
When you update htmlscrubber.pm in wiki/templates or emacsconf.setup:
@@ -108,6 +140,9 @@ Stuck wiki:
ssh ikiwiki@localhost -p 2222 ikiwiki --setup /home/ikiwiki/emacsconf.setup -v
* Processing prerecs
+:PROPERTIES:
+:CUSTOM_ID: processing-prerecs
+:END:
1. Update =group_vars/all.yml=: set =emacsconf_year=.
2. In the conf.org file, call =M-x emacsconf-set-file-prefixes= to set the file prefixes. Tweak as needed.
@@ -122,29 +157,44 @@ Then call =process-prerec.sh $file=. It will launch some screen sessions for ree
* Setting up the backstage area
+:PROPERTIES:
+:CUSTOM_ID: setting-up-the-backstage-area
+:END:
-1. Doublecheck the host in [[file:inventory.yml]] and the variables in [[file:roles/media/defaults/main.yml]].
+1. Doublecheck the media host in [[file:inventory.yml]] and the variables in [[file:roles/media/defaults/main.yml]].
2. ansible-playbook -i inventory.yml prod-playbook.yml --tags media --ask-become-pass
(or =ansible-playbook -i inventory.yml prod-playbook.yml --tags media --ask-vault-pass= if you've [[#vault][stored it in a vault]])
3. Update the following variables in your Emacs configuration:
- emacsconf-backstage-dir
- emacsconf-backstage-phase
-4. Create ~/proj/emacsconf/{year}/cache
-5. elisp:emacsconf-publish-talks-json-to-files
-6. [[elisp:emacsconf-publish-backstage-index]]
-* Upload service
+4. [[elisp:(let ((dir (format "~/proj/emacsconf/%s/cache" emacsconf-year))) (unless (file-directory-p dir) (make-directory dir)))][(Run)]] Create ~/proj/emacsconf/{year}/cache on your local system.
+5. Copy over the include-in-index-footer.html and include-in-public-index.html templates from other years. (Backup: [[file:roles/media/templates/]]
+6. elisp:emacsconf-publish-talks-json-to-files
+7. [[elisp:emacsconf-publish-backstage-index]]
-=ansible-playbook -i inventory.yml prod-playbook.yml --tags upload --ask-become-pass=
-(or =ansible-playbook -i inventory.yml prod-playbook.yml --tags upload --ask-vault-pass= if you've [[#vault][stored it in a vault]])
+* Upload service
+:PROPERTIES:
+:CUSTOM_ID: upload-service
+:END:
-/ssh:media|sudo:upload@media:~upload
-/ssh:media|sudo::/etc/nginx/sites-available
+1. [ ] Check [[file:group_vars/all.yml]] to make sure emacsconf_year is set.
+2. [ ] =ansible-playbook -i inventory.yml prod-playbook.yml --tags upload --ask-become-pass= (or =ansible-playbook -i inventory.yml prod-playbook.yml --tags upload --ask-vault-pass= if you've [[#vault][stored it in a vault]], or =ansible-playbook -i inventory.yml prod-playbook.yml --tags upload= if the vault password is already in the environment variable =VAULT_PASSWORD=.)
+3. [ ] Upload a test file through https://upload.emacsconf.org/. The password is defined in the upload_password Ansible variable.
+4. [ ] Check that [[file:~/proj/emacsconf/emacsconf-ansible/README.org::#setting-up-the-backstage-area][the backstage area has been set up]]. Note that files are not automatically copied to the backstage area.
+5. [ ] Send speakers the e-mail about the upload service
+ - elisp:emacsconf-mail-upload-and-backstage-info-to-waiting-for-prerecs
+ - elisp:emacsconf-mail-upload-and-backstage-info if mailing individually
-sudo service upload start
+Other notes:
-Next step, check firewall
+- /ssh:media|sudo:upload@media:~upload
+- /ssh:media|sudo::/etc/nginx/sites-available
+- sudo service upload start
* Publishing
+:PROPERTIES:
+:CUSTOM_ID: publishing
+:END:
Goals:
- [X] Set up Emacs 28.2 or a newer one
@@ -162,6 +212,9 @@ Goals:
- [ ] Publish the prerec on the page
** Prod
+:PROPERTIES:
+:CUSTOM_ID: publishing-prod
+:END:
To run the playbook and publish the main schedule:
#+begin_src sh
@@ -179,7 +232,13 @@ ansible-playbook playbook.yml -e '{"slug": "wayland"}' -i inventory.yml --tags p
Force-publish the schedule:
ansible-playbook -i inventory.yml prod-playbook.yml --tags publish -e force_publish=true
** Development
+:PROPERTIES:
+:CUSTOM_ID: publishing-development
+:END:
** Docker
+:PROPERTIES:
+:CUSTOM_ID: publishing-docker
+:END:
Creating:
ansible-playbook -i docker-inventory.yml docker-playbook.yml --tags wiki,publish
@@ -189,10 +248,16 @@ ansible-playbook -i docker-inventory.yml docker-reuse-playbook.yml --tags publis
With docker:
https://stackoverflow.com/questions/24738264/how-to-test-ansible-playbook-using-docker
* Pad
+:PROPERTIES:
+:CUSTOM_ID: pad
+:END:
Before generating pads, use elisp:emacsconf-publish-talks-json-to-files to create the talks.json used.
** Production
+:PROPERTIES:
+:CUSTOM_ID: pad-production
+:END:
ansible-playbook -i inventory.yml prod-playbook.yml --tags pad,proxy
To fall back to wikimedia rewrite:
@@ -209,6 +274,9 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags pad --extra-vars='{"e
To create pads:
ansible-playbook -i inventory.yml prod-playbook.yml --tags create-pads
** Docker
+:PROPERTIES:
+:CUSTOM_ID: pad-docker
+:END:
Creating:
ansible-playbook -i docker-inventory.yml docker-playbook.yml --tags pad
@@ -247,16 +315,28 @@ curl http://localhost:9001/api/1/createPad?apikey=b7a15dc34cc7f6917cca6cd9a2b4b9
{"code":0,"message":"ok","data":null}
:end:
** Useful
+:PROPERTIES:
+:CUSTOM_ID: pad-useful
+:END:
https://github.com/systemli/ansible-role-etherpad
https://gist.github.com/aaronpk/7307172
* Pad proxy
+:PROPERTIES:
+:CUSTOM_ID: pad-proxy
+:END:
ansible-playbook -i inventory.yml prod-playbook.yml --tags proxy --extra-vars='{"use_wikimedia": false}'
ansible-playbook -i inventory.yml prod-playbook.yml --tags proxy --extra-vars='{"use_wikimedia": true}'
* Stream
+:PROPERTIES:
+:CUSTOM_ID: stream
+:END:
** Prod
+:PROPERTIES:
+:CUSTOM_ID: stream-prod
+:END:
Setting up icecast:
ansible-playbook -i inventory.yml prod-playbook.yml --tags stream
@@ -264,6 +344,9 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags stream
** Testing
+:PROPERTIES:
+:CUSTOM_ID: stream-testing
+:END:
Runs the ffmpeg command on res
@@ -277,11 +360,17 @@ Use a test pattern (don't know if this works)
ansible-playbook -i inventory.yml prod-playbook.yml --tags test -e icecast_test_track=dev -e icecast_test=pattern
** Creating the fallback files
+:PROPERTIES:
+:CUSTOM_ID: stream-creating-the-fallback-files
+:END:
ffmpeg -y -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -loop 1 -r 20 -t 10 -i sorry.png -c:v libvpx -c:a libvorbis -color_primaries 1 -color_trc 1 -colorspace 1 -crf 30 -g 120 -minrate 1.5M -b:v 1500 -g 120 -maxrate 1.5M -cluster_time_limit 5100 -shortest sorry.webm
ffmpeg -y -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -loop 1 -r 20 -t 10 -i sorry.png -vf scale=854:480 -c:v libvpx -c:a libvorbis -color_primaries 1 -color_trc 1 -colorspace 1 -crf 30 -g 120 -minrate 1.5M -b:v 1500 -g 120 -maxrate 1.5M -cluster_time_limit 5100 -shortest sorry-480p.webm
* OBS
+:PROPERTIES:
+:CUSTOM_ID: obs
+:END:
ansible-playbook -i inventory.yml prod-playbook.yml --tags obs
@@ -289,9 +378,18 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags obs
Resizing VNC after connection
xrandr -s 1280x720
** Firefox
+:PROPERTIES:
+:CUSTOM_ID: obs-firefox
+:END:
*** Firefox profiles like to be created in an X environment
+:PROPERTIES:
+:CUSTOM_ID: obs-firefox-firefox-profiles-like-to-be-created-in-an-x-environment
+:END:
firefox -no-remote -CreateProfile "{{ emacsconf_id }}-{{ item.item.id }}
*** Install Tampermonkey extension and scripts :manual:
+:PROPERTIES:
+:CUSTOM_ID: obs-firefox-install-tampermonkey-extension-and-scripts
+:END:
For each track:
@@ -314,15 +412,24 @@ For each track:
** How to update scenes from the gen copy
+:PROPERTIES:
+:CUSTOM_ID: obs-how-to-update-scenes-from-the-gen-copy
+:END:
ssh emacsconf-gen@res.emacsconf.org -p 46668 "cat ~/.config/obs-studio/basic/scenes/emacsconf.json" | jq 'walk(if type == "string" then gsub("emacsconf"; "{{ emacsconf_id }}") else . end)' > roles/obs/templates/scenes.json
ansible-playbook -i inventory.yml prod-playbook.yml --tags obs-scene
* Media
+:PROPERTIES:
+:CUSTOM_ID: media
+:END:
ansible-playbook -i inventory.yml prod-playbook.yml --tags media
* Captioning
+:PROPERTIES:
+:CUSTOM_ID: captioning
+:END:
Set up whisper:
@@ -334,12 +441,16 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags process-captions
ffmpeg -y -i handwritten/reencode.webm -t 60 -vcodec copy -acodec copy test.webm
* Other useful things
+:PROPERTIES:
+:CUSTOM_ID: other-useful-things
+:END:
nodemon -w . -e yml -x 'ansible-playbook -i inventory.yml prod-playbook.yml --tags vnc; true'
* Restreaming
:PROPERTIES:
:ID: 20251122T182719.845166
+:CUSTOM_ID: restreaming
:END:
Add something like this to your ~prod-vars.yml~:
@@ -386,8 +497,14 @@ This will set up scripts on the live0 server.
It doesn't get automatically started, so you'll also need to call ~screen -S restream-$SHIFT_ID-youtube~ and ~screen -S restream-$TRACK_ID-toobnix~.
* BBB
+:PROPERTIES:
+:CUSTOM_ID: bbb
+:END:
ansible-playbook -i inventory.yml prod-playbook.yml --tags bbb
* Local testing with vagrant
+:PROPERTIES:
+:CUSTOM_ID: local-testing-with-vagrant
+:END:
Rough notes on local testing