1
0
Fork 0
forked from infra/ansible

blockerbugs: add DEBUG env var for staging, remove legacy VM role

Set DEBUG=true for staging OpenShift deployment (both the main
Deployment and the sync CronJob) to enable debug logging.

Remove the entire roles/blockerbugs/ directory which was the old
VM-based deployment (Apache/WSGI). This role has been fully
superseded by roles/openshift-apps/blockerbugs/ and is not
referenced by any playbook.

Assisted-by: Claude Opus 4.6
This commit is contained in:
Jaroslav Groman 2026-05-28 13:43:46 +02:00 committed by Adam Williamson
commit 102149236d
6 changed files with 4 additions and 136 deletions

View file

@ -1,16 +0,0 @@
WSGIDaemonProcess blockerbugs user=apache group=apache threads=5
WSGIScriptAlias /blockerbugs /usr/share/blockerbugs/blockerbugs.wsgi
WSGISocketPrefix run/wsgi
# this isn't the best way to force SSL but it works for now
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
<Directory /usr/share/blockerbugs>
WSGIProcessGroup blockerbugs
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Order deny,allow
Require all granted
</Directory>

View file

@ -1,2 +0,0 @@
MAILTO="sysadmin-qa-members@fedoraproject.org"
*/30 * * * * blockerbugs chronic blockerbugs sync > /dev/null

View file

@ -1,79 +0,0 @@
---
- name: Install needed packages for blockerbugs
ansible.builtin.package: state=present name={{ item }}
with_items:
- libselinux-python3
- python3-mod_wsgi
- blockerbugs
# this is for chronic which helps get rid of excess cron emails
- moreutils
tags:
- packages
- blockerbugs
- name: Setup blockerbugs apache conf
ansible.builtin.copy: src=blockerbugs.conf dest=/etc/httpd/conf.d/blockerbugs.conf mode=644
notify:
- Reload httpd
tags:
- config
- httpd
- blockerbugs
- name: Ensure group `blockerbugs` exists
group:
name: blockerbugs
state: present
tags:
- blockerbugs
- config
- name: Create the `blockerbugs` user
user:
name: blockerbugs
group: blockerbugs
ansible.builtin.shell: /bin/nologin
home: /usr/share/blockerbugs
tags:
- blockerbugs
- config
- name: Setup blockerbugs app settings file
ansible.builtin.template: src=blockerbugs-settings.py.j2 dest=/etc/blockerbugs/settings.py mode=640
notify:
- Reload httpd
tags:
- config
- httpd
- blockerbugs
- name: Grant blockerbugs and apache read access to the settings file
acl: name=/etc/blockerbugs/settings.py entity={{ item }} etype=user permissions="r" state=present
with_items:
- blockerbugs
- apache
notify:
- Reload httpd
tags:
- config
- httpd
- blockerbugs
- name: Allow httpd to connect to network, enabling openid
seboolean: name=httpd_can_network_connect state=true persistent=true
tags:
- config
- blockerbugs
- name: Set sebooleans so blockerbugs can talk to the db
seboolean: name=httpd_can_network_connect_db state=true persistent=true
tags:
- config
- blockerbugs
- name: Setup blockerbugs cron (master node only)
ansible.builtin.copy: src=blockerbugs.cron dest=/etc/cron.d/blockerbugs
when: master_blockerbugs_node
tags:
- config
- blockerbugs

View file

@ -1,39 +0,0 @@
SECRET_KEY = '{{ blockerbugs_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ blockerbugs_db_user }}:{{ blockerbugs_db_password }}@{{ blockerbugs_db_host }}:{{ blockerbugs_db_port }}/{{ blockerbugs_db_name }}'
FAS_ADMIN_GROUP = "qa-admin"
FAS_USER = "{{ blockerbugs_fas_user }}@fedoraproject.org"
FAS_PASSWORD = "{{ blockerbugs_fas_password }}"
BUGZILLA_URL = '{{ blockerbugs_bugzilla_url }}'
BUGZILLA_XMLRPC = BUGZILLA_URL + 'xmlrpc.cgi'
BODHI_URL = '{{ blockerbugs_bodhi_url }}'
BLOCKERBUGS_URL = '{{ blockerbugs_url }}'
BLOCKERBUGS_API = "{}api/v0/".format(BLOCKERBUGS_URL)
{% if env == "staging" %}
FAS_FLASK_COOKIE_REQUIRES_HTTPS = False
FAS_CHECK_CERT = False
PRODUCTION = False
FAS_ENABLED = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
DEBUG = 'true'
{% endif %}
FILE_LOGGING = False
SYSLOG_LOGGING = True
STREAM_LOGGING = True
# to fix login issue for folks who are part of many FAS groups
PREFERRED_URL_SCHEME='https'
# Make browsers send session cookie only via HTTPS
SESSION_COOKIE_SECURE = True
# Tell flask that we're behind proxy
BEHIND_PROXY = True
# Always hide DB_URI
SHOW_DB_URI = False
# enable fedmenu
FEDMENU_URL = 'https://apps.fedoraproject.org/fedmenu/'
FEDMENU_DATA_URL = 'https://apps.fedoraproject.org/js/data.js'

View file

@ -45,6 +45,8 @@ spec:
value: "{{ stg_blockerbugs_forge_bot_access_token }}"
- name: FORGEJO_REPO_WEBHOOK_SECRET
value: "{{ stg_blockerbugs_forge_repo_webhook_secret }}"
- name: DEBUG
value: "true"
{% else %}
- name: POSTGRESQL_PASSWORD
value: "{{ prod_blockerbugs_db_password }}"

View file

@ -54,6 +54,8 @@ spec:
value: "{{ stg_blockerbugs_forge_bot_access_token }}"
- name: FORGEJO_REPO_WEBHOOK_SECRET
value: "{{ stg_blockerbugs_forge_repo_webhook_secret }}"
- name: DEBUG
value: "true"
{% else %}
- name: POSTGRESQL_PASSWORD
value: "{{ prod_blockerbugs_db_password }}"