From: Alfredo Deza Date: Thu, 5 Dec 2013 16:58:08 +0000 (-0500) Subject: add a --local--mirror flag for install X-Git-Tag: v1.5.0~10^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=59c84f63c4864a02f85fc6680bc1b562d049336d;p=ceph-deploy.git add a --local--mirror flag for install Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index f7fbcca..2ca27c8 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -56,6 +56,12 @@ def install(args): LOG.warning('using GPG fallback: %s', gpg_fallback) gpg_url = gpg_fallback + if args.local_mirror: + from .lib.remoto import rsync + rsync(hostname, args.local_mirror, '/opt/ceph-deploy/repo', distro.conn.logger, sudo=True) + repo_url = 'file:///opt/ceph-deploy/repo' + gpg_url = 'file:///opt/ceph-deploy/repo/release.asc' + if repo_url: # triggers using a custom repository # the user used a custom repo url, this should override anything # we can detect from the configuration, so warn about it @@ -366,6 +372,14 @@ def make(parser): help='hosts to install on', ) + parser.add_argument( + '--local-mirror', + nargs='?', + const='URL', + default=None, + help='Fetch packages and push them to hosts for a local repo mirror', + ) + parser.add_argument( '--repo-url', nargs='?',