MirrorManager: make the storage more generic
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
a4bc9a6149
commit
c397be2799
5 changed files with 51 additions and 17 deletions
|
@ -19,23 +19,54 @@ spec:
|
|||
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
||||
command:
|
||||
- "/opt/app-root/bin/mm2_generate-worldmap"
|
||||
- "-c"
|
||||
- "/etc/mirrormanager/mm.cfg"
|
||||
- "--output"
|
||||
- "/var/www/mirrormanager-statistics/map/"
|
||||
- "/var/lib/mirrormanager/statistics/map/"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/etc/mirrormanager"
|
||||
readOnly: true
|
||||
- name: statistics
|
||||
mountPath: "/var/www/mirrormanager-statistics"
|
||||
- name: data
|
||||
mountPath: "/var/lib/mirrormanager"
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: config
|
||||
- name: statistics
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: statistics
|
||||
claimName: data
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: get-geoip
|
||||
spec:
|
||||
successfulJobsHistoryLimit: 3
|
||||
failedJobsHistoryLimit: 3
|
||||
concurrencyPolicy: Forbid
|
||||
schedule: "48 * * * *"
|
||||
startingDeadlineSeconds: 500
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: mirrormanager
|
||||
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
||||
command:
|
||||
- "curl"
|
||||
- "--create-dirs"
|
||||
- "--output-dir"
|
||||
- "/var/lib/mirrormanager/geoip"
|
||||
- "-O"
|
||||
- "https://infrastructure.fedoraproject.org/infra/bigfiles/geoip/GeoLite2-City.mmdb"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/var/lib/mirrormanager"
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: data
|
||||
|
||||
# ---
|
||||
# apiVersion: batch/v1
|
||||
|
|
|
@ -38,8 +38,8 @@ spec:
|
|||
- name: secrets
|
||||
mountPath: "/etc/mirrormanager-secrets"
|
||||
readOnly: true
|
||||
- name: statistics
|
||||
mountPath: /var/www/mirrormanager-statistics
|
||||
- name: data
|
||||
mountPath: /var/lib/mirrormanager
|
||||
- name: wsgi-script
|
||||
mountPath: "/opt/app-root/src/deploy"
|
||||
readOnly: true
|
||||
|
@ -66,7 +66,7 @@ spec:
|
|||
# readOnly: true
|
||||
env:
|
||||
- name: MM2_CONFIG
|
||||
value: "/etc/mirrormanager/mm.cfg"
|
||||
value: "/etc/mirrormanager/mirrormanager2.cfg"
|
||||
- name: APP_MODULE
|
||||
value: "deploy.wsgi"
|
||||
- name: APP_CONFIG
|
||||
|
@ -92,9 +92,9 @@ spec:
|
|||
- name: secrets
|
||||
secret:
|
||||
secretName: secrets
|
||||
- name: statistics
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: statistics
|
||||
claimName: data
|
||||
- name: wsgi-script
|
||||
configMap:
|
||||
name: wsgi-script
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: statistics
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
|
|
|
@ -11,8 +11,8 @@ items:
|
|||
labels:
|
||||
app: mirrormanager
|
||||
data:
|
||||
mm.cfg: |-
|
||||
{{ load_file('mm.cfg.py') | indent(6) }}
|
||||
mirrormanager2.cfg: |-
|
||||
{{ load_file('mirrormanager2.cfg.py') | indent(6) }}
|
||||
gunicorn.conf.py: |-
|
||||
{{ load_file('gunicorn.conf.py') | indent(6) }}
|
||||
- apiVersion: v1
|
||||
|
|
|
@ -77,7 +77,7 @@ SMTP_SERVER = 'bastion{{ env_suffix }}.fedoraproject.org'
|
|||
|
||||
# This is the directory the code enabled by SHOW_STATISTICS will use
|
||||
# to locate the statistics files and display them.
|
||||
# STATISTICS_BASE = '/var/www/mirrormanager-statistics/data'
|
||||
STATISTICS_BASE = '/var/lib/mirrormanager/statistics/data'
|
||||
|
||||
# Countries which have to be excluded.
|
||||
EMBARGOED_COUNTRIES = ['CU', 'IR', 'KP', 'SD', 'SY']
|
||||
|
@ -98,7 +98,10 @@ EMBARGOED_COUNTRIES = ['CU', 'IR', 'KP', 'SD', 'SY']
|
|||
# SHOW_PROPAGATION = True
|
||||
|
||||
# Where to look for the above mentioned propagation images.
|
||||
# PROPAGATION_BASE = '/var/www/mirrormanager-statistics/data/propagation'
|
||||
PROPAGATION_BASE = '/var/lib/mirrormanager/statistics/data/propagation'
|
||||
|
||||
# Where the GeoIP database lives
|
||||
GEOIP_BASE = "/var/lib/mirrormanager/geoip"
|
||||
|
||||
# Disable master rsync server ACL
|
||||
# Fedora does not use it and therefore it is set to False
|
Loading…
Add table
Add a link
Reference in a new issue