]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: implement 'install' command
authorSage Weil <sage@redhat.com>
Sun, 15 Mar 2020 13:51:51 +0000 (08:51 -0500)
committerSage Weil <sage@redhat.com>
Mon, 16 Mar 2020 13:24:36 +0000 (08:24 -0500)
This was present, but a no-op.

By default, install cephadm.

Optionally take a list of packages to install instead (e.g., ceph-common).

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephadm/test_repos.sh
src/cephadm/cephadm

index 0088aa0beebe551226d9c3089f0da131299d2fc5..b4097bc6b6a590641cecd5724bf3355401f9d8a0 100755 (executable)
@@ -10,10 +10,13 @@ CEPHADM=${CEPHADM_SRC_DIR}/cephadm
 function test_install_uninstall() {
     ( sudo apt update && \
          sudo apt -y install cephadm && \
+         sudo $CEPHADM install && \
          sudo apt -y remove cephadm ) || \
        ( sudo yum -y install cephadm && \
+             sudo $CEPHADM install && \
              sudo yum -y remove cephadm ) || \
        ( sudo dnf -y install cephadm && \
+             sudo $CEPHADM install && \
              sudo dnf -y remove cephadm )
 }
 
index fa74cc81bfa3dcf30f7ce405fe6fbf0b4e76013e..79b761720b696dcf7ebaa5b49d178c90a445d27f 100755 (executable)
@@ -3621,7 +3621,8 @@ def command_rm_repo():
     pkg.rm_repo()
 
 def command_install():
-    pass
+    pkg = create_packager()
+    pkg.install(args.packages)
 
 ##################################
 
@@ -4019,6 +4020,10 @@ def _get_parser():
     parser_install = subparsers.add_parser(
         'install', help='install ceph package(s)')
     parser_install.set_defaults(func=command_install)
+    parser_install.add_argument(
+        'packages', nargs='*',
+        default=['cephadm'],
+        help='packages')
 
     return parser