Add back regindexer and revert httpd config until flatpak-indexer is ready

While we're getting flatpak-indexer tested and working in staging, we still
need regindexer, and we don't want the httpd config changes that are
part of the regindexer => flatpak-indexer change.

Fixes: https://pagure.io/fedora-infrastructure/issue/9631
Signed-off-by: Owen W. Taylor <otaylor@fishsoup.net>
This commit is contained in:
Owen W. Taylor 2021-02-06 14:17:28 -05:00
parent 074f2a2089
commit 67224d3b02
4 changed files with 111 additions and 24 deletions

View file

@ -27,6 +27,8 @@
- { role: geoip-city-wsgi/app, when: ansible_distribution_major_version|int <= 7 and ansible_distribution == 'RedHat' }
- role: easyfix/gather
when: master_sundries_node|bool
- role: regindexer/build
when: master_sundries_node|bool
- role: bz_review_report
when: master_sundries_node|bool and env != "staging"
- rsyncd

View file

@ -32,37 +32,37 @@ RewriteRule ^/v2/(.*)$ http://oci-registry01:5000/v2/$1 [P,L]
{% endif %}
RewriteRule ^/v2/(.*)$ http://localhost:10048/v2/$1 [P,L]
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &tag=testing
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
RewriteRule "^/index/static$" /index/flatpak-testing-%1.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &tag=testing
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
RewriteRule "^/index/static$" /index/flatpak-testing-%1-annotations.json [L,PT]
RewriteRule "^/index/static$" /index/flatpak-testing-%1-labels.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
RewriteRule "^/index/static$" /index/flatpak-%1.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
RewriteRule "^/index/static$" /index/flatpak-%1-annotations.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
RewriteRule "^/index/static$" /index/flatpak-%1-labels.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &tag=testing
RewriteRule "^/index/static$" /index/flatpak-testing.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &tag=testing
RewriteRule "^/index/static$" /index/flatpak-testing-annotations.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &tag=testing
RewriteRule "^/index/static$" /index/flatpak-testing-labels.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteRule "^/index/static$" /index/flatpak.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteRule "^/index/static$" /index/flatpak-annotations.json [L,PT]
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteRule "^/index/static$" /index/flatpak-labels.json [L,PT]
DocumentRoot /srv/web/registry-index/
@ -87,7 +87,6 @@ SSLOptions +FakeBasicAuth
Alias "/index/" "/srv/web/registry-index/index/"
Alias "/app-icons/" "/srv/web/registry-index/icons/"
Alias "/deltas/" "/srv/web/registry-index/deltas/"
<Directory “/srv/web/registry-index/index/">
Options +FollowSymLinks
@ -107,12 +106,3 @@ Alias "/deltas/" "/srv/web/registry-index/deltas/"
Options +Indexes
Require all granted
</Directory>
<Directory "/srv/web/registry-index/deltas/">
ExpiresActive on
ExpiresDefault "access plus 1 year"
AllowOverride None
Options +Indexes
Require all granted
</Directory>

View file

@ -0,0 +1,21 @@
---
- name: install needed packages
package: name=regindexer state=installed
tags:
- packages
- regindexer
- name: make sure regindexer owns it's own files
file: path=/var/lib/regindexer recurse=yes owner=regindexer group=regindexer
tags:
- regindexer
- name: Install config.yaml file
template: src=config.yaml dest=/etc/regindexer/config.yaml
tags:
- regindexer
- name: enable service
service: name=regindexer state=started enabled=true
tags:
- regindexer

View file

@ -0,0 +1,74 @@
icons_dir: /var/lib/regindexer/icons/
icons_uri: /app-icons/
indexes:
flatpak:
output: /var/lib/regindexer/index/flatpak.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['latest']
required_annotations: ['org.flatpak.ref']
skip_flatpak_labels: True
extract_icons: True
flatpak_labels:
output: /var/lib/regindexer/index/flatpak-labels.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['latest']
required_labels: ['org.flatpak.ref']
skip_flatpak_annotations: True
extract_icons: True
flatpak_testing:
output: /var/lib/regindexer/index/flatpak-testing.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['testing']
required_annotations: ['org.flatpak.ref']
skip_flatpak_labels: True
extract_icons: True
flatpak_testing_labels:
output: /var/lib/regindexer/index/flatpak-testing-labels.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['testing']
required_labels: ['org.flatpak.ref']
skip_flatpak_annotations: True
extract_icons: True
flatpak_amd64:
output: /var/lib/regindexer/index/flatpak-amd64.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['latest']
required_annotations: ['org.flatpak.ref']
architectures: ['amd64']
skip_flatpak_labels: True
extract_icons: True
flatpak_amd64_labels:
output: /var/lib/regindexer/index/flatpak-amd64-labels.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['latest']
required_labels: ['org.flatpak.ref']
architectures: ['amd64']
skip_flatpak_annotations: True
extract_icons: True
flatpak_testing_amd64:
output: /var/lib/regindexer/index/flatpak-testing-amd64.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['testing']
required_annotations: ['org.flatpak.ref']
architectures: ['amd64']
skip_flatpak_labels: True
extract_icons: True
flatpak_testing_amd64_labels:
output: /var/lib/regindexer/index/flatpak-testing-amd64-labels.json
registry: https://registry{{ env_suffix }}.fedoraproject.org
registry_public: /
tags: ['testing']
required_labels: ['org.flatpak.ref']
architectures: ['amd64']
skip_flatpak_annotations: True
extract_icons: True
daemon:
topic_prefix: org.fedoraproject
environment: "{{ fedmsg_env }}"