grrrit-wm
grrrit-wm is an IRC bot that listens to events from Gerrit and reports them on various IRC channels; it replaces gerrit-wm.
Which repo changes report to which channels can be configured in config.yaml
[1]; it defaults to #wikimedia-dev, see mw:MediaWiki on IRC.
Running it
It runs in a Docker container in our new Kubernetes cluster.
Config changes
To add more repo -> channel mappings, edit config.yaml
. The repo names can be matched using regexen. The tool needs to be restarted on SGE for the changes to take effect - see the deploying and restarting sections for more.
Building/Deploying
Building
(requires ~1GB of drive space and takes ~20 mins for the first time)
- install docker!
- sudo docker login
- git clone the repo
- sudo docker build -t yuvipanda/grrrit .
- sudo docker push yuvipanda/grrrit
Deploying
- ssh tools-k8s-master-01.tools.eqiad.wmflabs
- sudo su yuvipanda
- kubectl --user=lolrrit-wm --namespace=lolrrit-wm get pods
- kubectl --user=lolrrit-wm --namespace=lolrrit-wm delete pods/grrrit-fhlw7
- hopefully that works?
Stopping
Stopping the pod is not enough -- the replicationcontroller will start a new one.
$ kubectl --user=lolrrit-wm --namespace=lolrrit-wm get replicationcontrollers
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS AGE
grrrit grrrit yuvipanda/grrrit:latest tool=grrrit 1 34d
$ kubectl --user=lolrrit-wm --namespace=lolrrit-wm stop replicationcontroller grrrit
replicationcontroller "grrrit" deleted
$ kubectl --user=lolrrit-wm --namespace=lolrrit-wm get pods
NAME READY STATUS RESTARTS AGE
grrrit-u0w8r 1/1 Terminating 0 2m
Code
The code is hosted on Gerrit, under labs/tools/grrrit-wm
[2].
Tool Labs era
It was built to run on Tool Labs
Logs
There are somewhat comprehensive logs in the `~/logs` folder on toollabs.
Access
The project under Toollabs is called lolrrit-wm
. As of now the following people have access:
- YuviPanda
- ^demon
- AzaToth
- Ryan Lane
- ori-l
- MZMcBride
- RoanKattouw
- MarkTraceur
- legoktm
- aude
- PiRSquared17
- MatmaRex
- Krenair
- James_F
Any of these people can restart the service if need be.