From 59c84f63c4864a02f85fc6680bc1b562d049336d Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 5 Dec 2013 11:58:08 -0500 Subject: [PATCH] add a --local--mirror flag for install Signed-off-by: Alfredo Deza --- ceph_deploy/install.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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='?', -- 2.47.3