Move fedora-indexer to production and remove regindexer
* Update rsync configuration for production to sync the flatpak-indexer output directories into the right place, in the same way as was done for staging. The regindexer rsync module is renamed to flatpak-index for clarity. * Update the registry.fedoraproject.org to use the flatpak-indexer rules for production. * Remove the regindexer role Signed-off-by: Owen W. Taylor <otaylor@fishsoup.net>
This commit is contained in:
parent
6026e74b0e
commit
75e81cbccd
7 changed files with 6 additions and 147 deletions
|
@ -29,8 +29,6 @@
|
|||
- { 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
|
||||
|
|
|
@ -1,7 +1 @@
|
|||
{% if env != 'staging' %}
|
||||
30 * * * * root /usr/bin/rsync -a --no-owner --no-group sundries01::registry-index/ /srv/web/registry-index/
|
||||
31 * * * * root /usr/bin/rsync --delete -a --no-owner --no-group sundries01::regindexer/index/ /srv/web/registry-index/index/
|
||||
32 * * * * root /usr/bin/rsync --delete -a --no-owner --no-group sundries01::regindexer/icons/ /srv/web/registry-index/icons/
|
||||
{% else %}
|
||||
30 * * * * root /usr/bin/rsync --delete -a --no-owner --no-group sundries01::regindexer/fedora/ /srv/web/registry-index/index/ && /usr/bin/rsync --delete -a --no-owner --no-group sundries01::regindexer/icons/ /srv/web/registry-index/icons/ && /usr/bin/rsync --delete -a --no-owner --no-group sundries01::regindexer/deltas/ /srv/web/registry-index/deltas/ && /usr/bin/rsync -a --no-owner --no-group sundries01::registry-index/ /srv/web/registry-index/
|
||||
{% endif %}
|
||||
30 * * * * root /usr/bin/rsync --delete -a --no-owner --no-group sundries01::flatpak-index/fedora/ /srv/web/registry-index/index/ && /usr/bin/rsync --delete -a --no-owner --no-group sundries01::flatpak-index/icons/ /srv/web/registry-index/icons/ && /usr/bin/rsync --delete -a --no-owner --no-group sundries01::flatpak-index/deltas/ /srv/web/registry-index/deltas/ && /usr/bin/rsync -a --no-owner --no-group sundries01::registry-index/ /srv/web/registry-index/
|
||||
|
|
|
@ -32,39 +32,6 @@ RewriteRule ^/v2/(.*)$ http://oci-registry01:5000/v2/$1 [P,L]
|
|||
{% endif %}
|
||||
RewriteRule ^/v2/(.*)$ http://localhost:10048/v2/$1 [P,L]
|
||||
|
||||
{% if env == "production" %}
|
||||
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}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
RewriteRule "^/index/static$" /index/flatpak-testing-%1-labels.json [L,PT]
|
||||
|
||||
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}" &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}" &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}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteRule "^/index/static$" /index/flatpak-labels.json [L,PT]
|
||||
{% elif env == "staging" %}
|
||||
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
|
@ -96,7 +63,6 @@ RewriteRule "^/index/static$" /index/flatpak-latest.json [L,PT]
|
|||
|
||||
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteRule "^/index/static$" /index/flatpak-latest-annotations.json [L,PT]
|
||||
{% endif %}
|
||||
|
||||
DocumentRoot /srv/web/registry-index/
|
||||
|
||||
|
@ -121,9 +87,7 @@ SSLOptions +FakeBasicAuth
|
|||
|
||||
Alias "/index/" "/srv/web/registry-index/index/"
|
||||
Alias "/app-icons/" "/srv/web/registry-index/icons/"
|
||||
{% if env == "staging" %}
|
||||
Alias "/deltas/" "/srv/web/registry-index/deltas/"
|
||||
{% endif %}
|
||||
|
||||
<Directory “/srv/web/registry-index/index/">
|
||||
Options +FollowSymLinks
|
||||
|
@ -144,7 +108,6 @@ Alias "/deltas/" "/srv/web/registry-index/deltas/"
|
|||
Require all granted
|
||||
</Directory>
|
||||
|
||||
{% if env == "staging" %}
|
||||
<Directory "/srv/web/registry-index/deltas/">
|
||||
ExpiresActive on
|
||||
ExpiresDefault "access plus 1 year"
|
||||
|
@ -153,4 +116,3 @@ Alias "/deltas/" "/srv/web/registry-index/deltas/"
|
|||
Options +Indexes
|
||||
Require all granted
|
||||
</Directory>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
- 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
|
|
@ -1,74 +0,0 @@
|
|||
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 }}"
|
|
@ -198,9 +198,9 @@ gid = root
|
|||
read only = yes
|
||||
hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
|
||||
|
||||
[regindexer]
|
||||
comment = regindexer
|
||||
path = /var/lib/regindexer/
|
||||
[flatpak-index]
|
||||
comment = flatpak-indexer output
|
||||
path = /srv/web/registry-index
|
||||
uid = root
|
||||
gid = root
|
||||
read only = yes
|
||||
|
|
|
@ -198,8 +198,8 @@ gid = root
|
|||
read only = yes
|
||||
hosts allow = 10.5.126.0/255.255.255.0 192.168.0.0/255.255.0.0 10.5.128.0/255.255.255.0 10.3.160.0/255.255.224.0
|
||||
|
||||
[regindexer]
|
||||
comment = regindexer
|
||||
[flatpak-index]
|
||||
comment = flatpak-indexer output
|
||||
path = /srv/web/registry-index
|
||||
uid = root
|
||||
gid = root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue