Make ZNC bouncer for buildbot.python.org IRC connection an ActualThing™️
zware opened this issue · 0 comments
It's currently set up on the buildbot host outside of Salt, running as the buildbot
user. It's listening on port 6667 (no SSL) and connected to irc.libera.chat 6697 (SSL) with the admin user set up using the same username and password as the Libera.Chat account. I followed the guides at https://wiki.znc.in/ZNC and https://wiki.znc.in/Sasl#Example to get set up. Here's roughly the sequence of events:
$ sudo apt install znc irssi # irssi used to finish setup
$ sudo -u buildbot znc --makeconf
[ .. ] Checking for list of available modules...
[ >> ] ok
[ ** ]
[ ** ] -- Global settings --
[ ** ]
[ ?? ] Listen on port (1025 to 65534): 6667
[ !! ] WARNING: Some web browsers reject port 6667. If you intend to
[ !! ] use ZNC's web interface, you might want to use another port.
[ ?? ] Proceed with port 6667 anyway? (yes/no) [yes]: yes
[ ?? ] Listen using SSL (yes/no) [yes]: no
[ ?? ] Listen using both IPv4 and IPv6 (yes/no) [yes]: no
[ .. ] Verifying the listener...
[ ** ] Enabled global modules [webadmin]
[ ** ]
[ ** ] -- Admin user settings --
[ ** ]
[ ?? ] Username (alphanumeric): cpython-buildbot
[ ?? ] Enter password:
[ ?? ] Confirm password:
[ ?? ] Nick [cpython-buildbot]:
[ ?? ] Alternate nick [cpython-buildbot_]:
[ ?? ] Ident [cpython-buildbot]:
[ ?? ] Real name [Got ZNC?]: CPython Buildbot
[ ?? ] Bind host (optional):
[ ** ] Enabled user modules [chansaver, controlpanel]
[ ** ]
[ ?? ] Set up a network? (yes/no) [yes]:
[ ** ]
[ ** ] -- Network settings --
[ ** ]
[ ?? ] Name [freenode]: liberachat
[ ?? ] Server host (host only): irc.libera.chat
[ ?? ] Server uses SSL? (yes/no) [no]: yes
[ ?? ] Server port (1 to 65535) [6697]:
[ ?? ] Server password (probably empty):
[ ?? ] Initial channels: #python-dev-notifs
...
$ irssi
/connect localhost 6667
/quote PASS cpython-buildbot <password>
/query *status
loadmod sasl
/query *sasl
mechanism external plain
set cpython-buildbot <password>
At this point, ZNC was able to connect to Libera.Chat, and buildbot was able to connect to ZNC by setting irc_host: localhost
in settings.yaml
. ZNC configuration can be found at /srv/buildbot/.znc/configs/znc.conf
and /srv/buildbot/.znc/users/cpython-bulidbot/networks/liberachat/moddata/sasl/.registry
.
Things can probably be set up rather better than what I threw together, but this hopefully at least documents what I did :)
/cc @ewdurbin