1
0
Fork 0
forked from infra/ansible
Commit graph

44 commits

Author SHA1 Message Date
70544430ff
badges: redirect fedorahosted/pagure issues to fedora forge
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
2026-09-17 08:51:43 +05:30
3e9a9690e6 pagure: block botnet using outdated browser UAs 2026-08-13 18:26:15 +00:00
Jakub Kadlcik
16ad5351ec pagure: add redirects for Copr docs and Fedora Packager Sponsors
Fix infra/tickets#13206
2026-08-10 18:23:15 +00:00
97d8bffc02 pagure: add Lightpanda to bot list
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2026-08-08 12:45:38 -07:00
aedf43d1f3 Restore arcane breadcrumbs (broken Forge links)
Also some minor changes to satisfy yamllint.

Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-03-11 21:09:36 +00:00
a754144f19 Update infra pagure.io links to forge.fp.o (WIP)
This should update all the references we have to
https://pagure.io/fedora-infrastructure to the
new https://forge.fedoraproject.org/infra/tickets/ area.

Do not merge this before the migration on tuesday.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2026-01-20 14:39:40 -08:00
065a89faeb pagure.io: increase processes
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-12-09 11:34:04 -08:00
fd342ee1a4 pagure.io: forbid generating archives from forks
pagure will generate a zip or gz archive of any particular thing on a
fork. scrapers crawl this and generate an archive for every single
tag in a fork.

Since we don't really need these in forks, lets forbid that.

Users that somehow need an archive for a fork can clone locally and
generate one. Non forks we are leaving enabled at this time as they
can/do use this for releases.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-12-08 10:15:16 -08:00
88686312db pagure: enable rewriteengine
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-12-08 10:03:20 -08:00
8fbcbac96d pagure: fix order of operations to not block after proxying (which will not work)
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-12-08 10:00:54 -08:00
b88b92a719 pagure: disable /blame/ on pagure.io
The blame endpoint gets crawled a lot by scrapers and it's very
intensive for pagure. It has to run the blame in the git repo, which
can take a while and requests pile up.

While right now load is fine with it, it's might be causing
sporadic 503's that we are seeing cloing things. If there's a bunch
of blame requests cloging up the queue.

Users can git clone and run a blame locally if they need to.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-12-08 09:57:07 -08:00
c8aaf71b12 Fix Ben's commit 2025-09-23 18:57:02 -05:00
Ben Maconi
4bcf63ba93 added redirect for www.pagure.io to pagure.io 2025-09-23 18:35:49 -05:00
ef2b6c4dd5 pagure: enable anubis in prod
This should enable anubis on pagure.io.
If it needs backing out, revert this commit.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-09-18 10:22:43 -07:00
c2a32e9b80 stg.pagure.io: add anubis pod
This adds a setup where we have podman pulling the anubis pod and
running it and then proxying requests through it for weighing.

The pod runs as an unpriv 'anubis' user and uses a systemd service file
to manage it.

Changes then are made in httpd config to terminate ssl and then proxy
via anubis. The flow is:

request -> httpd -> anubis/pod -> httpd (pagure wsgi app).

This is already manually setup on stg.pagure.io and this pr
should not change pagure.io any.

If/when we wish to enable this for pagure.io, we just need to adjust the
0_pagure.conf file and the playbook to include the role.

Note that we will want to use a different approach for proxies/other
applications. There we can use the native fedora anubis package, and
will need to adjust templates to handle the middle proxying.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-09-05 16:33:08 +00:00
8ee5e09ce1 pagure02: drop a bunch of old blocks
For now, we should be able to drop these blocks.
I checked logs and there have been no recent hits to these.
Of course they could become active again, but we can always put it back
in place. There's been requests from folks wanting to submit pr's that
their forks are blocked by these.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-08-28 18:36:50 +00:00
c12a1cb27d pagure: drop fedora-infra forks for now as crawlers are hammering the crap out of pagure over them
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-02 07:43:30 -07:00
836d79193c pagure: update ansible for latest blocks from ai
Update the latest project blocks that were added.

Also, extend the bot block to docs.pagure.io, which was
being hammered by scrapers.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-30 10:02:24 -07:00
b55d66cc51 Revert "pagure: block some more forks and blame/history from ai scrapers"
This reverts commit 1c7ecb6bcf.

Lets see if the bots have moved on.
2025-05-26 08:32:37 -07:00
1c7ecb6bcf pagure: block some more forks and blame/history from ai scrapers
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-25 21:47:39 -07:00
91e9a5627d httpd / botblocking: fix syntax on bot rewrite
These have to be in "s in order to do a string comparison, since
they were not, they were never matching anything. ;(

Fix them all up, and also block a few more repos on pagure that are
getting heavily crawled.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-13 11:39:25 -07:00
4bba87381d pagure: block some old mirror copies of big projects
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-04-16 10:22:35 -07:00
1459e74b5a [pagure] Tweak the performance of httpd server
Today the pagure started to be unresponsive. After few hours of
debugging we narrowed the issue to worker limit. We tweaked the value to
something that should be more responsive and it helped.

Here is the PR to make the change permanent.

Thanks @gwmngilfen and @nphillip for help with that.
2025-03-26 14:03:34 +00:00
Stephen Smoogen
969bbfcf2a Add blockers to dl.fedoraproject.org
Looked at logs of servers being hit by the 'non-responsive' bots and
the following were hit heavily every day multiple times a day:

100006 nagios.fedoraproject.org-access.log
102150 koschei.fedoraproject.org-access.log
162296 lists.fedoraproject.org-access.log
495776 fedoraproject.org-access.log
850471 dl.fedoraproject.org-access.log

Added bloks to dl.fedoraproject to try and lower its hit rate. Others
need review from people who know their internals more.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-07-09 09:18:56 +00:00
4a3da58a9e pagure: drop Bytespider crawler
This crawler is hitting pagure.io really hard.
Sent it a 403 and block in robots.txt

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-01 12:19:43 -07:00
c471f29867 pagure: try increasing the number of processes for pagure.io
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-05 14:06:40 -08:00
4c2dc64958 [Pagure] Disable OIDC on production for now
Limiting the number of processes to 1 caused unexpected error on production
instance. For more info see https://pagure.io/fedora-infrastructure/issue/10372#comment-868823

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-14 12:30:45 +02:00
44ce99733e Pagure: only use a single apache process
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-08-11 12:29:10 +00:00
07f9caa49f pagure: drop this websites block
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-07-21 12:58:11 -07:00
c3718a166a pagure: put websites block back in place
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-17 16:10:04 -08:00
639fb415e9 pagure: try and put fedora-websites back to normal
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-11 11:22:25 -08:00
12b64f5370 Revert "pagure: drop websites rule for old DDoS"
This reverts commit 415f621bdf.

Seems the DDoS is back
2022-08-18 08:55:33 -07:00
ebcf1ff795 pagure: fix "ServerLimit cannot occur within <VirtualHost> section" error
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-08-03 11:59:46 -07:00
c11827de9f pagure/src: see about enabling h2
I'll try this in stg first and then roll to prod if all looks ok.
I don't see any reason why it wouldn't work off hand.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-08-03 11:46:46 -07:00
415f621bdf pagure: drop websites rule for old DDoS
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-31 12:04:12 -07:00
7105387724 pagure: increase some httpd worker limits
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-15 14:23:06 -07:00
45c28c27c5 pagure: add hack to 403 DDoS attack
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-15 14:18:39 -07:00
575d1ea238 pagure: increase processes
pagure was processing a lot of things, increasing this seemed to help.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-03 11:41:11 -07:00
9bfed779bb pagure: also use the pagure.io cert for pagure.org as it has a alt name for that
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-30 09:58:07 -07:00
e8e25afce5 pagure: fix the path to the new location of the intermediate cert
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2021-01-13 10:06:45 +01:00
d6244f86ef pagure / production: fix a key path in prod
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 12:44:21 -08:00
467731347d pagure / staging: fix path to cert in 2 places.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 12:33:53 -08:00
b31730d841 pagure / staging: combine certs to 1, clean up logic
There's no reason to not just use one letsencrypt cert for stg.pagure.
Also clean up logic in the web config and make sure all the servernames
are handled correctly.

Once this works, will roll this to production.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 11:52:09 -08:00
dc59446b99 pagure: drop the frontend sub-directory
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-10-01 16:14:06 +02:00
Renamed from roles/pagure/frontend/templates/0_pagure.conf (Browse further)