MM: restore the download of the GeoIP DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
2bdda44feb
commit
c7e3a33aa0
4 changed files with 60 additions and 76 deletions
|
@ -111,10 +111,6 @@
|
||||||
objectname: deploymentconfig.yml
|
objectname: deploymentconfig.yml
|
||||||
|
|
||||||
# Cron jobs
|
# Cron jobs
|
||||||
# - role: openshift/object
|
|
||||||
# app: mirrormanager
|
|
||||||
# file: cron.yml
|
|
||||||
# objectname: cron.yml
|
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: mirrormanager
|
app: mirrormanager
|
||||||
template: cron-crawler.yml
|
template: cron-crawler.yml
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
#
|
|
||||||
# Propagation
|
|
||||||
#
|
|
||||||
---
|
|
||||||
apiVersion: batch/v1
|
|
||||||
kind: CronJob
|
|
||||||
metadata:
|
|
||||||
name: propagation-check
|
|
||||||
spec:
|
|
||||||
successfulJobsHistoryLimit: 3
|
|
||||||
failedJobsHistoryLimit: 3
|
|
||||||
concurrencyPolicy: Forbid
|
|
||||||
schedule: "27 */2 * * *"
|
|
||||||
startingDeadlineSeconds: 500
|
|
||||||
jobTemplate:
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
restartPolicy: Never
|
|
||||||
containers:
|
|
||||||
- name: mirrormanager
|
|
||||||
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
|
||||||
command:
|
|
||||||
- "mm2_crawler"
|
|
||||||
- "--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
|
|
||||||
securityContext:
|
|
||||||
supplementalGroups: [1001280000]
|
|
||||||
# ---
|
|
||||||
# apiVersion: batch/v1
|
|
||||||
# kind: CronJob
|
|
||||||
# metadata:
|
|
||||||
# name: sync-crawler-logs
|
|
||||||
# spec:
|
|
||||||
# successfulJobsHistoryLimit: 3
|
|
||||||
# failedJobsHistoryLimit: 3
|
|
||||||
# concurrencyPolicy: Forbid
|
|
||||||
# schedule: "55 * * * *"
|
|
||||||
# startingDeadlineSeconds: 500
|
|
||||||
# jobTemplate:
|
|
||||||
# spec:
|
|
||||||
# template:
|
|
||||||
# spec:
|
|
||||||
# restartPolicy: Never
|
|
||||||
# containers:
|
|
||||||
# - name: mirrormanager
|
|
||||||
# image: mirrormanager2:latest
|
|
||||||
# command: ["bash", "/opt/scripts/sync-crawler-logs.sh"]
|
|
||||||
# volumeMounts:
|
|
||||||
# - name: config
|
|
||||||
# mountPath: "/etc/mirrormanager"
|
|
||||||
# readOnly: true
|
|
||||||
# - name: scripts
|
|
||||||
# mountPath: "/opt/scripts"
|
|
||||||
# readOnly: true
|
|
||||||
# volumes:
|
|
||||||
# - name: config
|
|
||||||
# configMap:
|
|
||||||
# name: config
|
|
||||||
# - name: scripts
|
|
||||||
# configMap:
|
|
||||||
# name: scripts
|
|
|
@ -1,4 +1,21 @@
|
||||||
---
|
---
|
||||||
|
# Right now this only contains the downloaded GeoIP database, less than 100Mb. Feel free to downsize if needed.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
storageClassName: ocs-storagecluster-cephfs
|
||||||
|
---
|
||||||
|
# This contains:
|
||||||
|
# - the extracted netblocks, around 30Mb
|
||||||
|
# - the mirrorlist cache, around 300Mb
|
||||||
|
# - the previous version of all that in an old/ directory
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -35,8 +35,51 @@ spec:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: "/etc/mirrormanager"
|
mountPath: "/etc/mirrormanager"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: data
|
||||||
|
mountPath: "/var/lib/mirrormanager"
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
name: config
|
name: config
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: data
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
#
|
||||||
|
### Download GeoIP database
|
||||||
|
#
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: download-geoip-db
|
||||||
|
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
|
||||||
|
securityContext:
|
||||||
|
supplementalGroups: [1001280000]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue