diff --git a/playbooks/openshift-apps/messaging-bridges.yml b/playbooks/openshift-apps/messaging-bridges.yml index e4fe0962e7..519e03937a 100644 --- a/playbooks/openshift-apps/messaging-bridges.yml +++ b/playbooks/openshift-apps/messaging-bridges.yml @@ -1,3 +1,59 @@ +# Create the RabbitMQ users + +tasks: + hosts: rabbitmq-stg[0] + user: root + gather_facts: False + + tasks: + - name: Create the RabbitMQ user + rabbitmq_user: + user: messaging-bridges + vhost: /pubsub + read_priv: .* + write_priv: .* + tags: + - config + - name: Create the RabbitMQ exchanges + rabbitmq_exchange: + name: "{{item}}" + exchange_type: topic + vhost: /pubsub + with_items: + - amq.topic + - zmq.topic + tags: + - config + - name: Create the RabbitMQ queues + rabbitmq_queue: + name: "{{item}}" + vhost: /pubsub + with_items: + - amqp_to_zmq + - amqp_bridge_verify_missing + tags: + - config + - name: Create the amqp-to-zmq bindings + rabbitmq_binding: + source: amq.topic + destination: amqp_to_zmq + vhost: /pubsub + tags: + - config + - name: Create the verify-missing bindings + rabbitmq_binding: + source: "{{item}}" + destination: amqp_bridge_verify_missing + vhost: /pubsub + with_items: + - amq.topic + - zmq.topic + tags: + - config + + +# Now create the app + - name: make the app be real hosts: os-masters-stg[0] user: root diff --git a/roles/openshift-apps/messaging-bridges/templates/configmap.yml b/roles/openshift-apps/messaging-bridges/templates/configmap.yml index ba2e4d9a87..dc8b2e8186 100644 --- a/roles/openshift-apps/messaging-bridges/templates/configmap.yml +++ b/roles/openshift-apps/messaging-bridges/templates/configmap.yml @@ -7,7 +7,7 @@ metadata: app: messaging-bridges data: config.toml: |- - amqp_url = "amqps://rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org" + amqp_url = "amqps://messaging-bridges@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/pubsub" publish_exchange = "amq.topic" [tls] @@ -43,7 +43,7 @@ data: level = "WARNING" handlers = ["console"] amqp-to-zmq.toml: |- - amqp_url = "amqps://rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org" + amqp_url = "amqps://messaging-bridges@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/pubsub" publish_exchange = "amq.topic" [[bindings]] diff --git a/roles/rabbitmq_cluster/tasks/main.yml b/roles/rabbitmq_cluster/tasks/main.yml index 1781eb2c48..7a3936f796 100644 --- a/roles/rabbitmq_cluster/tasks/main.yml +++ b/roles/rabbitmq_cluster/tasks/main.yml @@ -99,7 +99,7 @@ tags: - rabbitmq_cluster -- name: Nope. No standard users. Even if we user TLS auth +- name: Nope. No standard users. Even if we use TLS auth rabbitmq_user: user=guest state=absent tags: - rabbitmq_cluster