resultsdb: install and configure the new ci-resultsdb-listener in staging - step #1
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
768023c909
commit
51786d8c72
2 changed files with 61 additions and 10 deletions
|
@ -30,11 +30,33 @@
|
||||||
when: deployment_type == "prod" }
|
when: deployment_type == "prod" }
|
||||||
- apache
|
- apache
|
||||||
- { role: fedmsg/base,
|
- { role: fedmsg/base,
|
||||||
when: deployment_type != "dev" }
|
when: deployment_type == "prod" }
|
||||||
- { role: dnf-automatic, tags: ['dnfautomatic'] }
|
- { role: dnf-automatic, tags: ['dnfautomatic'] }
|
||||||
# Set up for fedora-messaging
|
# Set up for fedora-messaging
|
||||||
- { role: rabbit/user,
|
- { role: rabbit/user,
|
||||||
username: "resultsdb{{ env_suffix }}"}
|
username: "resultsdb{{ env_suffix }}"}
|
||||||
|
- role: rabbit/queue
|
||||||
|
username: "resultsdb{{ env_suffix }}"
|
||||||
|
queue_name: "resultsdb{{ env_suffix }}_ci_listener"
|
||||||
|
routing_keys:
|
||||||
|
- "org.centos.prod.ci.pipeline.allpackages-build.complete"
|
||||||
|
- "org.centos.prod.ci.pipeline.allpackages-build.image.complete"
|
||||||
|
- "org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete"
|
||||||
|
- "org.centos.prod.ci.pipeline.allpackages-build.package.complete"
|
||||||
|
- "org.centos.prod.ci.pipeline.allpackages-build.package.ignored"
|
||||||
|
- "org.centos.prod.ci.koji-build.test.queued"
|
||||||
|
- "org.centos.prod.ci.koji-build.test.running"
|
||||||
|
- "org.centos.prod.ci.koji-build.test.complete"
|
||||||
|
- "org.centos.prod.ci.koji-build.test.error"
|
||||||
|
write_queues:
|
||||||
|
- "ci"
|
||||||
|
- "openqa"
|
||||||
|
vars:
|
||||||
|
# yes, even the staging scheduler listens to production, it
|
||||||
|
# has to or else it wouldn't schedule any jobs
|
||||||
|
env: "production"
|
||||||
|
env_suffix: ""
|
||||||
|
tags: ['rabbit']
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# this is how you include other task lists
|
# this is how you include other task lists
|
||||||
|
@ -78,5 +100,5 @@
|
||||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- { role: rdbsync, tags: ['rdbsync']}
|
- { role: rdbsync, tags: ['rdbsync'], when: deployment_type == "prod" }
|
||||||
- { role: ci_resultsdb, tags: ['ci_resultsdb'], when: deployment_type == "stg" }
|
- { role: ci_resultsdb, tags: ['ci_resultsdb'], when: deployment_type == "stg" }
|
||||||
|
|
|
@ -5,12 +5,16 @@
|
||||||
- python-ci-resultsdb-listener
|
- python-ci-resultsdb-listener
|
||||||
- libsemanage-python
|
- libsemanage-python
|
||||||
- rdbsync
|
- rdbsync
|
||||||
|
when:
|
||||||
|
- inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
||||||
|
|
||||||
- name: Create /etc/pki/fedmsg/
|
- name: Create /etc/pki/fedmsg/
|
||||||
file: name=/etc/pki/fedmsg
|
file: name=/etc/pki/fedmsg
|
||||||
state=directory
|
state=directory
|
||||||
recurse=yes
|
recurse=yes
|
||||||
owner=root group=root
|
owner=root group=root
|
||||||
|
when:
|
||||||
|
- inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
@ -21,6 +25,8 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
|
when:
|
||||||
|
- inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
@ -38,19 +44,19 @@
|
||||||
owner=root group=root mode=0644
|
owner=root group=root mode=0644
|
||||||
with_items:
|
with_items:
|
||||||
- { file: listener.cfg, location: /etc/ci-resultsdb-listener/ }
|
- { file: listener.cfg, location: /etc/ci-resultsdb-listener/ }
|
||||||
- { file: endpoints.py, location: /etc/fedmsg.d/,
|
- { file: endpoints.py, location: /etc/fedmsg.d/ }
|
||||||
when: inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
- { file: ci-resultsdb-listener.py, location: /etc/fedmsg.d/ }
|
||||||
- { file: ci-resultsdb-listener.py, location: /etc/fedmsg.d/,
|
- { file: settings.py, location: /etc/resultsdb/ }
|
||||||
when: inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
- { file: cert.conf, location: /etc/httpd/conf.d/ }
|
||||||
- { file: settings.py, location: /etc/resultsdb/,
|
when:
|
||||||
when: inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
- inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org"
|
||||||
- { file: cert.conf, location: /etc/httpd/conf.d/,
|
|
||||||
when: inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
|
||||||
notify:
|
notify:
|
||||||
- reload httpd
|
- reload httpd
|
||||||
|
|
||||||
- name: Start and enable the fedmsg-hub service
|
- name: Start and enable the fedmsg-hub service
|
||||||
service: name={{ item }} enabled=yes state=started
|
service: name={{ item }} enabled=yes state=started
|
||||||
|
when:
|
||||||
|
- inventory_hostname != "resultsdb-stg01.qa.fedoraproject.org" }
|
||||||
with_items:
|
with_items:
|
||||||
- fedmsg-hub
|
- fedmsg-hub
|
||||||
|
|
||||||
|
@ -81,3 +87,26 @@
|
||||||
- config
|
- config
|
||||||
- certbot
|
- certbot
|
||||||
|
|
||||||
|
|
||||||
|
- name: install ci_resultsdb's
|
||||||
|
package: name={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- python-ci-resultsdb-listener
|
||||||
|
when: deployment_type == "stg"
|
||||||
|
|
||||||
|
- name: generate ci-resultsdb config files and override default resultsdb settings
|
||||||
|
template: src={{ item.file }}
|
||||||
|
dest={{ item.location }}/{{ item.file }}
|
||||||
|
owner=root group=root mode=0644
|
||||||
|
with_items:
|
||||||
|
- { file: listener.cfg, location: /etc/ci-resultsdb-listener/}
|
||||||
|
- { file: config.toml, location: /etc/fedora-messaging/}
|
||||||
|
when:
|
||||||
|
- inventory_hostname == "resultsdb-stg01.qa.fedoraproject.org"
|
||||||
|
|
||||||
|
- name: Start and enable the fedora-messaging service
|
||||||
|
service: name={{ item }} enabled=yes state=started
|
||||||
|
with_items:
|
||||||
|
- fm-consumer@config.service
|
||||||
|
when:
|
||||||
|
- inventory_hostname == "resultsdb-stg01.qa.fedoraproject.org" }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue