Drop all autocloudreporter stuff

autocloud is dead. We don't need this any more. I'll decommission
the bits from the hosts manually.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-12-10 14:26:04 -08:00 committed by Pierre-Yves Chibon
parent 1b36cbff59
commit 0dd848d945
9 changed files with 3 additions and 333 deletions

View file

@ -1,2 +0,0 @@
autocloudreporter_env_suffix:
autocloudreporter_amqp_resultsdburl: http://resultsdb01.qa.fedoraproject.org/resultsdb_api/api/v2.0/

View file

@ -1,18 +0,0 @@
# we need this for our fedora-messaging consumer as it is not allowed
# to create queues on the infra AMQP broker, by broker config
autocloudreporter_amqp_passive: true
# fedora-messaging autocloudreporter settings: most of these are the same
# for prod and stg as they both must listen for prod messages. Only
# the queue names differs
autocloudreporter_amqp_url: "amqps://openqa:@rabbitmq.fedoraproject.org/%2Fpubsub"
autocloudreporter_amqp_cacert: /etc/fedora-messaging/cacert.pem
autocloudreporter_amqp_key: /etc/pki/fedora-messaging/openqa-key.pem
autocloudreporter_amqp_cert: /etc/pki/fedora-messaging/openqa-cert.pem
autocloudreporter_amqp_queue: "openqa_autocloudreporter{{ autocloudreporter_env_suffix }}"
autocloudreporter_amqp_routing_keys: ["org.fedoraproject.prod.autocloud.image.failed",
"org.fedoraproject.prod.autocloud.image.success"]
# fedora-messaging email error reporting settings
autocloudreporter_amqp_mailto: ["adamwill@fedoraproject.org", "lruzicka@fedoraproject.org"]
autocloudreporter_amqp_smtp: bastion

View file

@ -1,2 +0,0 @@
autocloudreporter_env_suffix: .stg
autocloudreporter_amqp_resultsdburl: http://resultsdb-stg01.qa.fedoraproject.org/resultsdb_api/api/v2.0/

View file

@ -605,20 +605,6 @@ openqa01.qa.fedoraproject.org
[checkcompose_stg]
openqa-stg01.qa.fedoraproject.org
[autocloudreporter_common]
openqa01.qa.fedoraproject.org
openqa-stg01.qa.fedoraproject.org
# This group should only ever contain *ONE* system
# It should probably be autocloud itself, but I dunno if that box
# is authorized for ResultsDB currently
[autocloudreporter]
openqa01.qa.fedoraproject.org
# Also should only ever contain *ONE* system
[autocloudreporter_stg]
openqa-stg01.qa.fedoraproject.org
[resultsdb:children]
resultsdb_dev
resultsdb_stg

View file

@ -120,24 +120,6 @@
env_suffix: ""
tags: ['rabbit']
# autocloudreporter queue, we still use openqa auth for this as it's
# easy that way
- role: rabbit/queue
username: "openqa"
queue_name: "openqa_autocloudreporter{{ autocloudreporter_env_suffix }}"
routing_keys:
- "org.fedoraproject.prod.autocloud.image.failed"
- "org.fedoraproject.prod.autocloud.image.success"
write_queues:
- "ci"
- "openqa"
vars:
# yes, even the staging reporter listens to production, the
# staging autocloud has been inactive since 2017 so there are
# no results to forward...
env: "production"
env_suffix: ""
tags: ['rabbit']
# check-compose queue, we still use openqa auth for this as it's
# easy that way
- role: rabbit/queue
@ -211,10 +193,9 @@
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
# relvalconsumer and autocloudreporter aren't particularly related
# to openQA in any way, we just put those role on these boxes. There's
# nowhere more obviously correct for rvc and acr should be on an
# Autocloud box but I don't know if they're authed for RDB.
# relvalconsumer isn't particularly related to openQA in any way, we
# just put that role on these boxes. There's nowhere more obviously
# correct for it, really.
roles:
- { role: openqa/server, tags: ['openqa_server'] }
- { role: openqa/dispatcher, tags: ['openqa_dispatcher'] }
@ -222,7 +203,6 @@
- { role: fedmsg/base, tags: ['fedmsg_base', 'fedmsg'] }
- { role: fedmsg/hub, tags: ['fedmsg_hub', 'fedmsg'] }
- { role: relvalconsumer, tags: ['relvalconsumer'] }
- { role: autocloudreporter, tags: ['autocloudreporter'] }
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"

View file

@ -1,10 +0,0 @@
autocloudreporter_prod: false
autocloudreporter_amqp_passive: false
autocloudreporter_amqp_url: "amqps://fedora:@rabbitmq.fedoraproject.org/%2Fpublic_pubsub"
autocloudreporter_amqp_cacert: /etc/fedora-messaging/cacert.pem
autocloudreporter_amqp_key: /etc/fedora-messaging/fedora-key.pem
autocloudreporter_amqp_cert: /etc/fedora-messaging/fedora-cert.pem
autocloudreporter_amqp_routing_keys: ["org.fedoraproject.prod.autocloud.image.failed",
"org.fedoraproject.prod.autocloud.image.success"]
autocloudreporter_amqp_mailfrom: "root@{{ external_hostname }}"
autocloudreporter_amqp_smtp: localhost

View file

@ -1,5 +0,0 @@
# Restart handler for our fedora-messaging consumer
- name: Conditionally restart autocloudreporter consumer service
command: /usr/local/bin/conditional-restart.sh fm-consumer@autocloudreporter
listen:
- restart autocloudreporter

View file

@ -1,145 +0,0 @@
# This role reports Autocloud results to ResultsDB. There should
# always be exactly one host in infra with this role set up and
# autocloudreporter_prod set to True, so all results are reported
# once.
#
# Required vars
# - wikitcms_token
## string - a token file to install for unattended wiki editing
# using openidc auth
# - autocloudreporter_amqp_queue
## string - Message queue name for the consumer. To use the
## fedora-messaging scheduler with public authentication
## on the Fedora production AMQP broker (which is what
## you'd typically want), you only need to set this.
## This should be a unique and private string; the
## official recommendation is to use a random UUID
## generated by uuidgen.
# - autocloudreporter_amqp_resultsdburl
## string - API URL of the ResultsDB instance to report results to.
#
# Required vars with defaults
# - autocloudreporter_amqp_passive
## bool - If true, passive_declares will be set true in all the
## fedora-messaging consumer configuration files. This
## is needed for private authentication on the Fedora
## brokers.
## default - False
# - autocloudreporter_amqp_url
## string - AMQP broker URL for fedora-messaging autocloud reporter.
## The role default for this is the Fedora production
## broker with the shared 'fedora' username.
# - autocloudreporter_amqp_cacert
## string - CA certificate file to use for authenticating with
## AMQP broker for fedora-messaging autocloud reporter.
## The role default for this is the CA cert file for the
## Fedora production broker.
# - autocloudreporter_amqp_cert
## string - Certificate file to use for authenticating with AMQP
## broker for fedora-messaging autocloud reporter. The role
## default for this is the certificate file for the
## public 'fedora' account on the Fedora production
## broker.
# - autocloudreporter_amqp_key
## string - Private key file to use for authenticating with AMQP
## broker for fedora-messaging autocloud reporter. The role
## default for this is the key file for the public
## 'fedora' account on the Fedora production broker.
# - autocloudreporter_amqp_routing_keys
## list - List of routing key names for the fedora-messaging
## scheduler to subscribe to. The role default for this
## is the appropriate keys for the Fedora production
## broker.
# - autocloudreporter_amqp_mailfrom
## string - From email address for error report emails. Defaults
## to "root@{{ external_hostname }}". Only relevant if
## autocloudreporter_amqp_mailto is set.
# - autocloudreporter_amqp_smtp
## string - Hostname of SMTP server to use for sending error
## emails. Defaults to 'localhost'. Only relevant if
## autocloudreporter_amqp_mailto is set.
#
# Optional vars
# - autocloudreporter_amqp_mailto
## list - List of email addresses to email errors to. If set,
## the email log handler will be configured.
- name: Install required packages
package:
name: ['fedora-messaging', 'python3-fedfind', 'python3-resultsdb_api',
'python3-resultsdb_conventions-fedora', 'python3-setuptools']
state: present
tags:
- packages
- name: Check out autocloudreporter
git:
repo: https://pagure.io/fedora-qa/autocloudreporter.git
dest: /root/autocloudreporter
register: gitacr
- name: Install autocloudreporter
command: "python3 setup.py install --nodeps"
args:
chdir: /root/autocloudreporter
when: "gitacr is changed"
notify:
- restart autocloudreporter
- name: Create /etc/pki/fedora-messaging
file:
dest: /etc/pki/fedora-messaging
mode: 0775
owner: root
group: root
state: directory
when: "deployment_type is defined"
tags:
- config
# We always use the openQA production cert and key here for now; we
# don't really need a separate identity for autocloudreporter. We don't
# use the staging identity as even staging autocloudreporter listens on
# the prod bus.
- name: Deploy the Fedora infra fedora-messaging cert (openQA production)
copy:
src: "{{ private }}/files/rabbitmq/production/pki/issued/openqa.crt"
dest: /etc/pki/fedora-messaging/openqa-cert.pem
mode: 0644
owner: root
group: root
when: "deployment_type is defined"
tags:
- config
# This is kinda icky, as there's no intrinsic reason the group geekotest
# should exist so far as this role is concerned. But as we run this role
# on the same box as openQA, in fact we need to keep the ownership in
# line. This needs making cleaner somehow.
- name: Deploy the Fedora infra fedora-messaging key (openQA production)
copy:
src: "{{ private }}/files/rabbitmq/production/pki/private/openqa.key"
dest: /etc/pki/fedora-messaging/openqa-key.pem
mode: 0640
owner: root
group: geekotest
when: "deployment_type is defined"
tags:
- config
- name: Configure fedora-messaging autocloudreporter
template: src=autocloudreporter.toml.j2 dest=/etc/fedora-messaging/autocloudreporter.toml owner=root group=root mode=0640
notify:
- restart autocloudreporter
tags:
- config
- name: Wipe the old fedmsg consumer config file
file: path=/etc/fedmsg.d/autocloudreporter.py state=absent
notify:
- restart fedmsg-hub
tags:
- config
- name: Enable and start fedora-messaging autocloudreporter
service: name=fm-consumer@autocloudreporter enabled=yes state=started

View file

@ -1,114 +0,0 @@
# fedora-messaging consumer configuration file for autocloudreporter.
# See autocloudreporter main.yml comments for details on the variables
# that must be set here.
#
# This file is in the TOML format.
amqp_url = "{{ autocloudreporter_amqp_url }}"
{% if autocloudreporter_amqp_passive|bool %}
passive_declares = true
{% endif %}
callback = "autocloudreporter:AutocloudReporter"
[tls]
ca_cert = "{{ autocloudreporter_amqp_cacert }}"
keyfile = "{{ autocloudreporter_amqp_key }}"
certfile = "{{ autocloudreporter_amqp_cert }}"
[client_properties]
app = "Autocloud ResultsDB result forwarder"
app_url = "https://pagure.io/fedora-qa/autocloudreporter"
app_contacts_email = ["adamwill@fedoraproject.org", "lruzicka@redhat.com", "qa-devel@lists.fedoraproject.org"]
[exchanges."amq.topic"]
type = "topic"
durable = true
auto_delete = false
arguments = {}
[queues."{{ autocloudreporter_amqp_queue }}"]
durable = false
auto_delete = true
exclusive = true
arguments = {}
[[bindings]]
queue = "{{ autocloudreporter_amqp_queue }}"
exchange = "amq.topic"
routing_keys = [{% for key in autocloudreporter_amqp_routing_keys %}"{{ key }}",{% endfor %}]
# need this to receive messages from ZMQ->AMQP bridge
[[bindings]]
queue = "{{ autocloudreporter_amqp_queue }}"
exchange = "zmq.topic"
routing_keys = [{% for key in autocloudreporter_amqp_routing_keys %}"{{ key }}",{% endfor %}]
[consumer_config]
autocloud_url = "https://apps.fedoraproject.org/autocloud"
resultsdb_url = "{{ autocloudreporter_amqp_resultsdburl }}"
[qos]
prefetch_size = 0
prefetch_count = 25
[log_config]
version = 1
disable_existing_loggers = true
[log_config.formatters.simple]
format = "[%(levelname)s %(name)s] %(message)s"
[log_config.handlers.console]
class = "logging.StreamHandler"
formatter = "simple"
stream = "ext://sys.stdout"
{% if autocloudreporter_amqp_mailto is defined %}
[log_config.handlers.email]
class = "logging.handlers.SMTPHandler"
formatter = "simple"
level = "ERROR"
mailhost = "{{ autocloudreporter_amqp_smtp }}"
fromaddr = "{{ autocloudreporter_amqp_mailfrom }}"
toaddrs = [{% for key in autocloudreporter_amqp_mailto %}"{{ key }}",{% endfor %}]
subject = "autocloudreporter error"
{% endif %}
[log_config.loggers.AutocloudReporter]
level = "INFO"
propagate = false
{% if autocloudreporter_amqp_mailto is defined %}
handlers = ["console", "email"]
{% else %}
handlers = ["console"]
{% endif %}
[log_config.loggers.fedora_messaging]
level = "INFO"
propagate = false
{% if autocloudreporter_amqp_mailto is defined %}
handlers = ["console", "email"]
{% else %}
handlers = ["console"]
{% endif %}
[log_config.loggers.twisted]
level = "INFO"
propagate = false
{% if autocloudreporter_amqp_mailto is defined %}
handlers = ["console", "email"]
{% else %}
handlers = ["console"]
{% endif %}
[log_config.loggers.pika]
level = "WARNING"
propagate = false
handlers = ["console"]
[log_config.root]
level = "ERROR"
{% if autocloudreporter_amqp_mailto is defined %}
handlers = ["console", "email"]
{% else %}
handlers = ["console"]
{% endif %}