bugzilla2fedmsg SOP updated

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan 2024-07-12 14:41:16 +01:00
parent 8a82b94423
commit d34d5e053c
No known key found for this signature in database
GPG key ID: A5893AB6474AC37D
3 changed files with 33 additions and 37 deletions

View file

@ -12,60 +12,55 @@ Owner::
Contact::
#fedora-apps, #fedora-fedmsg, #fedora-admin, #fedora-noc
Servers::
bugzilla2fedmsg01
STG/PROD Openshift Clusters
Purpose::
Rebroadcast bugzilla events on our bus.
== Description
bugzilla2fedmsg is a small service running as the 'moksha-hub' process
which receives events from bugzilla via the RH "unified messagebus" and
rebroadcasts them to our fedmsg bus.
bugzilla2fedmsg is a small service running as a container in Openshift in the `bugzilla2fedmsg` project which receives events from bugzilla via the RH "unified messagebus" and rebroadcasts them to our fedmsg bus.
[NOTE]
====
Unlike _all_ of our other fedmsg services, this one runs as the
'moksha-hub' process and not as the 'fedmsg-hub'.
====
== Resources
The bugzilla2fedmsg package provides a plugin to the moksha-hub that
connects out over the STOMP protocol to a 'fabric' of JBOSS activemq
FUSE brokers living in the Red Hat DMZ. We authenticate with a cert/key
pair that is kept in _/etc/pki/fedmsg/_. Those brokers should push
bugzilla events over STOMP to our moksha-hub daemon. When a message
arrives, we query bugzilla about the change to get some 'more
interesting' data to stuff in our payload, then we sign the message
using a fedmsg cert and fire it off to the rest of our bus.
This service has no database, no memcached usage. It depends on those
STOMP brokers and being able to query bugzilla.rh.com.
== Relevant Files
All managed by ansible, of course:
....
STOMP config: /etc/moksha/production.ini
fedmsg config: /etc/fedmsg.d/
certs: /etc/pki/fedmsg
code: /usr/lib/python2.7/site-packages/bugzilla2fedmsg.py
....
- [1] Ansible Playbook: https://pagure.io/fedora-infra/ansible/blob/main/f/playbooks/openshift-apps/bugzilla2fedmsg.yml
- [2] Ansible Role: https://pagure.io/fedora-infra/ansible/blob/main/f/roles/openshift-apps/bugzilla2fedmsg
- [3] Code: https://github.com/fedora-infra/bugzilla2fedmsg
== Useful Commands
To look at logs, run:
To look at logs, first authenticate with Openshift. Login to the console, and then retrieve a token. At the top right of the webconsole, click `copy login command`.
eg:
....
$ journalctl -u moksha-hub -f
# Login with the token
oc login --token=sha256~_XXXXXXXXXXX --server=https://api.ocp.stg.fedoraproject.org:6443
# Switch to the bugzilla2fedmsg project
oc project bugzilla2fedmsg
Now using project "bugzilla2fedmsg" on server "https://api.ocp.stg.fedoraproject.org:6443".
# Retrieve a list of pods running in the project
oc get pods
NAME READY STATUS RESTARTS AGE
bugzilla2fedmsg-32-58px2 1/1 Running 0 43h
# Retrieve the logs from the bugzilla2fedmsg-32-58px2 pod
oc logs -f bugzilla2fedmsg-32-58px2
....
To restart the service, run:
....
$ systemctl restart moksha-hub
# List the deploymentconfigs in the bugzilla2fedmsg project
oc get dc
NAME REVISION DESIRED CURRENT TRIGGERED BY
bugzilla2fedmsg 32 1 1 config,image(bugzilla2fedmsg:latest)
# Start a rollout of the deploymentconfig
oc rollout start bugzilla2fedmsg
....
== Internal Contacts
If we need to contact someone from the RH internal "unified messagebus"
team, search for "unified messagebus" in source.
If we need to contact someone from the RH internal "unified messagebus" team, search for "unified messagebus" in source.