diff --git a/playbooks/groups/sundries.yml b/playbooks/groups/sundries.yml index 78001995b2..5c552b1672 100644 --- a/playbooks/groups/sundries.yml +++ b/playbooks/groups/sundries.yml @@ -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 diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf index e9d3596978..e41bdcf7e6 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.registry-generic.conf @@ -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/" Options +FollowSymLinks @@ -107,12 +106,3 @@ Alias "/deltas/" "/srv/web/registry-index/deltas/" Options +Indexes Require all granted - - - ExpiresActive on - ExpiresDefault "access plus 1 year" - - AllowOverride None - Options +Indexes - Require all granted - diff --git a/roles/regindexer/build/tasks/main.yml b/roles/regindexer/build/tasks/main.yml new file mode 100644 index 0000000000..c60c87e6a0 --- /dev/null +++ b/roles/regindexer/build/tasks/main.yml @@ -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 diff --git a/roles/regindexer/build/templates/config.yaml b/roles/regindexer/build/templates/config.yaml new file mode 100644 index 0000000000..7b30290f83 --- /dev/null +++ b/roles/regindexer/build/templates/config.yaml @@ -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 }}"