From: Alfredo Deza Date: Thu, 25 Jul 2013 15:27:50 +0000 (-0400) Subject: remove all install functions from ceph_deploy.install X-Git-Tag: v1.2~22^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f2bd1b6db3ee5cf4384486e823d97d664bc0459;p=ceph-deploy.git remove all install functions from ceph_deploy.install Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index 5843884..17eeae0 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -23,62 +23,6 @@ def check_ceph_installed(): lsb_release_path, _ = process.communicate() return process.wait() -def install_suse(release, codename, version_kind, version): - import platform - import subprocess - - if version_kind in ['stable', 'testing']: - key = 'release' - else: - key = 'autobuild' - - if codename == 'Mantis': - distro='opensuse12' - else: - distro='sles-11sp2' - - subprocess.check_call( - args='su -c \'rpm --import "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/{key}.asc"\''.format(key=key), - shell=True, - ) - - if version_kind == 'stable': - url = 'http://ceph.com/rpm-{version}/{distro}/'.format( - version=version, - distro=distro, - ) - elif version_kind == 'testing': - url = 'http://ceph.com/rpm-testing/{distro}'.format(distro=distro) - elif version_kind == 'dev': - url = 'http://gitbuilder.ceph.com/ceph-rpm-{distro}{release}-{machine}-basic/ref/{version}/'.format( - distro=distro, - release=release.split(".",1)[0], - machine=platform.machine(), - version=version, - ) - - subprocess.check_call( - args=[ - 'rpm', - '-Uvh', - '--replacepkgs', - '--force', - '--quiet', - '{url}noarch/ceph-release-1-0.noarch.rpm'.format( - url=url, - ), - ] - ) - - subprocess.check_call( - args=[ - 'zypper', - '--non-interactive', - '--quiet', - 'install', - 'ceph', - ], - ) def uninstall_suse(arg_purge=False): import subprocess @@ -122,59 +66,6 @@ def uninstall_debian(arg_purge=False): args.extend(packages) subprocess.check_call(args=args) -def install_fedora(release, codename, version_kind, version): - import platform - import subprocess - - if version_kind in ['stable', 'testing']: - key = 'release' - else: - key = 'autobuild' - - subprocess.check_call( - args='su -c \'rpm --import "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/{key}.asc"\''.format(key=key), - shell=True, - ) - - if version_kind == 'stable': - url = 'http://ceph.com/rpm-{version}/fc{release}/'.format( - version=version, - release=release, - ) - elif version_kind == 'testing': - url = 'http://ceph.com/rpm-testing/fc{release}'.format( - release=release, - ) - elif version_kind == 'dev': - url = 'http://gitbuilder.ceph.com/ceph-rpm-fc{release}-{machine}-basic/ref/{version}/'.format( - release=release.split(".",1)[0], - machine=platform.machine(), - version=version, - ) - - subprocess.check_call( - args=[ - 'rpm', - '-Uvh', - '--replacepkgs', - '--force', - '--quiet', - '{url}noarch/ceph-release-1-0.fc{release}.noarch.rpm'.format( - url=url, - release=release, - ), - ] - ) - - subprocess.check_call( - args=[ - 'yum', - '-y', - '-q', - 'install', - 'ceph', - ], - ) def uninstall_fedora(arg_purge=False): import subprocess @@ -192,55 +83,6 @@ def uninstall_fedora(arg_purge=False): args.extend(packages) subprocess.check_call(args=args) -def install_centos(release, codename, version_kind, version): - import platform - import subprocess - - if version_kind in ['stable', 'testing']: - key = 'release' - else: - key = 'autobuild' - - subprocess.check_call( - args='su -c \'rpm --import "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/{key}.asc"\''.format(key=key), - shell=True, - ) - - if version_kind == 'stable': - url = 'http://ceph.com/rpm-{version}/el6/'.format( - version=version, - ) - elif version_kind == 'testing': - url = 'http://ceph.com/rpm-testing/' - elif version_kind == 'dev': - url = 'http://gitbuilder.ceph.com/ceph-rpm-centos{release}-{machine}-basic/ref/{version}/'.format( - release=release.split(".",1)[0], - machine=platform.machine(), - version=version, - ) - - subprocess.check_call( - args=[ - 'rpm', - '-Uvh', - '--replacepkgs', - '--force', - '--quiet', - '{url}noarch/ceph-release-1-0.el6.noarch.rpm'.format( - url=url, - ), - ] - ) - - subprocess.check_call( - args=[ - 'yum', - '-y', - '-q', - 'install', - 'ceph', - ], - ) def uninstall_centos(arg_purge=False): import subprocess @@ -281,71 +123,6 @@ def uninstall_debian(arg_purge=False): args.extend(packages) subprocess.check_call(args=args) -def install_debian(release, codename, version_kind, version): - import platform - import subprocess - - if version_kind in ['stable', 'testing']: - key = 'release' - else: - key = 'autobuild' - - subprocess.check_call( - args='wget -q -O- \'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/{key}.asc\' | apt-key add -'.format(key=key), - shell=True, - ) - - if version_kind == 'stable': - url = 'http://ceph.com/debian-{version}/'.format( - version=version, - ) - elif version_kind == 'testing': - url = 'http://ceph.com/debian-testing/' - elif version_kind == 'dev': - url = 'http://gitbuilder.ceph.com/ceph-deb-{codename}-{machine}-basic/ref/{version}'.format( - codename=codename, - machine=platform.machine(), - version=version, - ) - else: - raise RuntimeError('Unknown version kind: %r' % version_kind) - - with file('/etc/apt/sources.list.d/ceph.list', 'w') as f: - f.write('deb {url} {codename} main\n'.format( - url=url, - codename=codename, - )) - - subprocess.check_call( - args=[ - 'apt-get', - '-q', - 'update', - ], - ) - - # TODO this does not downgrade -- should it? - subprocess.check_call( - args=[ - 'env', - 'DEBIAN_FRONTEND=noninteractive', - 'DEBIAN_PRIORITY=critical', - 'apt-get', - '-q', - '-o', 'Dpkg::Options::=--force-confnew', - 'install', - '--no-install-recommends', - '--assume-yes', - '--', - 'ceph', - 'ceph-mds', - 'ceph-common', - 'ceph-fs-common', - # ceph only recommends gdisk, make sure we actually have - # it; only really needed for osds, but minimal collateral - 'gdisk', - ], - ) def purge_data_any(): import subprocess