Mirrormanager: specify the SSH key for the sync
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
c9f097dce0
commit
e5533b2f3d
2 changed files with 6 additions and 3 deletions
|
@ -66,7 +66,7 @@ spec:
|
|||
containers:
|
||||
- name: mirrormanager
|
||||
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
||||
command: ["mm2_get-netblocks", "global", "/data/global_netblocks.txt"]
|
||||
command: ["mm2_get-netblocks", "--debug", "global", "/data/global_netblocks.txt"]
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/etc/mirrormanager"
|
||||
|
@ -105,7 +105,7 @@ spec:
|
|||
containers:
|
||||
- name: mirrormanager
|
||||
image: image-registry.openshift-image-registry.svc:5000/mirrormanager/mirrormanager2:latest
|
||||
command: ["mm2_get-netblocks", "internet2", "/data/i2_netblocks.txt"]
|
||||
command: ["mm2_get-netblocks", "--debug", "internet2", "/data/i2_netblocks.txt"]
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/etc/mirrormanager"
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
MIRRORLIST_PROXY="{% for host in groups['mirrorlist_proxies'] %} {{ host }} {% endfor %}"
|
||||
MM_USER=mirrormanager
|
||||
MM_ROOT=/opt/app-root
|
||||
MM_SSH_KEY=/etc/mirrormanager-ssh/ssh_mirrorlist_proxies.key
|
||||
CACHEDIR=/data
|
||||
|
||||
set -e
|
||||
|
@ -20,9 +22,10 @@ ${MM_ROOT}/bin/generate-mirrorlist-cache -o ${CACHEDIR}/mirrorlist_cache.proto
|
|||
{% if env == 'production' %}
|
||||
for server in ${MIRRORLIST_PROXY}; do
|
||||
rsync -az --delete-delay --delay-updates --delete \
|
||||
-e "ssh -i ${MM_SSH_KEY}" \
|
||||
${MM_ROOT}/src/utility/country_continent.csv \
|
||||
${CACHEDIR}/mirrorlist_cache.proto \
|
||||
${CACHEDIR}/*.txt \ # Netblocks
|
||||
${server}:/srv/mirrorlist/data/mirrorlist1/ &
|
||||
${MM_USER}@${server}:/srv/mirrorlist/data/mirrorlist1/ &
|
||||
done
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue