1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-25 19:36:04 +02:00
Commit Graph

457 Commits

Author SHA1 Message Date
Jakub Klinkovský 021f1e4dd5
Update archmanweb to v1.6 2023-01-13 11:39:57 +09:00
Kristian Klausen 24e73359c6
Decommission patchwork.archlinux.org and replace it with a static copy[1]
As announced on the mailing list[2] pacman has been migrated to gitlab
and there is no real use for patchwork left, so it can be
decommissioned. A static copy[1] is kept around for the time being to
avoid link rot.

[1] https://gitlab.archlinux.org/archlinux/patchwork-archive
[2] https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/message/7B6R5HVEC67U7B2VQ3SKUVXU4RDCRRMM/

Fix #487
2023-01-08 22:10:49 +01:00
Evangelos Foutras a782c6953f
syncrepo: let mirrorsync perform the repo syncing
This role will still handle setting up nginx and rsyncd, due to specific
configuration requirements these services have.

We're also effectively relieving build.archlinux.org of rsyncd duties as
it is not something it should be doing anyway.
2022-11-12 20:22:08 +02:00
Jakub Klinkovský 5c9b09fd70
Update archmanweb to v1.5 2022-11-03 21:46:56 +01:00
Evangelos Foutras 9f3149d00e
Enable the sshd role in playbooks/all-hosts-basic
Move the 'sshd_enable_includes' override to aur's host vars instead of
specifying it as part of playbooks/aur.archlinux.org. Otherwise, would
break the AUR's SSH auth if ssh.d/aurweb_config does not get included.
2022-10-14 20:14:16 +03:00
Kristian Klausen 893a95f329
Kill the mailman2 server and put the mailman3 server in its place
With the final lists migrated to mailman3[1], the mailman2 server can
finally be killed.

When the mailman3 server was initially setup[2], it was done on a
separate server because the mailman and mailman3 packages conflicted,
and the traffic was routed over wireguard (HTTP, LMTP and SMTP).

Instead of installing mailman3 on the original lists.al.org server and
transferring the data, it was easier just to install the missing pieces
(basically Postfix and adjusting the Nginx configuration) on the ml3
server and move the IPs (to keep the IP mail reputation).

So basically the following was done:
- The IPs for the original lists.al.org was moved to the mailman3.al.org
  server
- The mailman2 datadir was transferred to mailman3.al.org server, so we
  can keep the pipermail links alive, and import missing mails if needed
- The original lists.al.org server was decommissioned
- The mailman3.al.org server was renamed to lists.al.org
- The missing pieces was added to the mailman3 role (basically Postfix +
  Nginx adjustments)
- The mailman role was deleted and the mailman3 role renamed to mailman

[1] 75ac7d09 ("mailman: Fourth and final batch of mailman3 migrated lists")
[2] 9294828f ("Setup mailman3 server")

Fix #59
2022-09-28 21:04:41 +02:00
Evangelos Foutras 43eb814bcf
Combine sync{archive,debug,riscv} into mirrorsync
These roles are very similar and can be merged into a single new role.

Note: The archive mirror is changed from a 4-hour sync to minutely for
conformity with the other two mirrors. In practice this doesn't matter
as it was already taking over 4 hours to finish and was starting again
right after its previous run.
2022-09-28 21:52:52 +03:00
Evangelos Foutras 66224e0d08
tasks/upgrade-servers: host-specific post-upgrades
The Ansible output is too noisy with all the skipped tasks; avoid this
by moving host-speicific tasks into their own files that get included.
2022-09-20 15:03:10 +03:00
Evangelos Foutras 29aaed2bd0
syncriscv: add role for mirroring the RISC-V port
Going to be served by all our Geo boxes under riscv.mirror.pkgbuild.com.
2022-09-16 22:22:43 +03:00
Evangelos Foutras e5ed4264be
Capitalize a play name that was originally missed
Fixes: 26f289b72b ("Capitalize the first letter of all task names")
2022-09-01 20:12:18 +03:00
Jakub Klinkovský 05c1dd05f9 Update archmanweb to v1.4 2022-08-23 22:42:33 +02:00
Evangelos Foutras d381d81800
Move 'noqa' tags next to the name instead of module
This avoid having extra-long lines and works fine for task-based rules.
2022-08-23 08:07:09 +03:00
Evangelos Foutras ab7edadf0b
Replace noqa tag '208' with 'risky-file-permissions' 2022-08-23 07:06:34 +03:00
Evangelos Foutras 26f289b72b
Capitalize the first letter of all task names
ansible-lint 6.5.0 complains about:

  name: All names should start with an
        uppercase letter. (name[casing])
2022-08-23 06:57:13 +03:00
Kristian Klausen 06e0252720
gitlab_runner: Add VM based executor (libvirt-executor)
For some workloads running in a container is too restrictive, ex:
arch-boxes (loop device, filesystem mount, pacstrap) and archiso
(pacstrap). Currently they both run a TCG accelerated QEMU VM, which is
very slow and painful to work with. We should provide a better option to
our users!

This adds a hardware accelerated VM for this kinds of workloads, which
is way faster and you can do whatever you like (mostly)!

Fix #283
2022-07-29 20:18:34 +02:00
Kristian Klausen bf1f4ff1d4
Add libvirt role for upcoming GitLab runner libvirt executor 2022-07-29 20:18:30 +02:00
nl6720 e74066e3c8
Use C.UTF-8 as the default locale
The glibc 2.35-6 package ships with the C.UTF-8 locale included which
means there is now a usable UTF-8 locale available by default.

en_US.UTF-8 will still be generated because PostgreSQL clusters are
created with that locale. Migrating the clusters to C.UTF-8 is
possible, but that requires dumping and recreating them.
2022-07-23 19:13:59 +03:00
Evangelos Foutras 83f0066a14
Replace references to Packet.net with Equinix Metal
Also tweak the documentation on rebuilderd workers and add runner1.
2022-07-10 12:42:15 +03:00
Evangelos Foutras 862a8a088e
playbooks/mirrors: make archweb inclusion conditional
We do not really want to make all mirrors run mirrorcheck, so make it
conditional based on whether archweb_mirrorcheck_locations is defined.
2022-07-10 12:42:15 +03:00
Evangelos Foutras a1d205c911
playbooks/mirrors: add firewall role and move wireguard up
The sshd role needs to open a firewall hole and will fail if firewalld
isn't present. Also place the wireguard role right after firewall role
because it is needed by promtail further down.
2022-07-10 12:42:15 +03:00
Evangelos Foutras a9e0790f53
Remove the three dashes from all YAML documents
These are used to signal the start of the document in a stream of many
documents. As Ansible only supports one YAML document per file this is
unnecessary. About a third of our YAML documents already lacked these.
2022-06-08 14:35:45 +03:00
Kristian Klausen 9294828f15
Setup mailman3 server
We want to migrate to mailman3 as mailman2 is basically unmaintained and
requires Python 2 which is EOL.

Because the mailman and mailman3 packages conflict and we don't want to
perform a big bang migration, mailman3 must be deployed on a separate
server. mailman-web (mailman3's web interface) hasn't been packaged yet,
so for now we are using my homebrewed PKGBUILD[1].

[1] https://gist.github.com/klausenbusk/5982063f95c503754a51ed2fefb8915e

Ref #59
2022-05-14 22:51:59 +02:00
Evangelos Foutras 5948d258f0
geomirror: rename role to geo_dns
The intention is to use this config for other domains besides a mirror.
2022-05-14 14:22:40 +03:00
Evangelos Foutras afb582b108
geomirror: extract acme dns challenge into new role
- add the new role to redirect.archlinux.org
- release mirror.pkgbuild.com of all DNS duties
2022-05-14 14:22:32 +03:00
Evangelos Foutras c54dee2ee7
common: remove mlocate from all boxes except build
Bash histories indicate this isn't being used anywhere other than
{build,gemini}.archlinux.org and gemini's filelist is so big that
locate becomes so slow that it's practically useless on this box.
2022-05-09 14:07:20 +03:00
Evangelos Foutras b4d60ae2f6
Move highly sensitive secrets to new "super" vault
The idea bebind this is to be able to give vault access to new DevOps
members without giving away more important credentials like Hetzner's.
2022-05-07 17:45:19 +03:00
Evangelos Foutras 1f6cf2dfa5
install_arch: download the latest bootstrap image 2022-04-26 03:40:40 +03:00
Kristian Klausen aa359082aa
Avoid single point-of-failure for our GeoIP domain
We don't want mirror.pkgbuild.com's DNS server to be a
single-point-of-failure, so this commit adds multiple authoritative DNS
servers for the zone. The extra DNS servers are run on the geomirror
servers.

The _acme-challenge zone, used for obtaining certificates, is run solely
on mirror.pkgbuild.com's DNS server, to avoid syncing DNS records
between the servers (KISS).
2022-04-15 19:43:33 +02:00
Evangelos Foutras 64ec52ca86
Enable certbot_dns_support for geo mirrors only
mirror.pkgbuild.com doesn't need it.
2022-04-13 04:20:01 +03:00
Kristian Klausen 9f65f99c6b
Add GeoIP domain for our sponsored mirros
We had a GeoIP mirror in the past based on nginx and its GeoIP module,
but it didn't perform very well, due to the high latency (asking a
central server for the package and then redirected to the closest
mirror).

One of the reasons for offering this service, is so we can relieve
mirror.pkgbuild.com which is burning a ton of traffic (50TB/month),
likely due to it being the default mirror in our Docker image. Another
reason is so we can offer a link to our arch-boxes images in libosinfo
(used by gnome-boxes, virt-install and virt-manager), with good enough
performance for most users.

This time we take a different approach and use a DNS based solution,
which means the latency penalty is only paid once (the first DNS
request). The downside is that the mirrors must have a valid certificate
for the same domain name, which makes using third-party mirrors a
challenge. So for now, we are just using the sponsored mirorrs
controlled by the DevOps team.

Fix #101
2022-04-13 03:10:09 +02:00
Kristian Klausen af5d4b845e
Decommission aur-dev
With the PHP->Python port done[1][2], there isn't much need for aur-dev
anynmore. Most things can also be tested locally and aur-dev haven't got
any love since the port (ex: allowing the aurweb maintainers to deploy
without asking DevOps).

[1] https://lists.archlinux.org/pipermail/aur-general/2022-February/036786.html
[2] https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/525
2022-04-11 14:55:53 +02:00
Evangelos Foutras ec52eb098f
Update packer build and use smaller BIOS boot partition
- Create packer builder in FSN1 and change image to ubuntu-20.04
- Add "use_proxy: false" to provisioner config to work around [1]
- Reduce the size of the BIOS boot partition to 1M (from 10M) [2]
- Update bootstrap_version to 2022.03.01

[1] https://github.com/hashicorp/packer-plugin-ansible/issues/69
[2] https://www.gnu.org/software/grub/manual/grub/html_node/BIOS-installation.html
2022-03-28 02:26:20 +03:00
Evangelos Foutras 7d5fd109dd
tasks/upgrade-servers: tweak pacman upgrade logic
Avoid updating the cache in the same task w/ the upgrade as the former
causes the combined task to always return changed=True. For up-to-date
hosts, stop early instead of following through to the end and skipping
the final reboot task.

Before Ansible 5.4.0, combined cache update + package upgrade would not
always return changed=True but instead depended on whether the were any
packages to upgrade.
2022-03-05 17:06:00 +02:00
Evangelos Foutras 361596f48e
tools: include setconf on build.archlinux.org 2022-03-04 16:07:56 +02:00
Evangelos Foutras aa4b54958b
tasks/sync-ssh-hostkeys: use blocks for shell cmds
Do the same for the hostkeys/known_hosts templates and disable fact
gathering.
2022-02-26 11:08:30 +02:00
Evangelos Foutras dc0f4655df
Remove our two borg hosts from the inventory
These are managed services and Ansible doesn't run on them. It got
boring writing 'all,!rsync_net,!hetzner_storageboxes' in playbooks
and ad-hoc commands, so remove these borg hosts from our inventory.
2022-02-26 11:08:30 +02:00
Evangelos Foutras 6741138baf
hetzner_storagebox: refactor to run on localhost 2022-02-26 11:08:30 +02:00
Evangelos Foutras 4b94feb7be
rsync_net: refactor to execute on localhost 2022-02-26 11:08:29 +02:00
Evangelos Foutras 6c60c6bd40
tasks/sync-ssh-hostkeys: allow custom known_hosts
Change docs/ssh-known_hosts.txt to be partially managed by Ansible, so
custom entries can be added to the top of the file. Use the new format
to write down the host keys of our two borg hosts.
2022-02-25 09:16:35 +02:00
Kevin Morris 521446dc7e update playbooks/aur{,-dev}.archlinux.org.yml
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-09 22:13:21 +01:00
Evangelos Foutras f6a0208e77
tasks: skip reboot if /backup mountpoint exists
Service facts did not provide enough information about the state of
the borg-backup{,-offsite} services. While runnning, their state is
reported as stopped by service_facts and "activating" by systemctl.
2022-02-05 17:17:17 +02:00
Kristian Klausen 4773f92c77 Sync debug packages to our sponsored mirrors[1]
The sponsored mirrors have a ton of storage, but mirror.pkgbuild.com
doesn't, so debug packages aren't synced to it.

[1] {america,asia,europe}.mirror.pkgbuild.com
2022-02-04 21:13:19 +00:00
Morten Linderud 194bc84bf4 debuginfod: Implement role
Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-02-04 21:13:19 +00:00
Kristian Klausen 91f9df6960
Add missing wireguard for gluebuddy
Fixes: d88c0b95 ("Initialize gluebuddy host")
2022-01-30 14:25:35 +01:00
Kristian Klausen ed4ddb2c08
Remove tools role from gluebuddy
The tools role is only used on servers which normal staff have SSH
access to since [1].

[1] 7da1e273 ("Cleanup tools")

Fixes: d88c0b95 ("Initialize gluebuddy host")
2022-01-30 14:25:31 +01:00
Kristian Klausen 30a84d8f47
Remove duplicate gluebuddy playbook
Fixes: d88c0b95 ("Initialize gluebuddy host")
2022-01-30 14:25:26 +01:00
Kristian Klausen 525bd79083
archwiki: Update to PHP8
PHP7 will likely be removed from the repos soon[1]. Time to upgrade! :)

[1] https://archlinux.org/todo/php-7-retiredment/
2022-01-23 19:57:09 +01:00
Jelle van der Waa d88c0b953e
Initialize gluebuddy host 2022-01-21 10:30:05 +01:00
Jelle van der Waa 6ce40bb203
Add gluebuddy playbook 2022-01-21 10:30:05 +01:00
Evangelos Foutras b6972fda76
tasks: stop arch-svntogit.timer before rebooting
In a recent execution of the server upgrade task, svntogit was started
shortly before the reboot command was issued. Therefore, it was killed
two seconds into its run, leaving behind a lock file that prevented it
from starting again after gemini was rebooted.

Avoid the above timing issue by stopping the timer before rebooting.
2022-01-09 19:28:07 +02:00