Use fedora-messaging for ODCS.

This commit is contained in:
Jan Kaluža 2019-10-23 09:22:54 +00:00 committed by Pierre-Yves Chibon
parent f7c53a386e
commit f0a24a152b
3 changed files with 60 additions and 3 deletions

View file

@ -19,7 +19,7 @@ odcs_pungi_parent_runroot_tag: f27-build
odcs_pungi_parent_runroot_arch: x86_64
odcs_pungi_runroot_target_dir: /mnt/koji/compose/odcs
odcs_pungi_runroot_target_dir_url: http://kojipkgs.fedoraproject.org/compose/odcs
odcs_messaging_backend: fedmsg
odcs_messaging_backend: fedora-messaging
odcs_messaging_certificate: "/THIS/FILE/PROBABLY/DOESNT/EXIST"
odcs_messaging_private_key: "/THIS/FILE/PROBABLY/DOESNT/EXIST"
odcs_messaging_broker_urls: []

View file

@ -185,6 +185,18 @@
- odcs
- odcs/frontend
- name: copy the odcs-celery-beat.service file.
template:
src: "fedora-messaging.toml.j2"
dest: /etc/fedora-messaging/config.toml
owner: odcs
group: fedmsg
mode: 0640
tags:
- odcs
- odcs/frontend
- odcs/backend
- name: enable ODCS beat (odcs-celery-beat)
systemd:
name: odcs-celery-beat
@ -220,7 +232,7 @@
- odcs
- odcs/backend
- name: copy the odcs rabbitmq crt.
- name: copy the odcs rabbitmq private queue crt.
copy:
src: "{{private}}/files/rabbitmq/{{env}}/pki/issued/odcs-private-queue{{env_suffix}}.crt"
dest: /etc/odcs/odcs-private-queue.crt
@ -232,7 +244,7 @@
- odcs/backend
- odcs/frontend
- name: copy the odcs rabbitmq key.
- name: copy the odcs rabbitmq private queue key.
copy:
src: "{{private}}/files/rabbitmq/{{env}}/pki/private/odcs-private-queue{{env_suffix}}.key"
dest: /etc/odcs/odcs-private-queue.key
@ -244,6 +256,30 @@
- odcs/backend
- odcs/frontend
- name: copy the odcs rabbitmq crt.
copy:
src: "{{private}}/files/rabbitmq/{{env}}/pki/issued/odcs{{env_suffix}}.crt"
dest: /etc/odcs/odcs-rabbitmq.crt
owner: odcs
group: fedmsg
mode: 0640
tags:
- odcs
- odcs/backend
- odcs/frontend
- name: copy the odcs rabbitmq key.
copy:
src: "{{private}}/files/rabbitmq/{{env}}/pki/private/odcs-{{env_suffix}}.key"
dest: /etc/odcs/odcs-rabbitmq.key
owner: odcs
group: fedmsg
mode: 0640
tags:
- odcs
- odcs/backend
- odcs/frontendi
- name: copy the odcs rabbitmq CA cert.
copy:
src: "{{private}}/files/rabbitmq/{{env}}/pki/ca.crt"

View file

@ -0,0 +1,21 @@
# A sample configuration for fedora-messaging. This file is in the TOML format.
# For complete details on all configuration options, see the documentation.
amqp_url = "amqps://pagure{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub"
# The topic_prefix configuration value will add a prefix to the topics of every sent message.
# This is used for migrating from fedmsg, and should not be used afterwards.
{% if env == "staging" %}
topic_prefix = "org.fedoraproject.stg"
{% else %}
topic_prefix = "org.fedoraproject.prod"
{% endif %}
[tls]
ca_cert = "/etc/odcs/ca.crt"
keyfile = "/etc/odcs/odcs-rabbitmq.key"
certfile = "/etc/odcs/odcs-rabbitmq.crt"
[client_properties]
app = "odcs"