]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
install: install ceph-mgr
authorSage Weil <sage@redhat.com>
Fri, 10 Mar 2017 21:48:35 +0000 (16:48 -0500)
committerSage Weil <sage@redhat.com>
Fri, 17 Mar 2017 15:32:27 +0000 (11:32 -0400)
Do this implicitly by installing the 'ceph' metapackage.  This way we can
still install older versions (e.g., jewel) that lack ceph-mgr without
any problems.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph_deploy/install.py
ceph_deploy/tests/test_install.py
ceph_deploy/util/constants.py

index 34fc76211d426f0e53d2a0a98bff7c696b650137..f7b19edba40875a4e28827e21b26000a6c87de93 100644 (file)
@@ -36,6 +36,7 @@ def detect_components(args, distro):
 
     * ceph
     * ceph-mon
+    * ceph-mgr
     * ceph-osd
     * ceph-mds
 
@@ -55,6 +56,7 @@ def detect_components(args, distro):
         'install_rgw': 'ceph-radosgw',
         'install_mds': 'ceph-mds',
         'install_mon': 'ceph-mon',
+        'install_mgr': 'ceph-mgr',
         'install_common': 'ceph-common',
         'install_tests': 'ceph-test',
     }
@@ -492,6 +494,13 @@ def make(parser):
         help='install the mon component only',
     )
 
+    parser.add_argument(
+        '--mgr',
+        dest='install_mgr',
+        action='store_true',
+        help='install the mgr component only',
+    )
+
     parser.add_argument(
         '--mds',
         dest='install_mds',
index a8bd3265f2fadfe77490c004d55693b6533e8e47..2d62bacd3303d10521cd08a1eab78eeedb1d04bb 100644 (file)
@@ -45,6 +45,7 @@ class TestDetectComponents(object):
         # default values for install_* flags
         self.args.install_all = False
         self.args.install_mds = False
+        self.args.install_mgr = False
         self.args.install_mon = False
         self.args.install_osd = False
         self.args.install_rgw = False
@@ -64,7 +65,7 @@ class TestDetectComponents(object):
         self.distro.is_deb = True
         result = sorted(install.detect_components(self.args, self.distro))
         assert result == sorted([
-            'ceph-osd', 'ceph-mds', 'ceph-mon', 'radosgw'
+            'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'radosgw'
         ])
 
     def test_install_all_with_other_options_returns_all_packages_deb(self):
@@ -72,28 +73,30 @@ class TestDetectComponents(object):
         self.distro.is_deb = True
         self.args.install_all = True
         self.args.install_mds = True
+        self.args.install_mgr = True
         self.args.install_mon = True
         self.args.install_osd = True
         result = sorted(install.detect_components(self.args, self.distro))
         assert result == sorted([
-            'ceph-osd', 'ceph-mds', 'ceph-mon', 'radosgw'
+            'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'radosgw'
         ])
 
     def test_install_all_returns_all_packages_rpm(self):
         self.args.install_all = True
         result = sorted(install.detect_components(self.args, self.distro))
         assert result == sorted([
-            'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw'
+            'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'ceph-radosgw'
         ])
 
     def test_install_all_with_other_options_returns_all_packages_rpm(self):
         self.args.install_all = True
         self.args.install_mds = True
         self.args.install_mon = True
+        self.args.install_mgr = True
         self.args.install_osd = True
         result = sorted(install.detect_components(self.args, self.distro))
         assert result == sorted([
-            'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw'
+            'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'ceph-radosgw'
         ])
 
     def test_install_only_one_component(self):
@@ -104,8 +107,9 @@ class TestDetectComponents(object):
     def test_install_a_couple_of_components(self):
         self.args.install_osd = True
         self.args.install_mds = True
+        self.args.install_mgr = True
         result = sorted(install.detect_components(self.args, self.distro))
-        assert result == sorted(['ceph-osd', 'ceph-mds'])
+        assert result == sorted(['ceph-osd', 'ceph-mds', 'ceph-mgr'])
 
     def test_install_tests(self):
         self.args.install_tests = True
@@ -115,5 +119,5 @@ class TestDetectComponents(object):
     def test_install_all_should_be_default_when_no_options_passed(self):
         result = sorted(install.detect_components(self.args, self.distro))
         assert result == sorted([
-            'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw'
+            'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'ceph-radosgw'
         ])
index 74833b7dcb899c88c0017b25bb0d3deccb444e03..65775d9b093655a461d316f90c2b75d0a5032ada 100644 (file)
@@ -11,12 +11,15 @@ tmp_path = join(base_path, 'tmp')
 
 mon_path = join(base_path, 'mon')
 
+mgr_path = join(base_path, 'mgr')
+
 mds_path = join(base_path, 'mds')
 
 osd_path = join(base_path, 'osd')
 
 # Default package components to install
 _base_components = [
+    'ceph',
     'ceph-osd',
     'ceph-mds',
     'ceph-mon',