Start the work on putting pagure.io to fedora-messaging

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon
2020-02-05 10:52:45 +01:00
parent 40e13bcbf0
commit bc8a114455
3 changed files with 75 additions and 0 deletions

View File

@@ -194,6 +194,59 @@
tags:
- pagure
# setup fedora-messaging
- name: install fedora-messaging as a dependency
package: name={{ item }} state=present
with_items:
- python2-fedora-messaging
tags:
- pagure
- fedora-messaging
- name: create the config folder for fedora-messaging
file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory
tags:
- pagure
- fedora-messaging
- name: install the configuration file for fedora-messaging
template:
src=fedora-messaging.toml
dest=/etc/fedora-messaging/config.toml
tags:
- pagure
- fedora-messaging
- name: create folder where we'll place the certs
file: path=/etc/pki/rabbitmq/pagurecert/ owner=root group=root mode=0755 state=directory
tags:
- pagure
- fedora-messaging
- name: deploy pagure/rabbitmq certificate
copy: src={{ item.src }}
dest=/etc/pki/rabbitmq/pagurecert/{{ item.dest }}
owner={{ item.owner }} group={{ item.group}} mode={{ item.mode }}
with_items:
- src: "{{private}}/files/rabbitmq/{{env}}/pki/issued/pagure{{ env_suffix }}.crt"
dest: pagure.crt
owner: pagure
group: pagure
mode: "444"
- src: "{{private}}/files/rabbitmq/{{env}}/pki/private/pagure{{ env_suffix }}.key"
dest: pagure.key
owner: pagure
group: pagure
mode: "440"
- src: "{{private}}/files/rabbitmq/{{env}}/pki/ca.crt"
dest: pagure.ca
owner: pagure
group: pagure
mode: "444"
tags:
- pagure
- fedora-messaging
# Set-up Pagure

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/pki/rabbitmq/pagurecert/pagure.ca"
keyfile = "/etc/pki/rabbitmq/pagurecert/pagure.key"
certfile = "/etc/pki/rabbitmq/pagurecert/pagure.crt"
[client_properties]
app = "pagure.io"

View File

@@ -325,6 +325,7 @@ MEDIUM_CELERY_QUEUE = 'medium_workers'
SLOW_CELERY_QUEUE = 'slow_workers'
PRIVATE_PROJECTS = False
FEDMSG_NOTIFICATIONS = True
FEDORA_MESSAGING_NOTIFICATIONS = True
THEME = 'pagureio'
MIRROR_SSHKEYS_FOLDER='/srv/mirror/ssh'