Skip to content
Snippets Groups Projects
Verified Commit 4e5550a8 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

Decommission bugs.archlinux.org and replace it with a static copy[1]

As announced[2][3] the bugtracker has been migrated to gitlab, so
bugs.a.o can be decommissioned and replaced with a static copy[1](to
avoid link rot).

[1] https://gitlab.archlinux.org/archlinux/bugs-archive/
[2] https://archlinux.org/news/bugtracker-migration-to-gitlab-completed/
[3] https://lists.archlinux.org/hyperkitty/list/arch-dev-public@lists.archlinux.org/thread/WYXDTJ3TR2DWRQCDZK44BQDH67IDVGTS/

Fix #550
Fix #551
parent 3f483607
No related branches found
No related tags found
1 merge request!789Decommission bugs.archlinux.org and replace it with a static copy[1]
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 71,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": "Prometheus",
"description": "Currently open bugs on https://bugs.archlinux.org",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 22,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": "Prometheus",
"editorMode": "builder",
"expr": "flyspray_issues",
"legendFormat": "{{ project }}",
"range": true,
"refId": "A"
}
],
"title": "Open bugs",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Flyspray",
"uid": "c9a9b812-a067-4534-96bf-c21ba7a0c47d",
"version": 2,
"weekStart": ""
}
php_extensions:
- curl
- zip
zend_extensions:
- opcache
[Unit]
Description=PHP-FPM service for %i
After=syslog.target network.target
After=mysqld.service postfix.service
Requires=php-fpm7@.socket
[Service]
Type=notify
PrivateTmp=true
NoNewPrivileges=true
;PrivateNetwork=true
PrivateDevices=true
# AURweb's rendercomment script git bindings requires access to /home:
# failed to stat '/home/aur/.gitconfig
ProtectHome=tmpfs
ProtectSystem=full
InaccessiblePaths=-/var/lib/mysql
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
ProtectKernelLogs=true
ProtectClock=true
RestrictRealtime=true
RestrictNamespaces=true
# Restricts the set of socket address families accessible to the processes of this unit.
# Protects against vulnerabilities such as CVE-2016-8655
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
MemoryAccounting=yes
CPUAccounting=yes
IOAccounting=yes
User=%i
Group=%i
Environment="FPM_SOCKETS=/run/php-fpm7/%i.socket=3"
ExecStart=/usr/bin/php-fpm7 --nodaemonize --fpm-config /etc/php7/php-fpm.d/%i.conf
ExecReload=/bin/kill -USR2 $MAINPID
[Install]
WantedBy=multi-user.target
[Unit]
Description=PHP-FPM socket for %i
[Socket]
ListenStream=/run/php-fpm7/%i.socket
SocketMode=0660
SocketUser=%i
SocketGroup=http
[Install]
WantedBy=sockets.target
- name: Daemon reload
systemd:
daemon-reload: true
- name: Install php7-fpm
pacman: name=php7-fpm,php7-gd,php7-pgsql state=present
- name: Install php7-fpm units
copy: >
src={{ item }} dest=/etc/systemd/system/{{ item }}
owner=root group=root mode=0644
with_items:
- php-fpm7@.socket
- php-fpm7@.service
notify: Daemon reload
- name: Configure default php.ini
template: >
src=php.ini.j2 dest=/etc/php7/php.ini
owner=root group=root mode=0644
This diff is collapsed.
#!/usr/bin/python
import sys
import shutil
import tempfile
import sqlalchemy
engine = sqlalchemy.create_engine('mysql://localhost/flyspray', connect_args={'read_default_file': '/root/.my.cnf'})
def get_flyspray_header():
return '# HELP flyspray_issues number of open issues\n# TYPE flyspray_issues gauge\n'
def format_metric(project, total):
return f'flyspray_issues{{project="{project}"}} {total}\n'
def get_metric(project_id):
with engine.connect() as conn:
result = conn.execute(f"SELECT count(task_id) from flyspray_tasks where project_id = {project_id} and is_closed = 0")
return next(result)[0]
def main(directory):
with tempfile.TemporaryDirectory() as tmpfp:
filename = f'{tmpfp}/flyspray-status.prom'
print(filename)
with open(filename, 'w') as fp:
fp.write(get_flyspray_header())
fp.write(format_metric("Arch Linux", get_metric(1)))
fp.write(format_metric("Community", get_metric(5)))
shutil.move(filename, f'{directory}/flyspray-status.prom')
if __name__ == "__main__":
if len(sys.argv) != 2:
print('Missing textcollector directory argument')
main(sys.argv[1])
......@@ -181,18 +181,6 @@
systemd: name=prometheus-repository-textcollector.timer enabled=yes daemon_reload=yes state=started
when: "inventory_hostname == 'gemini.archlinux.org'"
- name: Install flyspray textcollector service
template: src=prometheus-flyspray-textcollector.service.j2 dest=/etc/systemd/system/prometheus-flyspray-textcollector.service owner=root group=root mode=644
when: "inventory_hostname == 'bugs.archlinux.org'"
- name: Install flyspray textcollector timer
template: src=prometheus-flyspray-textcollector.timer.j2 dest=/etc/systemd/system/prometheus-flyspray-textcollector.timer owner=root group=root mode=644
when: "inventory_hostname == 'bugs.archlinux.org'"
- name: Enable and start prometheus flyspray textcollector timer
systemd: name=prometheus-flyspray-textcollector.timer enabled=yes daemon_reload=yes state=started
when: "inventory_hostname == 'bugs.archlinux.org'"
- name: Install sudoers for btrfs
copy: src=sudoers dest=/etc/sudoers.d/node_exporter owner=root group=root mode=0440
when: filesystem == "btrfs"
......
......@@ -68,10 +68,6 @@ locals {
server_type = "cx11"
domain = "bugbuddy"
}
"bugs.archlinux.org" = {
server_type = "cx11"
domain = "bugs"
}
"buildbot.pkgbuild.com" = {
server_type = "cx21"
domain = "buildbot"
......@@ -177,7 +173,7 @@ locals {
"whatcanidofor" = "d9e45851002a623e10f6954ff9a85d21"
"openpgpkey" = "d20c137368e26dcc3db56d45a368e729"
"openpgpkey.master-key" = "3eea8f39a9b473a5dc7c188366f84072"
"bugs-old" = "1f3308c8d5763eecb4f9013291aeeac4"
"bugs" = "e41ef82b1a2d063ae958a4d5a3b2f870"
"package-maintainer-bylaws.aur" = "680c89d189c8f342cc00bcb624d813a3"
"reproducible-notes" = "8c657f2f2720db1c3db63be89605cf0d"
"terms" = "0b62a71af2aa85fb491295b543b4c3d2"
......
......@@ -19,7 +19,6 @@ locals {
archlinux_org_monitor = {
"Accounts" = "https://accounts.archlinux.org"
"AUR" = "https://aur.archlinux.org"
"Bugtracker" = "https://bugs.archlinux.org"
"Forum" = "https://bbs.archlinux.org"
"Gitlab" = "https://gitlab.archlinux.org"
"Man" = "https://man.archlinux.org"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment