retrace: rebase to latest upstream role
This commit is contained in:
parent
9dcb77ff41
commit
c61de8c739
20 changed files with 115 additions and 99 deletions
3
roles/abrt/faf/.ansible-lint
Normal file
3
roles/abrt/faf/.ansible-lint
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# We have a task explicitly for updating all FAF packages.
|
||||||
|
skip_list:
|
||||||
|
- 403
|
23
roles/abrt/faf/.github/workflows/ansible-lint.yml
vendored
Normal file
23
roles/abrt/faf/.github/workflows/ansible-lint.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
name: Check Ansible Role
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
# The GitHub-hosted runners don’t do Fedora
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# This can be pinned to a specific tag after something newer than v4.1.0.post0 materializes.
|
||||||
|
# https://github.com/ansible/ansible-lint-action/commit/91db49755c0e720d9eac9d3a481c227d3d14faf6
|
||||||
|
- name: Lint
|
||||||
|
uses: ansible/ansible-lint-action@master
|
||||||
|
with:
|
||||||
|
targets: ./
|
|
@ -57,7 +57,7 @@ smtp_server: localhost
|
||||||
smtp_port: 25
|
smtp_port: 25
|
||||||
smtp_username:
|
smtp_username:
|
||||||
smtp_password:
|
smtp_password:
|
||||||
faf_from: no-reply-retrace@fedoraproject.org
|
faf_from: no-reply@localhost
|
||||||
|
|
||||||
# [uREPORT]
|
# [uREPORT]
|
||||||
faf_spool_dir: /var/spool/faf
|
faf_spool_dir: /var/spool/faf
|
||||||
|
@ -110,8 +110,6 @@ faf_web_openid: true
|
||||||
faf_web_openid_privileged_teams:
|
faf_web_openid_privileged_teams:
|
||||||
# provenpackager,proventesters
|
# provenpackager,proventesters
|
||||||
|
|
||||||
# [DUMPDIR]
|
|
||||||
|
|
||||||
# [CACHE]
|
# [CACHE]
|
||||||
# cache type either: memcached/simple/none
|
# cache type either: memcached/simple/none
|
||||||
faf_web_cache_type: memcached
|
faf_web_cache_type: memcached
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
install_date: Tue Jan 21 10:21:03 2020
|
install_date: Fri Mar 20 14:14:25 2020
|
||||||
version: master
|
version: master
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: "ABRT team"
|
author: "ABRT team"
|
||||||
|
description: Deploy FAF
|
||||||
company: Red Hat
|
company: Red Hat
|
||||||
license: BSD
|
license: BSD
|
||||||
min_ansible_version: 2.5
|
min_ansible_version: 2.5
|
||||||
|
@ -10,9 +11,8 @@ galaxy_info:
|
||||||
- 8
|
- 8
|
||||||
- name: Fedora
|
- name: Fedora
|
||||||
versions:
|
versions:
|
||||||
|
- 29
|
||||||
- 30
|
- 30
|
||||||
- 31
|
galaxy_tags:
|
||||||
- 32
|
|
||||||
categories:
|
|
||||||
- web
|
- web
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
|
@ -2,14 +2,25 @@
|
||||||
|
|
||||||
# check backend functionality
|
# check backend functionality
|
||||||
|
|
||||||
- name: faf
|
- name: Add dummy Fedora 42 release
|
||||||
shell: faf {{ item }}
|
command: faf releaseadd -o fedora --opsys-release 42
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
loop:
|
changed_when: false
|
||||||
- "releaseadd -o fedora --opsys-release 42"
|
|
||||||
- "releaselist | grep 'Fedora 42'"
|
- name: Get releases from FAF
|
||||||
- "compadd -o fedora --opsys-release 42 meta_faf"
|
command: faf releaselist
|
||||||
|
become: yes
|
||||||
|
become_user: faf
|
||||||
|
register: release_list
|
||||||
|
failed_when: "'Fedora 42' not in release_list.stdout"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Add dummy meta_faf component to Fedora 42 release
|
||||||
|
command: faf compadd -o fedora --opsys-release 42 meta_faf
|
||||||
|
become: yes
|
||||||
|
become_user: faf
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: cpf
|
- name: cpf
|
||||||
copy:
|
copy:
|
||||||
|
@ -19,9 +30,11 @@
|
||||||
group: faf
|
group: faf
|
||||||
|
|
||||||
- name: faf
|
- name: faf
|
||||||
shell: faf {{ item }}
|
command: faf {{ item }}
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
loop:
|
loop:
|
||||||
- "save-reports -v"
|
- "save-reports -v"
|
||||||
- "create-problems -v"
|
- "create-problems -v"
|
||||||
|
# This task is 100% idempotent, no questions asked.
|
||||||
|
changed_when: false
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
# check web functionality
|
# check web functionality
|
||||||
#
|
#
|
||||||
- set_fact:
|
- name: Set URL facts
|
||||||
|
set_fact:
|
||||||
main_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}"
|
main_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}"
|
||||||
problems_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}/problems/"
|
problems_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}/problems/"
|
||||||
|
|
||||||
|
@ -13,10 +14,7 @@
|
||||||
register: uri_res
|
register: uri_res
|
||||||
check_mode: no
|
check_mode: no
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
failed_when: "'ABRT' not in uri_res.content"
|
||||||
- fail: msg="{{ main_url }} doesn't contain 'ABRT' string"
|
|
||||||
when:
|
|
||||||
"'ABRT' not in uri_res.content"
|
|
||||||
|
|
||||||
- name: fetch problems
|
- name: fetch problems
|
||||||
uri:
|
uri:
|
||||||
|
@ -26,7 +24,4 @@
|
||||||
register: uri_res
|
register: uri_res
|
||||||
check_mode: no
|
check_mode: no
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
failed_when: "'State' not in uri_res.content"
|
||||||
- fail: msg="{{ main_url }} doesn't contain 'State' string"
|
|
||||||
when:
|
|
||||||
"'State' not in uri_res.content"
|
|
||||||
|
|
|
@ -4,14 +4,17 @@
|
||||||
loop: "{{ eol_opsys | selectattr('opsys') | selectattr('release') | list }}"
|
loop: "{{ eol_opsys | selectattr('opsys') | selectattr('release') | list }}"
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: remove EOLed packages
|
- name: remove EOLed packages
|
||||||
command: faf cleanup-packages "{{ item.opsys | capitalize }}" "{{ item.release }}"
|
command: faf cleanup-packages "{{ item.opsys | capitalize }}" "{{ item.release }}"
|
||||||
loop: "{{ eol_opsys | selectattr('opsys') | selectattr('release') | list }}"
|
loop: "{{ eol_opsys | selectattr('opsys') | selectattr('release') | list }}"
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: remove unassigned packages
|
- name: remove unassigned packages
|
||||||
command: faf cleanup-unassigned -f
|
command: faf cleanup-unassigned -f
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
|
changed_when: false
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
dest: /etc/faf/faf.conf
|
dest: /etc/faf/faf.conf
|
||||||
|
|
||||||
# setup fedora-messaging
|
# setup fedora-messaging
|
||||||
- name: Setup fedora-messaging
|
|
||||||
block:
|
|
||||||
- name: create the config folder for fedora-messaging
|
- name: create the config folder for fedora-messaging
|
||||||
file:
|
file:
|
||||||
path: /etc/fedora-messaging/
|
path: /etc/fedora-messaging/
|
||||||
|
@ -15,42 +13,10 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
state: directory
|
state: directory
|
||||||
|
when: faf_with_fedmsg|bool
|
||||||
- name: create folders where we place certs for fedora-messaging
|
|
||||||
file:
|
|
||||||
path: /etc/fedora-messaging/faf
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0755
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: install certs for fedora-messaging
|
|
||||||
copy:
|
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "/etc/fedora-messaging/faf/{{ item.dest }}"
|
|
||||||
owner: "{{ item.owner }}"
|
|
||||||
group: root
|
|
||||||
mode: "{{ item.mode }}"
|
|
||||||
loop:
|
|
||||||
- { src: "{{private}}/files/rabbitmq/{{env}}/pki/ca.crt",
|
|
||||||
dest: "ca.crt",
|
|
||||||
owner: faf,
|
|
||||||
mode: 0644
|
|
||||||
}
|
|
||||||
- { src: "{{private}}/files/rabbitmq/{{env}}/pki/private/faf.key",
|
|
||||||
dest: "faf.key",
|
|
||||||
owner: faf,
|
|
||||||
mode: "600"
|
|
||||||
}
|
|
||||||
- { src: "{{private}}/files/rabbitmq/{{env}}/pki/issued/faf.crt",
|
|
||||||
dest: "faf.crt",
|
|
||||||
owner: faf,
|
|
||||||
mode: 0644
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: provide configuration for fedora-messaging
|
- name: provide configuration for fedora-messaging
|
||||||
template:
|
template:
|
||||||
src: etc-fedora-messaging-config.toml.j2
|
src: etc-fedora-messaging-config.toml.j2
|
||||||
dest: /etc/fedora-messaging/config.toml
|
dest: /etc/fedora-messaging/config.toml
|
||||||
|
|
||||||
when: faf_with_fedmsg|bool
|
when: faf_with_fedmsg|bool
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
cron:
|
cron:
|
||||||
name: "retrace symbols with type {{ item.type }}"
|
name: "retrace symbols with type {{ item.type }}"
|
||||||
user: faf
|
user: faf
|
||||||
job: "faf retrace --workers 12 -dp {{ item.type }} --max-fail-count 1 >> /var/log/faf/retrace-{{ item.type }}.log 2>&1"
|
job: "faf retrace --workers 4 -dp {{ item.type }} --max-fail-count 1 >> /var/log/faf/retrace-{{ item.type }}.log 2>&1"
|
||||||
minute: "32"
|
minute: "32"
|
||||||
hour: "2"
|
hour: "2"
|
||||||
weekday: "{{ item.day }}"
|
weekday: "{{ item.day }}"
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
command: faf-migrate-db
|
command: faf-migrate-db
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
|
changed_when: false
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
|
||||||
- set_fact:
|
- name: Set url_suffix fact
|
||||||
|
set_fact:
|
||||||
url_suffix: ""
|
url_suffix: ""
|
||||||
when: faf_web_on_root|bool
|
when: faf_web_on_root|bool
|
||||||
|
|
||||||
- set_fact:
|
- name: Set url_suffix fact
|
||||||
|
set_fact:
|
||||||
url_suffix: "/faf"
|
url_suffix: "/faf"
|
||||||
when: not faf_web_on_root|bool
|
when: not faf_web_on_root|bool
|
||||||
|
|
||||||
|
@ -12,7 +14,8 @@
|
||||||
name: "{{ faf_web_packages }}"
|
name: "{{ faf_web_packages }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- import_tasks: celery.yml
|
- name: Import Celery tasks
|
||||||
|
import_tasks: celery.yml
|
||||||
when: faf_with_celery|bool
|
when: faf_with_celery|bool
|
||||||
|
|
||||||
- name: install faf web symboltransfer packages
|
- name: install faf web symboltransfer packages
|
||||||
|
|
|
@ -33,12 +33,6 @@ enabled = {{ faf_web_openid }}
|
||||||
privileged_teams = {{ faf_web_openid_privileged_teams }}
|
privileged_teams = {{ faf_web_openid_privileged_teams }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
[DumpDir]
|
|
||||||
CacheDirectory = {{ faf_spool_dir }}/dumpdirs
|
|
||||||
CacheDirectoryCountQuota = 100
|
|
||||||
CacheDirectorySizeQuota = 107374182400
|
|
||||||
MaxDumpDirSize = 1073741824
|
|
||||||
|
|
||||||
[cache]
|
[cache]
|
||||||
#types:
|
#types:
|
||||||
# null - no caching
|
# null - no caching
|
||||||
|
|
|
@ -3,22 +3,18 @@
|
||||||
# A sample configuration for fedora-messaging. This file is in the TOML format.
|
# A sample configuration for fedora-messaging. This file is in the TOML format.
|
||||||
# For complete details on all configuration options, see the documentation.
|
# For complete details on all configuration options, see the documentation.
|
||||||
|
|
||||||
amqp_url = "amqps://faf:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub"
|
amqp_url = "amqp://{{ faf_fedmsg_server }}?connection_attempts=3&retry_delay=5"
|
||||||
|
|
||||||
passive_declares = true
|
passive_declares = true
|
||||||
|
|
||||||
# The topic_prefix configuration value will add a prefix to the topics of every sent message.
|
# 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.
|
# This is used for migrating from fedmsg, and should not be used afterwards.
|
||||||
{% if env == "staging" %}
|
topic_prefix = {{ faf_fedmsg_topic_prefix }}
|
||||||
topic_prefix = "org.fedoraproject.stg"
|
|
||||||
{% else %}
|
|
||||||
topic_prefix = "org.fedoraproject.prod"
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
[tls]
|
[tls]
|
||||||
ca_cert = "/etc/fedora-messaging/faf/ca.crt"
|
ca_cert = {{ faf_fedmsg_ca_cert }}
|
||||||
keyfile = "/etc/fedora-messaging/faf/faf.key"
|
keyfile = {{ faf_fedmsg_keyfile }}
|
||||||
certfile = "/etc/fedora-messaging/faf/faf.crt"
|
certfile = {{ faf_fedmsg_certfile }}
|
||||||
|
|
||||||
[client_properties]
|
[client_properties]
|
||||||
app = "FAF"
|
app = "FAF"
|
||||||
|
|
|
@ -4,7 +4,7 @@ WSGIPythonOptimize 1
|
||||||
WSGISocketPrefix {{ faf_spool_dir }}/wsgi
|
WSGISocketPrefix {{ faf_spool_dir }}/wsgi
|
||||||
WSGIDaemonProcess faf user=faf group=faf processes=3 threads=5
|
WSGIDaemonProcess faf user=faf group=faf processes=3 threads=5
|
||||||
|
|
||||||
{% set python = 'python3.6' %}
|
{% set python = 'python3.7' %}
|
||||||
|
|
||||||
WSGIScriptAlias /{{ url_suffix }} /usr/lib/{{ python }}/site-packages/webfaf/hub.wsgi process-group=faf application-group=%{GLOBAL}
|
WSGIScriptAlias /{{ url_suffix }} /usr/lib/{{ python }}/site-packages/webfaf/hub.wsgi process-group=faf application-group=%{GLOBAL}
|
||||||
|
|
||||||
|
|
21
roles/abrt/retrace/.github/workflows/ansible-lint.yml
vendored
Normal file
21
roles/abrt/retrace/.github/workflows/ansible-lint.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
name: Check Ansible Role
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
# The GitHub-hosted runners don’t do Fedora
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
uses: ansible/ansible-lint-action@master
|
||||||
|
with:
|
||||||
|
targets: ./
|
|
@ -1,2 +1,2 @@
|
||||||
install_date: Tue Jan 21 10:21:04 2020
|
install_date: Fri Mar 20 14:14:27 2020
|
||||||
version: master
|
version: master
|
||||||
|
|
|
@ -10,10 +10,10 @@ galaxy_info:
|
||||||
- 7
|
- 7
|
||||||
- name: Fedora
|
- name: Fedora
|
||||||
versions:
|
versions:
|
||||||
- 30
|
- 26
|
||||||
- 31
|
- 27
|
||||||
- 32
|
- 28
|
||||||
categories:
|
galaxy_tags:
|
||||||
- system
|
- system
|
||||||
#dependencies:
|
#dependencies:
|
||||||
# - { role: httpd }
|
# - { role: httpd }
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
- set_fact:
|
- name: Set settings_url fact
|
||||||
|
set_fact:
|
||||||
settings_url: "https://{{ ansible_default_ipv4.address }}/settings"
|
settings_url: "https://{{ ansible_default_ipv4.address }}/settings"
|
||||||
|
|
||||||
- name: fetch settings
|
- name: fetch settings
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
check_mode: no
|
check_mode: no
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- fail: msg="{{ settings_url }} doesn't contain supported_releases"
|
- name: Fail if /settings does not contain supported_releases
|
||||||
|
fail: msg="{{ settings_url }} doesn't contain supported_releases"
|
||||||
when:
|
when:
|
||||||
"'supported_releases' not in uri_res.content"
|
"'supported_releases' not in uri_res.content"
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#{{ ansible_managed }}
|
#{{ ansible_managed }}
|
||||||
|
|
||||||
ServerTokens ProductOnly
|
|
||||||
|
|
||||||
WSGISocketPrefix /var/run/retrace
|
WSGISocketPrefix /var/run/retrace
|
||||||
WSGIDaemonProcess retrace user=retrace group=retrace processes=5 threads=3
|
WSGIDaemonProcess retrace user=retrace group=retrace processes=5 threads=3
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue