Files
infrastructure/playbooks/codesearch.archlinux.org.yml
Leonidas SpyropoulosandLeonidas Spyropoulos a37df93f21 feat(codesearch): implement zoekt-based code search role
Add complete codesearch role with zoekt implementation. Zoekt provides
disk-based sharded indexing that avoids OOM issues on 8GB systems,
with per-package .zoekt shard files and automatic discovery.

- Implement fetch-sources script that clones archlinux/packaging/state
  to determine current package list and versions, then downloads
  PKGBUILDs and upstream sources from GitLab with parallel job support
  and idempotent re-runs
- Add zoekt-webserver systemd service for search frontend
- Add zoekt-index service/timer for incremental index generation
- Configure nginx reverse proxy to port 6070 with TLS
- Set up firewall rules for HTTP/HTTPS and monitoring access

Architecture:
- codesearch-extract.timer: Daily fetch trigger
- codesearch-extract.service: Runs fetch-sources to download sources
- codesearch-index.timer: Runs every 5 minutes after extraction
- codesearch-index.service: Builds zoekt shards
- codesearch-webserver.service: Serves search UI from disk shards

Fixes: infrastructure#808

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2026-05-26 14:40:32 +01:00

16 lines
381 B
YAML

- name: Setup codesearch.archlinux.org
hosts: codesearch.archlinux.org
remote_user: root
roles:
- { role: common }
- { role: tools }
- { role: firewalld }
- { role: wireguard }
- { role: sshd }
- { role: root_ssh }
- { role: nginx }
- { role: codesearch }
- { role: fail2ban }
- { role: prometheus_exporters }
- { role: promtail }