38a9cb4a1c
Like the centos mirror, we'll be using rsync for the EPEL mirror. This will be used by centos-7 nodes. Change-Id: Ifb9f539b20558ef4464616d56259cf1355eff901 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/bash -xe
|
|
# Copyright 2016 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
MIRROR_VOLUME=$1
|
|
|
|
BASE="/afs/.openstack.org/mirror/epel"
|
|
MIRROR="rsync://mirror.math.princeton.edu/pub"
|
|
K5START="k5start -t -f /etc/epel.keytab service/epel-mirror -- timeout -k 2m 30m"
|
|
|
|
REPO=7
|
|
if ! [ -f $BASE/$REPO ]; then
|
|
$K5START mkdir -p $BASE/$REPO
|
|
fi
|
|
|
|
echo "Running rsync..."
|
|
$K5START rsync -rlptDvz \
|
|
--delete \
|
|
--delete-excluded \
|
|
--exclude="SRPMS" \
|
|
--exclude="ppc64" \
|
|
--exclude="ppc64le" \
|
|
--exclude="x86_64/debug" \
|
|
--exclude="x86_64/repoview" \
|
|
$MIRROR/epel/$REPO/ $BASE/$REPO/
|
|
|
|
# TODO(pabelanger): Validate rsync process
|
|
|
|
echo "rsyc completed successfully, running vos release."
|
|
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
|
|
|
|
echo "Done."
|