diff --git a/roles/abrt/faf/defaults/main.yml b/roles/abrt/faf/defaults/main.yml index 9796bfb83b..a9b2bbec64 100644 --- a/roles/abrt/faf/defaults/main.yml +++ b/roles/abrt/faf/defaults/main.yml @@ -128,6 +128,9 @@ faf_web_throttle_burst: 1 # fedora-messaging config # ############################## faf_fedmsg_server: +# 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. +faf_fedmsg_topic_prefix: # [TLS] faf_fedmsg_ca_cert: diff --git a/roles/abrt/faf/templates/etc-fedora-messaging-config.toml.j2 b/roles/abrt/faf/templates/etc-fedora-messaging-config.toml.j2 index 3845e5a132..b905439cd3 100644 --- a/roles/abrt/faf/templates/etc-fedora-messaging-config.toml.j2 +++ b/roles/abrt/faf/templates/etc-fedora-messaging-config.toml.j2 @@ -7,6 +7,10 @@ amqp_url = "amqp://{{ faf_fedmsg_server }}?connection_attempts=3&retry_delay=5" passive_declares = true +# 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. +topic_prefix = {{ faf_fedmsg_topic_prefix }} + [tls] ca_cert = {{ faf_fedmsg_ca_cert }} keyfile = {{ faf_fedmsg_keyfile }} diff --git a/roles/batcave/templates/batcave-messaging.toml b/roles/batcave/templates/batcave-messaging.toml index 91f43960f0..6eb69d6bf4 100644 --- a/roles/batcave/templates/batcave-messaging.toml +++ b/roles/batcave/templates/batcave-messaging.toml @@ -5,6 +5,14 @@ # Broker address amqp_url = "amqps://batcave{{ 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/batcave.ca" keyfile = "/etc/pki/rabbitmq/batcave.key" diff --git a/roles/distgit/pagure/templates/fedora-messaging.toml b/roles/distgit/pagure/templates/fedora-messaging.toml index 1384a0f106..13afc00ea2 100644 --- a/roles/distgit/pagure/templates/fedora-messaging.toml +++ b/roles/distgit/pagure/templates/fedora-messaging.toml @@ -3,6 +3,14 @@ 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/src.fp.o.ca" keyfile = "/etc/pki/rabbitmq/pagurecert/src.fp.o.key" diff --git a/roles/koji_hub/templates/fedora-messaging.toml b/roles/koji_hub/templates/fedora-messaging.toml index 275f6adf3a..39802eebf8 100644 --- a/roles/koji_hub/templates/fedora-messaging.toml +++ b/roles/koji_hub/templates/fedora-messaging.toml @@ -3,6 +3,14 @@ amqp_url = "amqps://koji{{ 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/kojicert/koji.ca" {% if koji_instance == "secondary" %} diff --git a/roles/messaging/base/templates/messaging.toml.j2 b/roles/messaging/base/templates/messaging.toml.j2 index 1ef6b07ee2..56c75e3f76 100644 --- a/roles/messaging/base/templates/messaging.toml.j2 +++ b/roles/messaging/base/templates/messaging.toml.j2 @@ -1,5 +1,13 @@ amqp_url = "amqps://{{ msg_username }}{{ 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/{{ msg_username }}/ca.crt" keyfile = "/etc/pki/rabbitmq/{{ msg_username }}/{{ msg_username }}.key" diff --git a/roles/openshift-apps/badges/templates/fm-fedbadges.toml b/roles/openshift-apps/badges/templates/fm-fedbadges.toml index 098bf3c476..7135fd3bc5 100644 --- a/roles/openshift-apps/badges/templates/fm-fedbadges.toml +++ b/roles/openshift-apps/badges/templates/fm-fedbadges.toml @@ -6,6 +6,14 @@ amqp_url = "amqps://fedbadges{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedorapr callback = "fedbadges.consumer:FedoraBadgesConsumer" passive_declares = true +# 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/fedora-messaging/ca/cacert.pem" certfile = "/etc/pki/fedora-messaging/crt/fedbadges-cert.pem" diff --git a/roles/openshift-apps/badges/templates/fm-tahrir.toml b/roles/openshift-apps/badges/templates/fm-tahrir.toml index 6781a4b450..af468c2a38 100644 --- a/roles/openshift-apps/badges/templates/fm-tahrir.toml +++ b/roles/openshift-apps/badges/templates/fm-tahrir.toml @@ -5,6 +5,14 @@ amqp_url = "amqps://tahrir{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub" passive_declares = true +# 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/fedora-messaging/ca/cacert.pem" certfile = "/etc/pki/fedora-messaging/crt/tahrir-cert.pem" diff --git a/roles/openshift-apps/datanommer/templates/fedora-messaging-config.toml b/roles/openshift-apps/datanommer/templates/fedora-messaging-config.toml index 5edb075e8c..3be159cc72 100644 --- a/roles/openshift-apps/datanommer/templates/fedora-messaging-config.toml +++ b/roles/openshift-apps/datanommer/templates/fedora-messaging-config.toml @@ -3,6 +3,14 @@ amqp_url = "amqps://datanommer:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpu # Just check if the queue exist, don't try to create it (the server does not allow it). passive_declares = true +# 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/fedora-messaging/cacert.pem" keyfile = "/etc/pki/fedora-messaging/datanommer-key.pem" diff --git a/roles/openshift-apps/elections/templates/fedora-messaging.toml b/roles/openshift-apps/elections/templates/fedora-messaging.toml index 31d3ccee16..a1b2562a92 100644 --- a/roles/openshift-apps/elections/templates/fedora-messaging.toml +++ b/roles/openshift-apps/elections/templates/fedora-messaging.toml @@ -5,6 +5,14 @@ # Broker address amqp_url = "amqps://elections{{ 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/ca/elections.ca" keyfile = "/etc/pki/rabbitmq/key/elections.key" diff --git a/roles/openshift-apps/fedocal/templates/fedora-messaging.toml b/roles/openshift-apps/fedocal/templates/fedora-messaging.toml index 50fb3df9c0..c662676f78 100644 --- a/roles/openshift-apps/fedocal/templates/fedora-messaging.toml +++ b/roles/openshift-apps/fedocal/templates/fedora-messaging.toml @@ -5,6 +5,14 @@ # Broker address amqp_url = "amqps://fedocal{{ 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/ca/fedocal.ca" keyfile = "/etc/pki/rabbitmq/key/fedocal.key" diff --git a/roles/openshift-apps/fmn/templates/api.toml b/roles/openshift-apps/fmn/templates/api.toml index b27356f125..79da4108a5 100644 --- a/roles/openshift-apps/fmn/templates/api.toml +++ b/roles/openshift-apps/fmn/templates/api.toml @@ -5,6 +5,14 @@ amqp_url = "amqps://fmn{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub" passive_declares = true +# 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/fedora-messaging/ca/cacert.pem" certfile = "/etc/pki/fedora-messaging/crt/fmn-cert.pem" diff --git a/roles/openshift-apps/greenwave/templates/config.toml b/roles/openshift-apps/greenwave/templates/config.toml index 023ed3dc4e..ad9500dcb1 100644 --- a/roles/openshift-apps/greenwave/templates/config.toml +++ b/roles/openshift-apps/greenwave/templates/config.toml @@ -4,6 +4,12 @@ amqp_url = "amqps://greenwave{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub" +{% if env == "staging" %} +topic_prefix = "org.fedoraproject.stg" +{% else %} +topic_prefix = "org.fedoraproject.prod" +{% endif %} + publish_exchange = "amq.topic" passive_declares = true diff --git a/roles/openshift-apps/kerneltest/templates/fedora-messaging.toml b/roles/openshift-apps/kerneltest/templates/fedora-messaging.toml index d6b82f83e8..2779b6a1aa 100644 --- a/roles/openshift-apps/kerneltest/templates/fedora-messaging.toml +++ b/roles/openshift-apps/kerneltest/templates/fedora-messaging.toml @@ -3,6 +3,14 @@ amqp_url = "amqps://kerneltest{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedorap # Just check if the queue exist, don't try to create it (the server does not allow it). passive_declares = true +# 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/fedora-messaging/cacert.pem" keyfile = "/etc/pki/fedora-messaging/kerneltest-key.pem" diff --git a/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 b/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 index 2bfb471dbf..cc73dd455e 100644 --- a/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 +++ b/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 @@ -1,4 +1,5 @@ amqp_url = "amqps://koschei{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub" +topic_prefix = "org.fedoraproject.{{ fedmsg_env }}" passive_declares = true [tls] diff --git a/roles/openshift-apps/mirrormanager/templates/fedora-messaging.toml b/roles/openshift-apps/mirrormanager/templates/fedora-messaging.toml index 94e3be3737..8dc09dc375 100644 --- a/roles/openshift-apps/mirrormanager/templates/fedora-messaging.toml +++ b/roles/openshift-apps/mirrormanager/templates/fedora-messaging.toml @@ -3,6 +3,14 @@ amqp_url = "amqps://mirrormanager{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedo # Just check if the queue exist, don't try to create it (the server does not allow it). passive_declares = true +# 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/fedora-messaging/ca/cacert.pem" keyfile = "/etc/pki/fedora-messaging/key/key.pem" diff --git a/roles/openshift-apps/noggin/templates/fedora-messaging.toml b/roles/openshift-apps/noggin/templates/fedora-messaging.toml index 1f09f614b5..e1c9313743 100644 --- a/roles/openshift-apps/noggin/templates/fedora-messaging.toml +++ b/roles/openshift-apps/noggin/templates/fedora-messaging.toml @@ -3,6 +3,14 @@ amqp_url = "amqps://noggin:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub # Just check if the queue exist, don't try to create it (the server does not allow it). passive_declares = true +# 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/fedora-messaging/cacert.pem" keyfile = "/etc/pki/fedora-messaging/noggin-key.pem" diff --git a/roles/openshift-apps/poddlers/templates/fedora-messaging.toml b/roles/openshift-apps/poddlers/templates/fedora-messaging.toml index 7e2d5f1a39..d18ce527a9 100644 --- a/roles/openshift-apps/poddlers/templates/fedora-messaging.toml +++ b/roles/openshift-apps/poddlers/templates/fedora-messaging.toml @@ -9,6 +9,14 @@ callback = "toddlers.plugins.{{ toddler.callback }}" # to (this is done in the ansible playbook) passive_declares = true +# 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/ca/toddlers.ca" keyfile = "/etc/pki/rabbitmq/key/toddlers.key" diff --git a/roles/openshift-apps/webhook2fedmsg/templates/fedora-messaging.toml.j2 b/roles/openshift-apps/webhook2fedmsg/templates/fedora-messaging.toml.j2 index da695fa583..2c1acfe5bd 100644 --- a/roles/openshift-apps/webhook2fedmsg/templates/fedora-messaging.toml.j2 +++ b/roles/openshift-apps/webhook2fedmsg/templates/fedora-messaging.toml.j2 @@ -3,6 +3,14 @@ amqp_url = "amqps://webhook2fedmsg{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fed # Just check if the queue exist, don't try to create it (the server does not allow it). passive_declares = true +# 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/fedora-messaging/cacert.pem" keyfile = "/etc/pki/fedora-messaging/webhook2fedmsg-key.pem" diff --git a/roles/pagure/templates/fedora-messaging.toml b/roles/pagure/templates/fedora-messaging.toml index 6cae6cf50f..8ea2d394c7 100644 --- a/roles/pagure/templates/fedora-messaging.toml +++ b/roles/pagure/templates/fedora-messaging.toml @@ -7,6 +7,13 @@ amqp_url = "amqps://pagure.stg:@rabbitmq.stg.fedoraproject.org/%2Fpubsub" amqp_url = "amqps://pagure:@rabbitmq.fedoraproject.org/%2Fpubsub" {% endif %} +# 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 == "pagure-staging" %} +topic_prefix = "io.pagure.stg" +{% else %} +topic_prefix = "io.pagure.prod" +{% endif %} publish_exchange = "amq.topic" diff --git a/roles/supybot/templates/fedora-messaging.toml.j2 b/roles/supybot/templates/fedora-messaging.toml.j2 index ed2fdc663f..7f2fdf90fc 100644 --- a/roles/supybot/templates/fedora-messaging.toml.j2 +++ b/roles/supybot/templates/fedora-messaging.toml.j2 @@ -3,6 +3,14 @@ amqp_url = "amqps://{{ botname }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2 # Just check if the queue exist, don't try to create it (the server does not allow it). passive_declares = true +# 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/fedora-messaging/rabbitmq-ca.crt" keyfile = "/etc/pki/fedora-messaging/{{ botname }}.key"