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
|
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
||||||
command:
|
command:
|
||||||
- "/opt/app-root/bin/mm2_generate-worldmap"
|
- "/opt/app-root/bin/mm2_generate-worldmap"
|
||||||
- "-c"
|
|
||||||
- "/etc/mirrormanager/mm.cfg"
|
|
||||||
- "--output"
|
- "--output"
|
||||||
- "/var/www/mirrormanager-statistics/map/"
|
- "/var/lib/mirrormanager/statistics/map/"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: "/etc/mirrormanager"
|
mountPath: "/etc/mirrormanager"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: statistics
|
- name: data
|
||||||
mountPath: "/var/www/mirrormanager-statistics"
|
mountPath: "/var/lib/mirrormanager"
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
name: config
|
name: config
|
||||||
- name: statistics
|
- name: data
|
||||||
persistentVolumeClaim:
|
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
|
# apiVersion: batch/v1
|
||||||
|
|
|
@ -38,8 +38,8 @@ spec:
|
||||||
- name: secrets
|
- name: secrets
|
||||||
mountPath: "/etc/mirrormanager-secrets"
|
mountPath: "/etc/mirrormanager-secrets"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: statistics
|
- name: data
|
||||||
mountPath: /var/www/mirrormanager-statistics
|
mountPath: /var/lib/mirrormanager
|
||||||
- name: wsgi-script
|
- name: wsgi-script
|
||||||
mountPath: "/opt/app-root/src/deploy"
|
mountPath: "/opt/app-root/src/deploy"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -66,7 +66,7 @@ spec:
|
||||||
# readOnly: true
|
# readOnly: true
|
||||||
env:
|
env:
|
||||||
- name: MM2_CONFIG
|
- name: MM2_CONFIG
|
||||||
value: "/etc/mirrormanager/mm.cfg"
|
value: "/etc/mirrormanager/mirrormanager2.cfg"
|
||||||
- name: APP_MODULE
|
- name: APP_MODULE
|
||||||
value: "deploy.wsgi"
|
value: "deploy.wsgi"
|
||||||
- name: APP_CONFIG
|
- name: APP_CONFIG
|
||||||
|
@ -92,9 +92,9 @@ spec:
|
||||||
- name: secrets
|
- name: secrets
|
||||||
secret:
|
secret:
|
||||||
secretName: secrets
|
secretName: secrets
|
||||||
- name: statistics
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: statistics
|
claimName: data
|
||||||
- name: wsgi-script
|
- name: wsgi-script
|
||||||
configMap:
|
configMap:
|
||||||
name: wsgi-script
|
name: wsgi-script
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: statistics
|
name: data
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
|
|
|
@ -11,8 +11,8 @@ items:
|
||||||
labels:
|
labels:
|
||||||
app: mirrormanager
|
app: mirrormanager
|
||||||
data:
|
data:
|
||||||
mm.cfg: |-
|
mirrormanager2.cfg: |-
|
||||||
{{ load_file('mm.cfg.py') | indent(6) }}
|
{{ load_file('mirrormanager2.cfg.py') | indent(6) }}
|
||||||
gunicorn.conf.py: |-
|
gunicorn.conf.py: |-
|
||||||
{{ load_file('gunicorn.conf.py') | indent(6) }}
|
{{ load_file('gunicorn.conf.py') | indent(6) }}
|
||||||
- apiVersion: v1
|
- 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
|
# This is the directory the code enabled by SHOW_STATISTICS will use
|
||||||
# to locate the statistics files and display them.
|
# 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.
|
# Countries which have to be excluded.
|
||||||
EMBARGOED_COUNTRIES = ['CU', 'IR', 'KP', 'SD', 'SY']
|
EMBARGOED_COUNTRIES = ['CU', 'IR', 'KP', 'SD', 'SY']
|
||||||
|
@ -98,7 +98,10 @@ EMBARGOED_COUNTRIES = ['CU', 'IR', 'KP', 'SD', 'SY']
|
||||||
# SHOW_PROPAGATION = True
|
# SHOW_PROPAGATION = True
|
||||||
|
|
||||||
# Where to look for the above mentioned propagation images.
|
# 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
|
# Disable master rsync server ACL
|
||||||
# Fedora does not use it and therefore it is set to False
|
# Fedora does not use it and therefore it is set to False
|
Loading…
Add table
Add a link
Reference in a new issue