]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: refactor installation method 1741/head
authorSébastien Han <seb@redhat.com>
Thu, 3 Aug 2017 13:30:25 +0000 (15:30 +0200)
committerSébastien Han <seb@redhat.com>
Wed, 30 Aug 2017 08:52:01 +0000 (10:52 +0200)
The installation process is now described as follow:

* you still have to choose a 'ceph_origin' installation method. The
origin can be a 'repository' (add a new repository), distro (it will use
the packages provided by the native repo source of your distribution),
local (only available on redhat system, it installs locally built
packages). This option is not well tested, so use it carefully

* if ceph_origin == 'repository' you will have to decide what kind of
repository you want to enable:
  - community: corresponds to the stable upstream/community version
  - enterprise: corresponds to the stable enterprise/downstream version
    (basically you are a red hat customer)
  - dev: it will install ceph from packages built out of the github
    development branches

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
56 files changed:
docs/source/index.rst
docs/source/installation/methods.rst [new file with mode: 0644]
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
rhcs_edits.txt
roles/ceph-common/tasks/checks/check_mandatory_vars.yml
roles/ceph-common/tasks/checks/check_system.yml
roles/ceph-common/tasks/installs/configure_debian_repository_installation.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/debian_ceph_repository.yml [deleted file]
roles/ceph-common/tasks/installs/debian_community_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/debian_custom_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/debian_dev_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/debian_enterprise_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/debian_uca_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/install_debian_enterprise_packages.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/install_debian_packages.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/install_on_debian.yml
roles/ceph-common/tasks/installs/install_on_redhat.yml
roles/ceph-common/tasks/installs/install_redhat_packages.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml [deleted file]
roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml [deleted file]
roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install_debian.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/prerequisite_rhcs_iso_install.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/redhat_ceph_repository.yml [deleted file]
roles/ceph-common/tasks/installs/redhat_community_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/redhat_custom_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/redhat_dev_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/redhat_enterprise_repository.yml [new file with mode: 0644]
roles/ceph-common/tasks/main.yml
roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install.yml [deleted file]
roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install_debian.yml [deleted file]
roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_iso_install.yml [deleted file]
roles/ceph-config/tasks/main.yml
roles/ceph-defaults/defaults/main.yml
tests/functional/centos/7/bluestore/group_vars/all
tests/functional/centos/7/bs-crypt-ded-jrn/group_vars/all
tests/functional/centos/7/bs-crypt-jrn-col/group_vars/all
tests/functional/centos/7/bs-dock-crypt-jrn-col/group_vars/all
tests/functional/centos/7/bs-dock-ded-jrn/group_vars/all
tests/functional/centos/7/bs-docker/group_vars/all
tests/functional/centos/7/bs-jrn-col/group_vars/all
tests/functional/centos/7/cluster/group_vars/all
tests/functional/centos/7/crypt-ded-jrn/group_vars/all
tests/functional/centos/7/crypt-jrn-col/group_vars/all
tests/functional/centos/7/docker-crypt-jrn-col/group_vars/all
tests/functional/centos/7/docker-ded-jrn/group_vars/all
tests/functional/centos/7/docker/group_vars/all
tests/functional/centos/7/docker/hosts
tests/functional/centos/7/jrn-col/group_vars/all
tests/functional/dev_setup.yml
tests/functional/rhcs_setup.yml
tests/functional/ubuntu/16.04/cluster/group_vars/all
tox.ini

index 998827efdead619b65d5000fc48d714b55b428d8..1d4d2c85549f21fe93e049ac2a0b5b8dcccc9340 100644 (file)
@@ -5,6 +5,7 @@
 
 ceph-ansible
 ============
+
 Ansible playbooks for Ceph, the distributed filesystem.
 
 
@@ -42,6 +43,7 @@ The ``master`` branch should be considered experimental and used with caution.
 
 Configuration and Usage
 =======================
+
 This project assumes you have a basic knowledge of how ansible works and have already prepared your hosts for
 configuration by ansible.
 
@@ -85,6 +87,15 @@ appropriate for your cluster setup. Perform the following steps to prepare your
    It's important the playbook you use is placed at the root of the ``ceph-ansible`` project. This is how ansible will be able to find the roles that
    ``ceph-ansible`` provides.
 
+ceph-ansible - choose installation method
+-----------------------------------------
+
+Ceph can be installed through several methods.
+
+.. toctree::
+   :maxdepth: 1
+
+   installation/methods
 
 ceph-ansible Configuration
 --------------------------
@@ -106,32 +117,26 @@ at the end of the filename, uncomment the options you wish to change and provide
 An example configuration that deploys the upstream ``jewel`` version of ceph with OSDs that have collocated journals would look like this in ``group_vars/all.yml``::
 
 
-    ceph_stable: True
+    ceph_origin: repository
+    ceph_repository: community
     ceph_stable_release: jewel
     public_network: "192.168.3.0/24"
     cluster_network: "192.168.4.0/24"
     monitor_interface: eth1
-    journal_size: 100
-    osd_objectstore: "filestore"
     devices:
       - '/dev/sda'
       - '/dev/sdb'
     osd_scenario: collocated
-    # use this to set your PG config for the cluster
-    ceph_conf_overrides:
-      global:
-        osd_pool_default_pg_num: 8
-        osd_pool_default_size: 1
 
 The following config options are required to be changed on all installations but there could be other required options depending on your OSD scenario
 selection or other aspects of your cluster.
 
+- ``ceph_origin``
 - ``ceph_stable_release``
-- ``ceph_stable`` or ``ceph_rhcs`` or ``ceph_dev``
 - ``public_network``
 - ``osd_scenario``
-- ``journal_size``
 - ``monitor_interface`` or ``monitor_address``
+- ``radosgw_interface`` or ``radosgw_address``
 
 ceph.conf Configuration
 -----------------------
@@ -166,7 +171,7 @@ by setting the ``osd_scenario`` configuration option.
    :maxdepth: 1
 
    osds/scenarios
-    
+
 Contribution
 ============
 
diff --git a/docs/source/installation/methods.rst b/docs/source/installation/methods.rst
new file mode 100644 (file)
index 0000000..c62f1e3
--- /dev/null
@@ -0,0 +1,68 @@
+Installation methods
+====================
+
+The following are all of the available options for the installing Ceph through different channels.
+We support 3 main installation methods, all managed by the ``ceph_origin`` variable:
+
+- ``repository``: means that you will get ceph installed through a new repository. Later below choose between ``community``, ``rhcs`` or ``dev``. These options will be exposed through the ``ceph_repository`` variable.
+- ``distro``: means that no separate repo file will be added and you will get whatever version of Ceph is included in your Linux distro.
+- ``local``: means that the ceph binaries will be copied over from the local machine (not well tested, use at your own risk)
+
+Origin: Repository
+------------------
+
+If ``ceph_origin`` is set to ``repository``, you now have the choice between a couple of repositories controlled by the ``ceph_repository`` option:
+
+- ``community``: fetches packages from http://download.ceph.com, the official community Ceph repositories
+- ``rhcs``: means you are a Red Hat customer, additionally you will have to select a repository type through ``ceph_repository_type`` (``cdn`` or ``iso``)
+- ``dev``: fetches packages from shaman, a gitbuilder based package system
+- ``uca``: fetches packages from Ubuntu Cloud Archive
+- ``custom``: fetches packages from a specific repository
+
+Community repository
+~~~~~~~~~~~~~~~~~~~~
+
+If ``ceph_repository`` is set to ``community``, packages you will be by default installed from http://download.ceph.com, this can be changed by tweaking ``ceph_mirror``.
+Final step is to select which Ceph release you want to install, for this you have to set ``ceph_stable_release`` accordingly.
+For example, ``ceph_stable_release: luminous``.
+
+RHCS repository
+~~~~~~~~~~~~~~~
+
+RHCS is the Red Hat Ceph Storage product from Red Hat, the enterprise version of Ceph.
+If ``ceph_repository`` is set to ``rhcs``, packages you will be installed from Red Hat sources.
+
+Additionally you will have to select a repository type through ``ceph_repository_type``, it can be ``cdn`` or ``iso``.
+To choose a specific version of RHCS you can set the ``ceph_rhcs_version`` variable accordingly, e.g: ``ceph_rhcs_version: 2``.
+
+UCA repository
+~~~~~~~~~~~~~~
+
+If ``ceph_repository`` is set to ``uca``, packages you will be by default installed from http://ubuntu-cloud.archive.canonical.com/ubuntu, this can be changed by tweaking ``ceph_stable_repo_uca``.
+You can also decide which OpenStack version the Ceph packages should come from by tweaking ``ceph_stable_openstack_release_uca``.
+For example, ``ceph_stable_openstack_release_uca: liberty``.
+
+Dev repository
+~~~~~~~~~~~~~~
+
+If ``ceph_repository`` is set to ``dev``, packages you will be by default installed from https://shaman.ceph.com/, this can not be tweaked.
+You can obviously decide which branch to install with the help of  ``ceph_dev_branch`` (defaults to 'master').
+Additionally, you can specify a SHA1 with ``ceph_dev_sha1``, defaults to 'latest' (as in latest built).
+
+Custom repository
+~~~~~~~~~~~~~~~~~
+
+If ``ceph_repository`` is set to ``custom``, packages you will be by default installed from a desired repository.
+This repository is specifie with ``ceph_custom_repo``, e.g: ``ceph_custom_repo: https://server.domain.com/ceph-custom-repo``.
+
+
+Origin: Distro
+--------------
+
+If ``ceph_origin`` is set to ``distro``, no separate repo file will be added and you will get whatever version of Ceph is included in your Linux distro.
+
+
+Origin: Local
+-------------
+
+If ``ceph_origin`` is set to ``local``, the ceph binaries will be copied over from the local machine (not well tested, use at your own risk)
index de1113419bd946ed8cef02be0bc7e4a3495d0107..b8a538dca290c2ca2ce047c90d137945eb5e2790 100644 (file)
@@ -13,6 +13,22 @@ dummy:
 # GENERAL #
 ###########
 
+######################################
+# Releases name to number dictionary #
+######################################
+#ceph_release_num:
+#  dumpling: 0.67
+#  emperor: 0.72
+#  firefly: 0.80
+#  giant: 0.87
+#  hammer: 0.94
+#  infernalis: 9
+#  jewel: 10
+#  kraken: 11
+#  luminous: 12
+#  mimic: 13
+
+# Directory to fetch cluster fsid, keys etc...
 #fetch_directory: fetch/
 
 # The 'cluster' variable determines the name of the cluster.
@@ -26,16 +42,7 @@ dummy:
 # With that you will be able to run "ceph health" normally
 #cluster: ceph
 
-###########
-# INSTALL #
-###########
-
-# Set uid/gid to default '64045' for bootstrap directories.
-# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
-# These values have to be set according to the base OS used by the container image, NOT the host.
-#bootstrap_dirs_owner: "64045"
-#bootstrap_dirs_group: "64045"
-
+# Inventory host group variables
 #mon_group_name: mons
 #osd_group_name: osds
 #rgw_group_name: rgws
@@ -53,13 +60,10 @@ dummy:
 # want to set this to False to skip those checks.
 #check_firewall: False
 
-# This variable determines if ceph packages can be updated.  If False, the
-# package resources will use "state=present".  If True, they will use
-# "state=latest".
-#upgrade_ceph_packages: False
-
-# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
 
+############
+# PACKAGES #
+############
 #debian_package_dependencies:
 #  - python-pycurl
 #  - hdparm
@@ -76,69 +80,78 @@ dummy:
 #  - hdparm
 #  - python-setuptools
 
+# Whether or not to install the ceph-test package.
+#ceph_test: false
+
 # Enable the ntp service by default to avoid clock skew on
 # ceph nodes
 #ntp_service_enabled: true
 
-# Whether or not to install the ceph-test package.
-#ceph_test: False
+# Set uid/gid to default '64045' for bootstrap directories.
+# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
+# These values have to be set according to the base OS used by the container image, NOT the host.
+#bootstrap_dirs_owner: "64045"
+#bootstrap_dirs_group: "64045"
+
+# This variable determines if ceph packages can be updated.  If False, the
+# package resources will use "state=present".  If True, they will use
+# "state=latest".
+#upgrade_ceph_packages: False
+
+#ceph_use_distro_backports: false # DEBIAN ONLY
+
+
+###########
+# INSTALL #
+###########
+
 
-## Configure package origin
+# ORIGIN SOURCE
 #
-#ceph_origin: 'upstream' # or 'distro' or 'local'
-# 'distro' means that no separate repo file will be added
-# you will get whatever version of Ceph is included in your Linux distro.
+# Choose between:
+# - 'repository' means that you will get ceph installed through a new repository. Later below choose between 'community', 'rhcs' or 'dev'
+# - 'distro' means that no separate repo file will be added
+#  you will get whatever version of Ceph is included in your Linux distro.
 # 'local' means that the ceph binaries will be copied over from the local machine
+#ceph_origin: 'dummy'
+#valid_ceph_origins:
+#  - repository
+#  - distro
+#  - local
 
-# LOCAL CEPH INSTALLATION (ceph_origin==local)
-#
-# Path to DESTDIR of the ceph install
-#ceph_installation_dir: "/path/to/ceph_installation/"
-# Whether or not to use installer script rundep_installer.sh
-# This script takes in rundep and installs the packages line by line onto the machine
-# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
-# all runtime dependencies installed
-#use_installer: false
-# Root directory for ceph-ansible
-#ansible_dir: "/path/to/ceph-ansible"
 
-#ceph_use_distro_backports: false # DEBIAN ONLY
+#ceph_repository: dummy
+#valid_ceph_repository:
+#  - community
+#  - rhcs
+#  - dev
+#  - uca
+#  - custom
 
-# STABLE
-########
 
-# COMMUNITY VERSION
-#ceph_stable: false # use ceph stable branch
+# REPOSITORY: COMMUNITY VERSION
+#
+# Enabled when ceph_repository == 'community'
+#
 #ceph_mirror: http://download.ceph.com
 #ceph_stable_key: https://download.ceph.com/keys/release.asc
 #ceph_stable_release: dummy
 #ceph_stable_repo: "{{ ceph_mirror }}/debian-{{ ceph_stable_release }}"
 
-######################################
-# Releases name to number dictionary #
-######################################
-#ceph_release_num:
-#  dumpling: 0.67
-#  emperor: 0.72
-#  firefly: 0.80
-#  giant: 0.87
-#  hammer: 0.94
-#  infernalis: 9
-#  jewel: 10
-#  kraken: 11
-#  luminous: 12
-#  mimic: 13
-
 # Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
 # # for a list of available Debian distributions, visit http://download.ceph.com/debian-{{ ceph_stable_release }}/dists/
 # for more info read: https://github.com/ceph/ceph-ansible/issues/305
-#ceph_stable_distro_source:
+#ceph_stable_distro_source: "{{ ansible_lsb.codename }}"
 
 # This option is needed for _both_ stable and dev version, so please always fill the right version
 # # for supported distros, see http://download.ceph.com/rpm-{{ ceph_stable_release }}/
 #ceph_stable_redhat_distro: el7
 
-# ENTERPRISE VERSION RED HAT STORAGE (from 1.3)
+
+# REPOSITORY: RHCS VERSION RED HAT STORAGE (from 1.3)
+#
+# Enabled when ceph_repository == 'rhcs'
+#
 # This version is only supported on RHEL >= 7.1
 # As of RHEL 7.1, libceph.ko and rbd.ko are now included in Red Hat's kernel
 # packages natively. The RHEL 7.1 kernel packages are more stable and secure than
@@ -151,48 +164,64 @@ dummy:
 # on RHEL 7.
 #
 #
-# Backward compatibility of variable names
-# Commit 492518a2 changed variable names of rhcs installations
-# to not break backward compatiblity we re-declare these variables
-# with the content of the new variable
-#ceph_rhcs: "{{ ceph_stable_rh_storage | default(false) }}"
-# This will affect how/what repositories are enabled depending on the desired
-# version. The previous version was 1.3. The current version is 2.
 #ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(2) }}"
-#ceph_rhcs_cdn_install: "{{ ceph_stable_rh_storage_cdn_install | default(false) }}" # assumes all the nodes can connect to cdn.redhat.com
-#ceph_rhcs_cdn_debian_repo: https://customername:customerpasswd@rhcs.download.redhat.com
-#ceph_rhcs_iso_install: "{{ ceph_stable_rh_storage_iso_install | default(false) }}" # usually used when nodes don't have access to cdn.redhat.com
+#ceph_repository_type: dummy
+#valid_ceph_repository_type:
+#  - cdn
+#  - iso
 #ceph_rhcs_iso_path: "{{ ceph_stable_rh_storage_iso_path | default('') }}"
 #ceph_rhcs_mount_path: "{{ ceph_stable_rh_storage_mount_path | default('/tmp/rh-storage-mount') }}"
 #ceph_rhcs_repository_path: "{{ ceph_stable_rh_storage_repository_path | default('/tmp/rh-storage-repo') }}" # where to copy iso's content
 
 
-# UBUNTU CLOUD ARCHIVE
+# REPOSITORY: UBUNTU CLOUD ARCHIVE
+#
+# Enabled when ceph_repository == 'uca'
+#
 # This allows the install of Ceph from the Ubuntu Cloud Archive.  The Ubuntu Cloud Archive
 # usually has newer Ceph releases than the normal distro repository.
 #
-#ceph_stable_uca: false
+#
 #ceph_stable_repo_uca: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
 #ceph_stable_openstack_release_uca: liberty
 #ceph_stable_release_uca: "{{ansible_lsb.codename}}-updates/{{ceph_stable_openstack_release_uca}}"
 
-# DEV
-# ###
 
-#ceph_dev: false # use ceph development branch
+# REPOSITORY: DEV
+#
+# Enabled when ceph_repository == 'dev'
+#
 #ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack
 #ceph_dev_sha1: latest # distinct sha1 to use, defaults to 'latest' (as in latest built)
 
-# CUSTOM
-# ###
 
+
+# REPOSITORY: CUSTOM
+#
+# Enabled when ceph_repository == 'custom'
+#
 # Use a custom repository to install ceph.  For RPM, ceph_custom_repo should be
 # a URL to the .repo file to be installed on the targets.  For deb,
 # ceph_custom_repo should be the URL to the repo base.
-#ceph_custom: false # use custom ceph repository
+#
 #ceph_custom_repo: https://server.domain.com/ceph-custom-repo
 
 
+# ORIGIN: LOCAL CEPH INSTALLATION
+#
+# Enabled when ceph_repository == 'local'
+#
+# Path to DESTDIR of the ceph install
+#ceph_installation_dir: "/path/to/ceph_installation/"
+# Whether or not to use installer script rundep_installer.sh
+# This script takes in rundep and installs the packages line by line onto the machine
+# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
+# all runtime dependencies installed
+#use_installer: false
+# Root directory for ceph-ansible
+#ansible_dir: "/path/to/ceph-ansible"
+
+
 ######################
 # CEPH CONFIGURATION #
 ######################
index b2c98d2911f2a579d07424164bfe676912efd249..9b8aa0a1c19e1fd17e3e9ff8272fc8f3c38051d4 100644 (file)
@@ -13,6 +13,22 @@ dummy:
 # GENERAL #
 ###########
 
+######################################
+# Releases name to number dictionary #
+######################################
+#ceph_release_num:
+#  dumpling: 0.67
+#  emperor: 0.72
+#  firefly: 0.80
+#  giant: 0.87
+#  hammer: 0.94
+#  infernalis: 9
+#  jewel: 10
+#  kraken: 11
+#  luminous: 12
+#  mimic: 13
+
+# Directory to fetch cluster fsid, keys etc...
 fetch_directory: ~/ceph-ansible-keys
 
 # The 'cluster' variable determines the name of the cluster.
@@ -26,16 +42,7 @@ fetch_directory: ~/ceph-ansible-keys
 # With that you will be able to run "ceph health" normally
 #cluster: ceph
 
-###########
-# INSTALL #
-###########
-
-# Set uid/gid to default '64045' for bootstrap directories.
-# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
-# These values have to be set according to the base OS used by the container image, NOT the host.
-#bootstrap_dirs_owner: "64045"
-#bootstrap_dirs_group: "64045"
-
+# Inventory host group variables
 #mon_group_name: mons
 #osd_group_name: osds
 #rgw_group_name: rgws
@@ -53,13 +60,10 @@ fetch_directory: ~/ceph-ansible-keys
 # want to set this to False to skip those checks.
 #check_firewall: False
 
-# This variable determines if ceph packages can be updated.  If False, the
-# package resources will use "state=present".  If True, they will use
-# "state=latest".
-#upgrade_ceph_packages: False
-
-# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
 
+############
+# PACKAGES #
+############
 #debian_package_dependencies:
 #  - python-pycurl
 #  - hdparm
@@ -76,69 +80,78 @@ fetch_directory: ~/ceph-ansible-keys
 #  - hdparm
 #  - python-setuptools
 
+# Whether or not to install the ceph-test package.
+#ceph_test: false
+
 # Enable the ntp service by default to avoid clock skew on
 # ceph nodes
 #ntp_service_enabled: true
 
-# Whether or not to install the ceph-test package.
-#ceph_test: False
+# Set uid/gid to default '64045' for bootstrap directories.
+# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
+# These values have to be set according to the base OS used by the container image, NOT the host.
+#bootstrap_dirs_owner: "64045"
+#bootstrap_dirs_group: "64045"
+
+# This variable determines if ceph packages can be updated.  If False, the
+# package resources will use "state=present".  If True, they will use
+# "state=latest".
+#upgrade_ceph_packages: False
+
+#ceph_use_distro_backports: false # DEBIAN ONLY
+
+
+###########
+# INSTALL #
+###########
+
 
-## Configure package origin
+# ORIGIN SOURCE
 #
-#ceph_origin: 'upstream' # or 'distro' or 'local'
-# 'distro' means that no separate repo file will be added
-# you will get whatever version of Ceph is included in your Linux distro.
+# Choose between:
+# - 'repository' means that you will get ceph installed through a new repository. Later below choose between 'community', 'rhcs' or 'dev'
+# - 'distro' means that no separate repo file will be added
+#  you will get whatever version of Ceph is included in your Linux distro.
 # 'local' means that the ceph binaries will be copied over from the local machine
+ceph_origin: repository
+#valid_ceph_origins:
+#  - repository
+#  - distro
+#  - local
 
-# LOCAL CEPH INSTALLATION (ceph_origin==local)
-#
-# Path to DESTDIR of the ceph install
-#ceph_installation_dir: "/path/to/ceph_installation/"
-# Whether or not to use installer script rundep_installer.sh
-# This script takes in rundep and installs the packages line by line onto the machine
-# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
-# all runtime dependencies installed
-#use_installer: false
-# Root directory for ceph-ansible
-#ansible_dir: "/path/to/ceph-ansible"
 
-#ceph_use_distro_backports: false # DEBIAN ONLY
+ceph_repository: rhcs
+#valid_ceph_repository:
+#  - community
+#  - rhcs
+#  - dev
+#  - uca
+#  - custom
 
-# STABLE
-########
 
-# COMMUNITY VERSION
-#ceph_stable: false # use ceph stable branch
+# REPOSITORY: COMMUNITY VERSION
+#
+# Enabled when ceph_repository == 'community'
+#
 #ceph_mirror: http://download.ceph.com
 #ceph_stable_key: https://download.ceph.com/keys/release.asc
 #ceph_stable_release: dummy
 #ceph_stable_repo: "{{ ceph_mirror }}/debian-{{ ceph_stable_release }}"
 
-######################################
-# Releases name to number dictionary #
-######################################
-#ceph_release_num:
-#  dumpling: 0.67
-#  emperor: 0.72
-#  firefly: 0.80
-#  giant: 0.87
-#  hammer: 0.94
-#  infernalis: 9
-#  jewel: 10
-#  kraken: 11
-#  luminous: 12
-#  mimic: 13
-
 # Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
 # # for a list of available Debian distributions, visit http://download.ceph.com/debian-{{ ceph_stable_release }}/dists/
 # for more info read: https://github.com/ceph/ceph-ansible/issues/305
-#ceph_stable_distro_source:
+#ceph_stable_distro_source: "{{ ansible_lsb.codename }}"
 
 # This option is needed for _both_ stable and dev version, so please always fill the right version
 # # for supported distros, see http://download.ceph.com/rpm-{{ ceph_stable_release }}/
 #ceph_stable_redhat_distro: el7
 
-# ENTERPRISE VERSION RED HAT STORAGE (from 1.3)
+
+# REPOSITORY: RHCS VERSION RED HAT STORAGE (from 1.3)
+#
+# Enabled when ceph_repository == 'rhcs'
+#
 # This version is only supported on RHEL >= 7.1
 # As of RHEL 7.1, libceph.ko and rbd.ko are now included in Red Hat's kernel
 # packages natively. The RHEL 7.1 kernel packages are more stable and secure than
@@ -151,48 +164,64 @@ fetch_directory: ~/ceph-ansible-keys
 # on RHEL 7.
 #
 #
-# Backward compatibility of variable names
-# Commit 492518a2 changed variable names of rhcs installations
-# to not break backward compatiblity we re-declare these variables
-# with the content of the new variable
-ceph_rhcs: true
-# This will affect how/what repositories are enabled depending on the desired
-# version. The previous version was 1.3. The current version is 2.
 #ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(2) }}"
-#ceph_rhcs_cdn_install: "{{ ceph_stable_rh_storage_cdn_install | default(false) }}" # assumes all the nodes can connect to cdn.redhat.com
-#ceph_rhcs_cdn_debian_repo: https://customername:customerpasswd@rhcs.download.redhat.com
-#ceph_rhcs_iso_install: "{{ ceph_stable_rh_storage_iso_install | default(false) }}" # usually used when nodes don't have access to cdn.redhat.com
+#ceph_repository_type: dummy
+#valid_ceph_repository_type:
+#  - cdn
+#  - iso
 #ceph_rhcs_iso_path: "{{ ceph_stable_rh_storage_iso_path | default('') }}"
 #ceph_rhcs_mount_path: "{{ ceph_stable_rh_storage_mount_path | default('/tmp/rh-storage-mount') }}"
 #ceph_rhcs_repository_path: "{{ ceph_stable_rh_storage_repository_path | default('/tmp/rh-storage-repo') }}" # where to copy iso's content
 
 
-# UBUNTU CLOUD ARCHIVE
+# REPOSITORY: UBUNTU CLOUD ARCHIVE
+#
+# Enabled when ceph_repository == 'uca'
+#
 # This allows the install of Ceph from the Ubuntu Cloud Archive.  The Ubuntu Cloud Archive
 # usually has newer Ceph releases than the normal distro repository.
 #
-#ceph_stable_uca: false
+#
 #ceph_stable_repo_uca: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
 #ceph_stable_openstack_release_uca: liberty
 #ceph_stable_release_uca: "{{ansible_lsb.codename}}-updates/{{ceph_stable_openstack_release_uca}}"
 
-# DEV
-# ###
 
-#ceph_dev: false # use ceph development branch
+# REPOSITORY: DEV
+#
+# Enabled when ceph_repository == 'dev'
+#
 #ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack
 #ceph_dev_sha1: latest # distinct sha1 to use, defaults to 'latest' (as in latest built)
 
-# CUSTOM
-# ###
 
+
+# REPOSITORY: CUSTOM
+#
+# Enabled when ceph_repository == 'custom'
+#
 # Use a custom repository to install ceph.  For RPM, ceph_custom_repo should be
 # a URL to the .repo file to be installed on the targets.  For deb,
 # ceph_custom_repo should be the URL to the repo base.
-#ceph_custom: false # use custom ceph repository
+#
 #ceph_custom_repo: https://server.domain.com/ceph-custom-repo
 
 
+# ORIGIN: LOCAL CEPH INSTALLATION
+#
+# Enabled when ceph_repository == 'local'
+#
+# Path to DESTDIR of the ceph install
+#ceph_installation_dir: "/path/to/ceph_installation/"
+# Whether or not to use installer script rundep_installer.sh
+# This script takes in rundep and installs the packages line by line onto the machine
+# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
+# all runtime dependencies installed
+#use_installer: false
+# Root directory for ceph-ansible
+#ansible_dir: "/path/to/ceph-ansible"
+
+
 ######################
 # CEPH CONFIGURATION #
 ######################
index 8c5b7f573a0730cddda2f9c35f8d968886437c52..f6917bacffa09a6832e7ee76252786315b3b0719 100644 (file)
@@ -1,2 +1,3 @@
-ceph_rhcs: true
+ceph_repository: rhcs
+ceph_origin: repository
 fetch_directory: ~/ceph-ansible-keys
index 4b59a67bda47472bd2563ead83ff6e0f8911a41b..c542ed8259b49f69dc93327d68fee3240ed3c3e6 100644 (file)
@@ -1,34 +1,34 @@
 ---
 - name: make sure an installation origin was chosen
   fail:
-    msg: "choose an installation origin"
+    msg: "choose an installation origin between repository, distro and local\nValid ceph_origin are: {{ valid_ceph_origins }}"
   when:
-    - ceph_origin != 'upstream'
-    - ceph_origin != 'distro'
-    - ceph_origin != 'local'
+    - ceph_origin not in valid_ceph_origins
   tags:
     - package-install
 
-- name: make sure an installation source was chosen
+- name: make sure a repository was chosen
   fail:
-    msg: "choose an upstream installation source or read https://github.com/ceph/ceph-ansible/wiki"
+    msg: "choose a repository installation source: {{ valid_ceph_repository }} or read http://docs.ceph.com/ceph-ansible/master/"
   when:
-    - ceph_origin == 'upstream'
-    - not ceph_stable
-    - not ceph_dev
-    - not ceph_rhcs
-    - not ceph_stable_uca
-    - not ceph_custom
+    - ceph_origin == 'repository'
+    - ceph_repository not in valid_ceph_repository
   tags:
     - package-install
 
+- name: fail if local scenario is enabled on debian
+  fail:
+    msg: "'local' installation scenario not supported on Debian systems"
+  when:
+    - ansible_os_family == 'Debian'
+    - ceph_origin == 'local'
+
 - name: make sure ceph_stable_release is set
   fail:
     msg: "make sure ceph_stable_release is set to a release name (e.g: luminous), http://docs.ceph.com/docs/master/release-notes/"
   when:
     - ceph_stable_release == 'dummy'
-    - ceph_origin == 'upstream'
-    - ceph_stable
+    - (ceph_repository != 'rhcs' or ceph_repository != 'dev')
   tags:
     - package-install
 
     msg: "wrong release name, see http://docs.ceph.com/docs/master/release-notes/"
   when:
     - ceph_stable_release not in ceph_release_num
-    - ceph_origin == 'upstream'
-    - ceph_stable
+    - ceph_origin == 'repository'
+    - ceph_repository != 'rhcs'
   tags:
     - package-install
 
-- name: verify that a method was chosen for red hat storage
+- name: verify that a repository type was chosen for ceph rhcs version
   fail:
-    msg: "choose between ceph_rhcs_cdn_install and ceph_rhcs_iso_install"
+    msg: "choose between 'cdn' or 'iso' installation, e.g: ceph_repository_type: cdn.\nValid ceph_repository_type are: {{ valid_ceph_repository_type }}"
   when:
-    - ceph_rhcs
-    - not ceph_rhcs_cdn_install
-    - not ceph_rhcs_iso_install
-    - ceph_origin != 'distro'
+    - ceph_origin == 'repository'
+    - ceph_repository == 'rhcs'
+    - ceph_repository_type in valid_ceph_repository_type
   tags:
     - package-install
 
   fail:
     msg: "ceph_rhcs_cdn_debian_repo url is invalid, please set your customername:customerpasswd"
   when:
-    - ceph_rhcs
-    - ceph_rhcs_cdn_install
+    - ceph_origin == 'repository'
+    - ceph_repository == 'rhcs'
+    - ceph_repository_type == 'cdn'
     - ansible_os_family == 'Debian'
     - ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
   tags:
     - package-install
 
+- name: verify that ceph_rhcs_cdn_debian_repo url is valid for red hat storage
+  fail:
+    msg: "iso installation is not supported by the Ceph Debian rhcs version"
+  when:
+    - ceph_origin == 'repository'
+    - ceph_repository == 'rhcs'
+    - ceph_repository_type == 'iso'
+    - ansible_os_family == 'Debian'
+  tags:
+    - package-install
+
 - name: make sure monitor_interface or monitor_address is defined
   fail:
     msg: "you must set monitor_interface or monitor_address"
index 0457e3119da8ec0e21321aa98fe91b5a21e94436..880ceb284d02ad274f53486bd30946f3fa500252 100644 (file)
   fail:
     msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Ceph Storage, only RHEL >= 7.3"
   when:
-    - ceph_rhcs
+    - ansible_distribution == 'Red Hat Enterprise Linux'
+    - ceph_repository == 'rhcs'
     - ansible_distribution_version | version_compare('7.3', '<')
 
+- name: determine if node is registered with subscription-manager
+  command: subscription-manager identity
+  register: subscription
+  changed_when: false
+  failed_when: false
+  always_run: true
+  when:
+    - ansible_distribution == 'Red Hat Enterprise Linux'
+    - ceph_repository == 'rhcs'
+    - ceph_repository_type == 'cdn'
+
+- name: fail on unregistered red hat rhcs linux
+  fail:
+    msg: "You must register your machine with subscription-manager"
+  when:
+    - ansible_distribution == 'Red Hat Enterprise Linux'
+    - ceph_repository == 'rhcs'
+    - ceph_repository_type == 'cdn'
+    - subscription.rc != '0'
+
 - name: fail on unsupported distribution for ubuntu cloud archive
   fail:
     msg: "Distribution not supported by Ubuntu Cloud Archive: {{ ansible_distribution }}"
   when:
-    ceph_stable_uca and
-    '{{ ansible_distribution }}' not in ['Ubuntu']
+    - ceph_repository == 'uca'
+    - ansible_distribution != 'Ubuntu'
 
 - name: fail on unsupported ansible version
   fail:
diff --git a/roles/ceph-common/tasks/installs/configure_debian_repository_installation.yml b/roles/ceph-common/tasks/installs/configure_debian_repository_installation.yml
new file mode 100644 (file)
index 0000000..b404141
--- /dev/null
@@ -0,0 +1,26 @@
+---
+- name: configure debian community repository
+  include: debian_community_repository.yml
+  when:
+    - ceph_repository == 'community'
+
+- name: configure debian rhcs repository
+  include: debian_rhcs_repository.yml
+  when:
+    - ceph_repository == 'rhcs'
+
+- name: configure debian dev repository
+  include: debian_dev_repository.yml
+  when:
+    - ceph_repository == 'dev'
+
+- name: configure debian custom repository
+  include: debian_custom_repository.yml
+  when:
+    - ceph_repository == 'custom'
+
+- name: configure debian cloud archive repository
+  include: debian_uca_repository.yml
+  when:
+    - ceph_repository == 'uca'
+
diff --git a/roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml b/roles/ceph-common/tasks/installs/configure_redhat_local_installation.yml
new file mode 100644 (file)
index 0000000..eebb614
--- /dev/null
@@ -0,0 +1,46 @@
+---
+- name: make sure /tmp exists
+  file:
+    path: /tmp
+    state: directory
+  when:
+    - use_installer
+
+- name: use mktemp to create name for rundep
+  command: "mktemp /tmp/rundep.XXXXXXXX"
+  register: rundep_location
+  when:
+    - use_installer
+
+- name: copy rundep
+  copy:
+    src: "{{ansible_dir}}/rundep"
+    dest: "{{ item }}"
+  with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
+  when:
+    - use_installer
+
+- name: install ceph dependencies
+  script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
+  become: true
+  with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
+  when:
+    - use_installer
+
+- name: ensure rsync is installed
+  package:
+    name: rsync
+    state: present
+
+- name: synchronize ceph install
+  synchronize:
+    src: "{{ceph_installation_dir}}/"
+    dest: "/"
+
+- name: create user group ceph
+  group:
+    name: 'ceph'
+
+- name: create user ceph
+  user:
+    name: 'ceph'
diff --git a/roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml b/roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml
new file mode 100644 (file)
index 0000000..eca1350
--- /dev/null
@@ -0,0 +1,26 @@
+---
+- name: configure redhat community repository
+  include: redhat_community_repository.yml
+  when:
+    - ceph_repository == 'community'
+
+- name: configure redhat rhcs repository
+  include: redhat_rhcs_repository.yml
+  when:
+    - ceph_repository == 'rhcs'
+
+- name: configure redhat dev repository
+  include: redhat_dev_repository.yml
+  when:
+    - ceph_repository == 'dev'
+
+- name: configure redhat custom repository
+  include: redhat_custom_repository.yml
+  when:
+    - ceph_repository == 'custom'
+
+# Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version
+- name: purge yum cache
+  command: yum clean all
+  when:
+    ansible_pkg_mgr == 'yum'
diff --git a/roles/ceph-common/tasks/installs/debian_ceph_repository.yml b/roles/ceph-common/tasks/installs/debian_ceph_repository.yml
deleted file mode 100644 (file)
index fd70f95..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- name: install the ceph repository stable key
-  apt_key:
-    data: "{{ lookup('file', role_path+'/files/cephstable.asc') }}"
-    state: present
-  when: ceph_stable
-
-- name: add ceph stable repository
-  apt_repository:
-    repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
-    state: present
-  changed_when: false
-  when: ceph_stable
-
-- name: fetch ceph development repository sources list file
-  uri:
-    url: https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_lsb.codename }}/repo
-    return_content: yes
-  register: ceph_dev_deb_repo
-  when: ceph_dev
-
-- name: add ceph development repository
-  apt_repository:
-    repo: "{{ ceph_dev_deb_repo.content }}"
-    state: present
-  changed_when: false
-  when: ceph_dev
-
-- name: add ubuntu cloud archive key package
-  package:
-    name: ubuntu-cloud-keyring
-  when: ceph_stable_uca
-
-- name: add ubuntu cloud archive repository
-  apt_repository:
-    repo: "deb {{ ceph_stable_repo_uca }} {{ ceph_stable_release_uca}} main"
-    state: present
-  changed_when: false
-  when: ceph_stable_uca
-
-- name: add custom repo
-  apt_repository:
-    repo: "deb {{ ceph_custom_repo }} {{ ansible_lsb.codename }} main"
-    state: present
-  changed_when: false
-  when: ceph_custom
-
-- name: add gluster nfs ganesha repo
-  apt_repository:
-    repo: "{{ item }}"
-    state: present
-  with_items:
-    - ppa:gluster/libntirpc
-    - ppa:gluster/nfs-ganesha
-  changed_when: false
-  when:
-    - (nfs_obj_gw or nfs_file_gw)
-    - not ansible_distribution == "Debian"
diff --git a/roles/ceph-common/tasks/installs/debian_community_repository.yml b/roles/ceph-common/tasks/installs/debian_community_repository.yml
new file mode 100644 (file)
index 0000000..3996416
--- /dev/null
@@ -0,0 +1,23 @@
+---
+- name: configure debian ceph community repository stable key
+  apt_key:
+    data: "{{ lookup('file', role_path+'/files/cephstable.asc') }}"
+    state: present
+
+- name: configure debian ceph stable community repository
+  apt_repository:
+    repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
+    state: present
+  changed_when: false
+
+- name: configure debian gluster nfs ganesha community repository for rgw nfs
+  apt_repository:
+    repo: "{{ item }}"
+    state: present
+  with_items:
+    - ppa:gluster/libntirpc
+    - ppa:gluster/nfs-ganesha
+  changed_when: false
+  when:
+    - (nfs_obj_gw or nfs_file_gw)
+    - not ansible_distribution == "Debian"
diff --git a/roles/ceph-common/tasks/installs/debian_custom_repository.yml b/roles/ceph-common/tasks/installs/debian_custom_repository.yml
new file mode 100644 (file)
index 0000000..d7c3af3
--- /dev/null
@@ -0,0 +1,6 @@
+---
+- name: configure debian custom repository
+  apt_repository:
+    repo: "deb {{ ceph_custom_repo }} {{ ansible_lsb.codename }} main"
+    state: present
+  changed_when: false
diff --git a/roles/ceph-common/tasks/installs/debian_dev_repository.yml b/roles/ceph-common/tasks/installs/debian_dev_repository.yml
new file mode 100644 (file)
index 0000000..e37e2ff
--- /dev/null
@@ -0,0 +1,12 @@
+---
+- name: fetch ceph debian development repository
+  uri:
+    url: https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_lsb.codename }}/repo
+    return_content: yes
+  register: ceph_dev_deb_repo
+
+- name: configure ceph debian development repository
+  apt_repository:
+    repo: "{{ ceph_dev_deb_repo.content }}"
+    state: present
+  changed_when: false
diff --git a/roles/ceph-common/tasks/installs/debian_enterprise_repository.yml b/roles/ceph-common/tasks/installs/debian_enterprise_repository.yml
new file mode 100644 (file)
index 0000000..853b4a8
--- /dev/null
@@ -0,0 +1,4 @@
+---
+- include: prerequisite_rhcs_cdn_install_debian.yml
+  when:
+    - ceph_repository_type == 'cdn'
diff --git a/roles/ceph-common/tasks/installs/debian_uca_repository.yml b/roles/ceph-common/tasks/installs/debian_uca_repository.yml
new file mode 100644 (file)
index 0000000..6d27265
--- /dev/null
@@ -0,0 +1,10 @@
+---
+- name: add ubuntu cloud archive key package
+  package:
+    name: ubuntu-cloud-keyring
+
+- name: add ubuntu cloud archive repository
+  apt_repository:
+    repo: "deb {{ ceph_stable_repo_uca }} {{ ceph_stable_release_uca }} main"
+    state: present
+  changed_when: false
diff --git a/roles/ceph-common/tasks/installs/install_debian_enterprise_packages.yml b/roles/ceph-common/tasks/installs/install_debian_enterprise_packages.yml
new file mode 100644 (file)
index 0000000..1aa67ea
--- /dev/null
@@ -0,0 +1,56 @@
+---
+- name: install red hat storage ceph mon for debian
+  apt:
+    name: ceph-mon
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: mon_group_name in group_names
+
+- name: install red hat storage ceph osd for debian
+  apt:
+    name: ceph-osd
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: osd_group_name in group_names
+
+- name: install ceph-test for debian
+  apt:
+    name: ceph-test
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: ceph_test
+
+- name: install red hat storage radosgw for debian
+  apt:
+    name: radosgw
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: rgw_group_name in group_names
+
+- name: install red hat storage ceph mds for debian
+  apt:
+    pkg: ceph-mds
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: mds_group_name in group_names
+
+- name: install red hat storage ceph-fuse client for debian
+  apt:
+    pkg: ceph-fuse
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: client_group_name in group_names
+
+- name: install red hat storage ceph-common for debian
+  apt:
+    pkg: ceph-common
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: client_group_name in group_names
+
+- name: install red hat storage nfs gateway for debian
+  apt:
+    name: nfs-ganesha-fsal
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: nfs_group_name in group_names
+
+- name: install ceph mgr for debian
+  apt:
+    pkg: ceph-mgr
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - mgr_group_name in group_names
+    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
diff --git a/roles/ceph-common/tasks/installs/install_debian_packages.yml b/roles/ceph-common/tasks/installs/install_debian_packages.yml
new file mode 100644 (file)
index 0000000..9797aaf
--- /dev/null
@@ -0,0 +1,62 @@
+---
+- name: install ceph for debian
+  apt:
+    name: "ceph"
+    update_cache: no
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+
+- name: install ceph-common for debian
+  apt:
+    name: ceph-common
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+
+- name: install ceph-test for debian
+  apt:
+    name: ceph-test
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+  when:
+    - ceph_test
+
+- name: install rados gateway for debian
+  apt:
+    name: radosgw
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    update_cache: yes
+  when:
+    - rgw_group_name in group_names
+
+- name: install ceph mds for debian
+  apt:
+    name: ceph-mds
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+  when:
+    - mds_group_name in group_names
+
+- name: install jemalloc for debian
+  apt:
+    name: libjemalloc1
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    update_cache: yes
+  when:
+    - nfs_group_name in group_names
+
+- name: install nfs gateway for debian
+  apt:
+    name: nfs-ganesha-fsal
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    update_cache: yes
+  when:
+    - nfs_group_name in group_names
+
+- name: install ceph mgr for debian
+  apt:
+    name: ceph-mgr
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+  when:
+    - mgr_group_name in group_names
+    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
index 00f5eb6ee788b6e2d19e53dde1e485bce2ceb6e8..ca621b5387a31280c92daad994dc67f89a128adc 100644 (file)
@@ -1,4 +1,9 @@
 ---
+- name: configure debian repository installation
+  include: configure_debian_repository_installation.yml
+  when:
+    - ceph_origin == 'repository'
+
 - name: install dependencies
   apt:
     name: "{{ item }}"
     cache_valid_time: 3600
   with_items: "{{ debian_package_dependencies }}"
 
-- name: configure ceph apt repository
-  include: debian_ceph_repository.yml
-  when: ceph_origin == 'upstream'
-
 - name: update apt cache
   apt:
     update_cache: yes
 
-- name: install ceph
-  apt:
-    name: "ceph"
-    update_cache: no
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
-
-- name: install ceph-test
-  apt:
-    pkg: ceph-test
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
-  when: ceph_test
-
-- name: install ceph-common
-  package:
-    name: 'ceph-common'
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-
-- name: install rados gateway
-  apt:
-    pkg: radosgw
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    update_cache: yes
-  when: rgw_group_name in group_names
-
-- name: install ceph mds
-  apt:
-    pkg: ceph-mds
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
-  when: mds_group_name in group_names
-
-- name: install jemalloc
-  apt:
-    pkg: libjemalloc1
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    update_cache: yes
-  when: nfs_group_name in group_names
-
-- name: install NFS gateway
-  apt:
-    pkg: nfs-ganesha-fsal
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    update_cache: yes
-  when: nfs_group_name in group_names
+- name: install ceph debian packages
+  include: install_debian_packages.yml
+  when:
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - ceph_repository != 'rhcs'
 
-- name: install ceph mgr
-  apt:
-    pkg: ceph-mgr
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+- name: install ceph rhcs debian packages
+  include: install_debian_rhcs_packages.yml
   when:
-    - mgr_group_name in group_names
-    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
+    - ceph_repository == 'rhcs'
index 55b0bd4afba34973871140252f8176a716b17dbc..30cb4833703364d23239e2b023674234dab8b49a 100644 (file)
 ---
-- name: install redhat dependencies
-  package:
-    name: "{{ item }}"
-    state: present
-  with_items: "{{ redhat_package_dependencies }}"
-  when: ansible_distribution == "RedHat"
-
-- name: install centos dependencies
-  package:
-    name: "{{ item }}"
-    state: present
-  with_items: "{{ centos_package_dependencies }}"
-  when: ansible_distribution == "CentOS"
-
-- name: configure ceph yum repository
-  include: redhat_ceph_repository.yml
-  when: ceph_origin == 'upstream'
-
-- name: make sure /tmp exists
-  file:
-    path: /tmp
-    state: directory
-  when:
-    - ceph_origin == 'local'
-    - use_installer
-
-- name: use mktemp to create name for rundep
-  command: "mktemp /tmp/rundep.XXXXXXXX"
-  register: rundep_location
-  when:
-    - ceph_origin == 'local'
-    - use_installer
-
-- name: copy rundep
-  copy:
-    src: "{{ansible_dir}}/rundep"
-    dest: "{{ item }}"
-  with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
-  when:
-    - ceph_origin == 'local'
-    - use_installer
-
-- name: install ceph dependencies
-  script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
-  become: true
-  with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
-  when:
-    - ceph_origin == 'local'
-    - use_installer
-
-- name: ensure rsync is installed
-  package:
-    name: rsync
-    state: present
+- name: configure redhat repository installation
+  include: configure_redhat_repository_installation.yml
   when:
-    - ceph_origin == 'local'
+    - ceph_origin == 'repository'
 
-- name: synchronize ceph install
-  synchronize:
-    src: "{{ceph_installation_dir}}/"
-    dest: "/"
+- name: configure redhat local installation
+  include: configure_redhat_local_installation.yml
   when:
     - ceph_origin == 'local'
 
-- name: create user group ceph
-  group:
-    name: 'ceph'
-  when:
-    - ceph_origin == 'local'
-
-- name: create user ceph
-  user:
-    name: 'ceph'
-  when:
-    - ceph_origin == 'local'
-
-- name: install ceph-common
-  package:
-    name: 'ceph-common'
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-
-- name: install distro or red hat storage ceph mon
-  package:
-    name: "ceph-mon"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - mon_group_name in group_names
-
-- name: install distro or red hat storage ceph osd
-  package:
-    name: "ceph-osd"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - osd_group_name in group_names
-
-- name: install distro or red hat storage ceph mds
-  package:
-    name: "ceph-mds"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - mds_group_name in group_names
-
-- name: install distro or red hat storage ceph-fuse
-  package:
-    name: "ceph-fuse"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - client_group_name in group_names
-
-- name: install distro or red hat storage ceph base
-  package:
-    name: "ceph-base"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - client_group_name in group_names
-
-- name: install ceph-test
-  package:
-    name: ceph-test
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: ceph_test
-
-- name: install rados gateway
-  package:
-    name: ceph-radosgw
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: rgw_group_name in group_names
-
-- name: install nfs ceph gateway
-  package:
-    name: nfs-ganesha-ceph
-  when:
-    - nfs_group_name in group_names
-    - nfs_file_gw
-
-- name: install nfs rgw gateway
-  package:
-    name: "{{ item }}"
-  with_items:
-    - nfs-ganesha-rgw
-    - ceph-radosgw
-  when:
-    - nfs_group_name in group_names
-    - nfs_obj_gw
-
-- name: install ceph mgr
-  package:
-    name: ceph-mgr
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+- name: install redhat packages
+  include: install_redhat_packages.yml
   when:
-    - mgr_group_name in group_names
-    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
+    - (ceph_origin == 'repository' or ceph_origin == 'distro')
diff --git a/roles/ceph-common/tasks/installs/install_redhat_packages.yml b/roles/ceph-common/tasks/installs/install_redhat_packages.yml
new file mode 100644 (file)
index 0000000..51e07c3
--- /dev/null
@@ -0,0 +1,105 @@
+---
+- name: install redhat dependencies
+  package:
+    name: "{{ item }}"
+    state: present
+  with_items: "{{ redhat_package_dependencies }}"
+  when: ansible_distribution == "RedHat"
+
+- name: install centos dependencies
+  package:
+    name: "{{ item }}"
+    state: present
+  with_items: "{{ centos_package_dependencies }}"
+  when: ansible_distribution == "CentOS"
+
+- name: install redhat ceph-common
+  package:
+    name: "ceph-common"
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+
+- name: install redhat ceph-mon package
+  package:
+    name: "ceph-mon"
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - mon_group_name in group_names
+
+- name: install redhat ceph-osd package
+  package:
+    name: "ceph-osd"
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - osd_group_name in group_names
+
+- name: install redhat ceph-mds package
+  package:
+    name: "ceph-mds"
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - mds_group_name in group_names
+
+- name: install redhat ceph-fuse package
+  package:
+    name: "ceph-fuse"
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - client_group_name in group_names
+
+- name: install redhat ceph-base package
+  package:
+  package:
+    name: "ceph-base"
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - client_group_name in group_names
+
+- name: install redhat ceph-test package
+  package:
+    name: ceph-test
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: ceph_test
+
+- name: install redhat ceph-radosgw package
+  package:
+    name: ceph-radosgw
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when: rgw_group_name in group_names
+
+- name: install redhat nfs-ganesha-ceph package
+  package:
+    name: nfs-ganesha-ceph
+  when:
+    - nfs_group_name in group_names
+    - nfs_file_gw
+
+- name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
+  package:
+    name: "{{ item }}"
+  with_items:
+    - nfs-ganesha-fsal
+    - ceph-radosgw
+  when:
+    - nfs_group_name in group_names
+    - nfs_obj_gw
+    - ceph_rhcs_version == "2"
+
+- name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
+  package:
+    name: "{{ item }}"
+  with_items:
+    - nfs-ganesha-rgw
+    - nfs-ganesha-ceph
+    - ceph-radosgw
+  when:
+    - nfs_group_name in group_names
+    - nfs_obj_gw
+    - ceph_rhcs_version == "3"
+
+- name: install redhat ceph-mgr package
+  package:
+    name: ceph-mgr
+    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
+  when:
+    - mgr_group_name in group_names
+    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
diff --git a/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml b/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml
deleted file mode 100644 (file)
index 1ec33a4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- name: install dependencies
-  apt:
-    pkg: "{{ item }}"
-    state: present
-    update_cache: yes
-    cache_valid_time: 3600
-  with_items: "{{ debian_package_dependencies }}"
-
-- name: install red hat storage ceph mon
-  apt:
-    name: ceph-mon
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: mon_group_name in group_names
-
-- name: install red hat storage ceph osd
-  apt:
-    name: ceph-osd
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: osd_group_name in group_names
-
-- name: install ceph-test
-  apt:
-    name: ceph-test
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: ceph_test
-
-- name: install red hat storage radosgw
-  apt:
-    name: radosgw
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: rgw_group_name in group_names
-
-- name: install red hat storage ceph mds
-  apt:
-    pkg: ceph-mds
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: mds_group_name in group_names
-
-- name: install red hat storage ceph-fuse client
-  apt:
-    pkg: ceph-fuse
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: client_group_name in group_names
-
-- name: install red hat storage ceph-common
-  apt:
-    pkg: ceph-common
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: client_group_name in group_names
-
-- name: install red hat storage nfs gateway
-  apt:
-    name: nfs-ganesha-fsal
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when: nfs_group_name in group_names
-
-- name: install ceph mgr
-  apt:
-    pkg: ceph-mgr
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - mgr_group_name in group_names
-    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
diff --git a/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml b/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml
deleted file mode 100644 (file)
index 1362593..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
----
-- name: install red hat storage repository key
-  rpm_key:
-    key: "{{ ceph_rhcs_repository_path }}/RPM-GPG-KEY-redhat-release"
-    state: present
-  when:
-    - ceph_rhcs_iso_install
-
-- name: add red hat storage repository
-  template:
-    src: "{{ role_path }}/templates/redhat_storage_repo.j2"
-    dest: /etc/yum.repos.d/rh_storage.repo
-    owner: root
-    group: root
-    mode: 0644
-  when:
-    - ceph_rhcs_iso_install
-
-- name: install dependencies
-  package:
-    name: "{{ item }}"
-    state: present
-  with_items: "{{ redhat_package_dependencies }}"
-
-- name: install red hat storage ceph mon
-  package:
-    name: "ceph-mon"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - mon_group_name in group_names
-
-- name: install red hat storage ceph osd
-  package:
-    name: "ceph-osd"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - osd_group_name in group_names
-
-- name: install red hat storage ceph mds
-  package:
-    name: "ceph-mds"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - mds_group_name in group_names
-
-- name: install red hat storage ceph-common
-  package:
-    name: "ceph-common"
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - client_group_name in group_names
-
-- name: install ceph-test
-  package:
-    name: ceph-test
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - ceph_test
-
-- name: install rados gateway
-  package:
-    name: ceph-radosgw
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - rgw_group_name in group_names
-
-- name: install NFS gateway
-  package:
-    name: nfs-ganesha-ceph
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - nfs_group_name in group_names
-
-- name: install ceph mgr
-  package:
-    name: ceph-mgr
-    state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-  when:
-    - mgr_group_name in group_names
-    - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
diff --git a/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml b/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install.yml
new file mode 100644 (file)
index 0000000..e1af075
--- /dev/null
@@ -0,0 +1,45 @@
+---
+- name: check if the red hat storage monitor repo is already present
+  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
+  changed_when: false
+  failed_when: false
+  register: rhcs_mon_repo
+  always_run: true
+  when: mon_group_name in group_names
+
+- name: enable red hat storage monitor repository
+  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
+  changed_when: false
+  when:
+    - mon_group_name in group_names
+    - rhcs_mon_repo.rc != 0
+
+- name: check if the red hat storage osd repo is already present
+  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
+  changed_when: false
+  failed_when: false
+  register: rhcs_osd_repo
+  always_run: true
+  when: osd_group_name in group_names
+
+- name: enable red hat storage osd repository
+  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
+  changed_when: false
+  when:
+    - osd_group_name in group_names
+    - rhcs_osd_repo.rc != 0
+
+- name: check if the red hat storage rados gateway / mds repo is already present
+  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
+  changed_when: false
+  failed_when: false
+  register: rhcs_rgw_mds_repo
+  always_run: true
+  when: (rgw_group_name in group_names or mds_group_name in group_names)
+
+- name: enable red hat storage rados gateway / mds repository
+  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
+  changed_when: false
+  when:
+    - (rgw_group_name in group_names or mds_group_name in group_names)
+    - rhcs_rgw_mds_repo.rc != 0
diff --git a/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install_debian.yml b/roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install_debian.yml
new file mode 100644 (file)
index 0000000..4df13be
--- /dev/null
@@ -0,0 +1,32 @@
+---
+- name: install red hat storage repository key for debian systems
+  apt_key:
+    data: "{{ lookup('file', role_path+'/files/cephstablerhcs.asc') }}"
+    state: present
+
+- name: enable red hat storage monitor repository for debian systems
+  apt_repository:
+    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/MON {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
+    state: present
+  changed_when: false
+  when: mon_group_name in group_names
+
+- name: enable red hat storage osd repository for debian systems
+  apt_repository:
+    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/OSD {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
+    state: present
+  changed_when: false
+  when: osd_group_name in group_names
+
+- name: enable red hat storage rados gateway / mds repository for debian systems
+  apt_repository:
+    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/Tools {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
+    state: present
+  changed_when: false
+  when: (rgw_group_name in group_names or mds_group_name in group_names)
+
+- name: enable red hat storage agent repository for debian systems
+  apt_repository:
+    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/Agent {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
+    state: present
+  changed_when: false
diff --git a/roles/ceph-common/tasks/installs/prerequisite_rhcs_iso_install.yml b/roles/ceph-common/tasks/installs/prerequisite_rhcs_iso_install.yml
new file mode 100644 (file)
index 0000000..302abc5
--- /dev/null
@@ -0,0 +1,56 @@
+---
+- name: create red hat storage package directories
+  file:
+    path: "{{ item }}"
+    state: directory
+  with_items:
+    - "{{ ceph_rhcs_mount_path }}"
+    - "{{ ceph_rhcs_repository_path }}"
+
+- name: ensure destination iso directory exists
+  file:
+    path: "{{ ceph_rhcs_iso_path | dirname }}"
+    state: directory
+    recurse: yes
+  when: "'{{ ceph_rhcs_iso_path | dirname }}' != '/'"
+
+- name: fetch the red hat storage iso from the ansible server
+  copy:
+    src: "{{ ceph_rhcs_iso_path }}"
+    dest: "{{ ceph_rhcs_iso_path }}"
+
+# assumption: ceph_rhcs_mount_path does not specify directory
+
+- name: mount red hat storage iso file
+  mount:
+    name: "{{ ceph_rhcs_mount_path }}"
+    src: "{{ ceph_rhcs_iso_path }}"
+    fstype: iso9660
+    opts: ro,loop,noauto
+    passno: 2
+    state: mounted
+
+- name: copy red hat storage iso content
+  shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }}
+  args:
+    creates: "{{ ceph_rhcs_repository_path }}/README"
+
+- name: unmount red hat storage iso file
+  mount:
+    name: "{{ ceph_rhcs_mount_path }}"
+    src: "{{ ceph_rhcs_iso_path }}"
+    fstype: iso9660
+    state: unmounted
+
+- name: install red hat storage repository key
+  rpm_key:
+    key: "{{ ceph_rhcs_repository_path }}/RPM-GPG-KEY-redhat-release"
+    state: present
+
+- name: add red hat storage repository
+  template:
+    src: "{{ role_path }}/templates/redhat_storage_repo.j2"
+    dest: /etc/yum.repos.d/rh_storage.repo
+    owner: root
+    group: root
+    mode: 0644
diff --git a/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml b/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml
deleted file mode 100644 (file)
index 4d8ea05..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- name: install the ceph stable repository key
-  rpm_key:
-    key: "{{ ceph_stable_key }}"
-    state: present
-  when: ceph_stable
-
-- name: add ceph stable repository
-  yum_repository:
-    name: ceph_stable
-    description: Ceph Stable repo
-    gpgcheck: yes
-    state: present
-    gpgkey: "{{ ceph_stable_key }}"
-    baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/$basearch"
-  when: ceph_stable
-
-- name: fetch ceph development repo file
-  uri:
-    url: https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo
-    return_content: yes
-  register: ceph_dev_yum_repo
-  when: ceph_dev
-
-- name: add ceph development repository
-  copy:
-    content: "{{ ceph_dev_yum_repo.content }}"
-    dest: /etc/yum.repos.d/ceph-dev.repo
-    owner: root
-    group: root
-    backup: yes
-  when: ceph_dev
-
-- name: add custom repo
-  get_url:
-    url: "{{ ceph_custom_repo }}"
-    dest: /etc/yum.repos.d
-    owner: root
-    group: root
-  when: ceph_custom
-
-# Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version
-- name: purge yum cache
-  command: yum clean all
-  when:
-    ansible_pkg_mgr == 'yum'
diff --git a/roles/ceph-common/tasks/installs/redhat_community_repository.yml b/roles/ceph-common/tasks/installs/redhat_community_repository.yml
new file mode 100644 (file)
index 0000000..013f8aa
--- /dev/null
@@ -0,0 +1,14 @@
+---
+- name: configure red hat ceph community repository stable key
+  rpm_key:
+    key: "{{ ceph_stable_key }}"
+    state: present
+
+- name: configure red hat ceph stable community repository
+  yum_repository:
+    name: ceph_stable
+    description: Ceph Stable repo
+    gpgcheck: yes
+    state: present
+    gpgkey: "{{ ceph_stable_key }}"
+    baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/$basearch"
diff --git a/roles/ceph-common/tasks/installs/redhat_custom_repository.yml b/roles/ceph-common/tasks/installs/redhat_custom_repository.yml
new file mode 100644 (file)
index 0000000..2732629
--- /dev/null
@@ -0,0 +1,7 @@
+---
+- name: configure red hat custom repository
+  get_url:
+    url: "{{ ceph_custom_repo }}"
+    dest: /etc/yum.repos.d
+    owner: root
+    group: root
diff --git a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml
new file mode 100644 (file)
index 0000000..6bc4b06
--- /dev/null
@@ -0,0 +1,14 @@
+---
+- name: fetch ceph red hat development repository
+  uri:
+    url: https://shaman.ceph.com/api/repos/ceph/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo
+    return_content: yes
+  register: ceph_dev_yum_repo
+
+- name: configure ceph red hat development repository
+  copy:
+    content: "{{ ceph_dev_yum_repo.content }}"
+    dest: /etc/yum.repos.d/ceph-dev.repo
+    owner: root
+    group: root
+    backup: yes
diff --git a/roles/ceph-common/tasks/installs/redhat_enterprise_repository.yml b/roles/ceph-common/tasks/installs/redhat_enterprise_repository.yml
new file mode 100644 (file)
index 0000000..40e07d8
--- /dev/null
@@ -0,0 +1,8 @@
+---
+- include: prerequisite_rhcs_iso_install.yml
+  when:
+    - ceph_repository_type == 'iso'
+
+- include: prerequisite_rhcs_cdn_install.yml
+  when:
+    - ceph_repository_type == 'cdn'
index d72a89e1bf1ff6401be0a7dc5bf176d3fbceb1cc..46313ee8a0cdb48b613454f81dfdd1819117dd0c 100644 (file)
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
 
-- include: ./pre_requisites/prerequisite_rhcs_iso_install.yml
-  when:
-    - ceph_rhcs
-    - ceph_rhcs_iso_install
-  tags:
-    - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
-
-- include: ./pre_requisites/prerequisite_rhcs_cdn_install.yml
-  when:
-    - ceph_rhcs
-    - ceph_rhcs_cdn_install
-    - ansible_os_family == "RedHat"
-  tags:
-    - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
-
-- include: ./pre_requisites/prerequisite_rhcs_cdn_install_debian.yml
-  when:
-    - ceph_rhcs
-    - ceph_rhcs_cdn_install
-    - ansible_os_family == "Debian"
-  tags:
-    - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
-
 - include: ./installs/install_on_redhat.yml
   when:
     - ansible_os_family == 'RedHat'
-    - not ceph_rhcs
   tags:
     - package-install
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
 - include: ./installs/install_on_debian.yml
   when:
     - ansible_os_family == 'Debian'
-    - not ceph_rhcs
-  tags:
-    - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
-
-- include: ./installs/install_rh_storage_on_redhat.yml
-  when:
-    - ceph_rhcs
-    - ansible_distribution == "RedHat"
-  tags:
-    - package-install
-  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
-  static: False
-
-- include: ./installs/install_rh_storage_on_debian.yml
-  when:
-    - ansible_os_family == 'Debian'
-    - ceph_rhcs
   tags:
     - package-install
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
 
 # override ceph_stable_release for ceph_dev and rhcs installations since ceph_stable_release is not mandatory
 - include: ./release-rhcs.yml
-  when: (ceph_rhcs or ceph_dev)
+  when:
+    - ansible_os_family == 'RedHat'
+    - ceph_repository in ['rhcs', 'dev']
   tags:
     - always
 
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install.yml
deleted file mode 100644 (file)
index 5e7603c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- name: determine if node is registered with subscription-manager.
-  command: subscription-manager identity
-  register: subscription
-  changed_when: false
-  always_run: true
-
-- name: check if the red hat storage monitor repo is already present
-  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
-  changed_when: false
-  failed_when: false
-  register: rhcs_mon_repo
-  always_run: true
-  when: mon_group_name in group_names
-
-- name: enable red hat storage monitor repository
-  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
-  changed_when: false
-  when:
-    - mon_group_name in group_names
-    - rhcs_mon_repo.rc != 0
-
-- name: check if the red hat storage osd repo is already present
-  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
-  changed_when: false
-  failed_when: false
-  register: rhcs_osd_repo
-  always_run: true
-  when: osd_group_name in group_names
-
-- name: enable red hat storage osd repository
-  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
-  changed_when: false
-  when:
-    - osd_group_name in group_names
-    - rhcs_osd_repo.rc != 0
-
-- name: check if the red hat storage rados gateway / mds repo is already present
-  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
-  changed_when: false
-  failed_when: false
-  register: rhcs_rgw_mds_repo
-  always_run: true
-  when: (rgw_group_name in group_names or mds_group_name in group_names)
-
-- name: enable red hat storage rados gateway / mds repository
-  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
-  changed_when: false
-  when:
-    - (rgw_group_name in group_names or mds_group_name in group_names)
-    - rhcs_rgw_mds_repo.rc != 0
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install_debian.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install_debian.yml
deleted file mode 100644 (file)
index 4df13be..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- name: install red hat storage repository key for debian systems
-  apt_key:
-    data: "{{ lookup('file', role_path+'/files/cephstablerhcs.asc') }}"
-    state: present
-
-- name: enable red hat storage monitor repository for debian systems
-  apt_repository:
-    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/MON {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
-    state: present
-  changed_when: false
-  when: mon_group_name in group_names
-
-- name: enable red hat storage osd repository for debian systems
-  apt_repository:
-    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/OSD {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
-    state: present
-  changed_when: false
-  when: osd_group_name in group_names
-
-- name: enable red hat storage rados gateway / mds repository for debian systems
-  apt_repository:
-    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/Tools {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
-    state: present
-  changed_when: false
-  when: (rgw_group_name in group_names or mds_group_name in group_names)
-
-- name: enable red hat storage agent repository for debian systems
-  apt_repository:
-    repo: "deb {{ ceph_rhcs_cdn_debian_repo }}/2-updates/Agent {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
-    state: present
-  changed_when: false
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_iso_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_iso_install.yml
deleted file mode 100644 (file)
index 51ada8e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- name: create red hat storage package directories
-  file:
-    path: "{{ item }}"
-    state: directory
-  with_items:
-    - "{{ ceph_rhcs_mount_path }}"
-    - "{{ ceph_rhcs_repository_path }}"
-
-- name: ensure destination iso directory exists
-  file:
-    path: "{{ ceph_rhcs_iso_path | dirname }}"
-    state: directory
-    recurse: yes
-  when: "'{{ ceph_rhcs_iso_path | dirname }}' != '/'"
-
-- name: fetch the red hat storage iso from the ansible server
-  copy:
-    src: "{{ ceph_rhcs_iso_path }}"
-    dest: "{{ ceph_rhcs_iso_path }}"
-
-# assumption: ceph_rhcs_mount_path does not specify directory
-
-- name: mount red hat storage iso file
-  mount:
-    name: "{{ ceph_rhcs_mount_path }}"
-    src: "{{ ceph_rhcs_iso_path }}"
-    fstype: iso9660
-    opts: ro,loop,noauto
-    passno: 2
-    state: mounted
-
-- name: copy red hat storage iso content
-  shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }}
-  args:
-    creates: "{{ ceph_rhcs_repository_path }}/README"
-
-- name: unmount red hat storage iso file
-  mount:
-    name: "{{ ceph_rhcs_mount_path }}"
-    src: "{{ ceph_rhcs_iso_path }}"
-    fstype: iso9660
-    state: unmounted
-
-- name: install the red hat ceph storage repository key
-  apt_key:
-    file: "{{ ceph_rhcs_repository_path }}/MON/release.asc"
-    state: present
-  when: ceph_rhcs_iso_install
-
-- name: add red hat ceph storage repositories
-  apt_repository:
-    repo: "deb file://{{ ceph_rhcs_repository_path }}/{{ item }}/ {{ ansible_lsb.codename }} main"
-    state: present
-  changed_when: false
-  with_items:
-    - "MON"
-    - "OSD"
-    - "Tools"
-    - "Agent"
-  when: ceph_rhcs_iso_install
-
index 551e4cfae3d831a63e33c1da10ad74a12918dda1..e4ec2b4e4b67d53ca3669a4515af1ed73a4326ce 100644 (file)
@@ -52,7 +52,7 @@
       - restart ceph mdss
       - restart ceph rgws
       - restart ceph nfss
-  when: not containerized_deployment
+  when: not containerized_deployment|bool
 
 # ceph-docker-common
 # only create fetch directory when:
     set_fact:
       fsid: "{{ cluster_uuid.stdout }}"
     when: generate_fsid
-  when: containerized_deployment
+  when: containerized_deployment|bool
index 7e976f64f20b0ff9df39fe65ab33db57498862b3..473d9cdfb1df899738813308684cd63b7f93751b 100644 (file)
@@ -5,6 +5,22 @@
 # GENERAL #
 ###########
 
+######################################
+# Releases name to number dictionary #
+######################################
+ceph_release_num:
+  dumpling: 0.67
+  emperor: 0.72
+  firefly: 0.80
+  giant: 0.87
+  hammer: 0.94
+  infernalis: 9
+  jewel: 10
+  kraken: 11
+  luminous: 12
+  mimic: 13
+
+# Directory to fetch cluster fsid, keys etc...
 fetch_directory: fetch/
 
 # The 'cluster' variable determines the name of the cluster.
@@ -18,16 +34,7 @@ fetch_directory: fetch/
 # With that you will be able to run "ceph health" normally
 cluster: ceph
 
-###########
-# INSTALL #
-###########
-
-# Set uid/gid to default '64045' for bootstrap directories.
-# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
-# These values have to be set according to the base OS used by the container image, NOT the host.
-bootstrap_dirs_owner: "64045"
-bootstrap_dirs_group: "64045"
-
+# Inventory host group variables
 mon_group_name: mons
 osd_group_name: osds
 rgw_group_name: rgws
@@ -45,13 +52,10 @@ mgr_group_name: mgrs
 # want to set this to False to skip those checks.
 check_firewall: False
 
-# This variable determines if ceph packages can be updated.  If False, the
-# package resources will use "state=present".  If True, they will use
-# "state=latest".
-upgrade_ceph_packages: False
-
-# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
 
+############
+# PACKAGES #
+############
 debian_package_dependencies:
   - python-pycurl
   - hdparm
@@ -68,69 +72,78 @@ redhat_package_dependencies:
   - hdparm
   - python-setuptools
 
+# Whether or not to install the ceph-test package.
+ceph_test: false
+
 # Enable the ntp service by default to avoid clock skew on
 # ceph nodes
 ntp_service_enabled: true
 
-# Whether or not to install the ceph-test package.
-ceph_test: False
+# Set uid/gid to default '64045' for bootstrap directories.
+# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
+# These values have to be set according to the base OS used by the container image, NOT the host.
+bootstrap_dirs_owner: "64045"
+bootstrap_dirs_group: "64045"
+
+# This variable determines if ceph packages can be updated.  If False, the
+# package resources will use "state=present".  If True, they will use
+# "state=latest".
+upgrade_ceph_packages: False
+
+ceph_use_distro_backports: false # DEBIAN ONLY
+
+
+###########
+# INSTALL #
+###########
+
 
-## Configure package origin
+# ORIGIN SOURCE
 #
-ceph_origin: 'upstream' # or 'distro' or 'local'
-# 'distro' means that no separate repo file will be added
-# you will get whatever version of Ceph is included in your Linux distro.
+# Choose between:
+# - 'repository' means that you will get ceph installed through a new repository. Later below choose between 'community', 'rhcs' or 'dev'
+# - 'distro' means that no separate repo file will be added
+#  you will get whatever version of Ceph is included in your Linux distro.
 # 'local' means that the ceph binaries will be copied over from the local machine
+ceph_origin: 'dummy'
+valid_ceph_origins:
+  - repository
+  - distro
+  - local
 
-# LOCAL CEPH INSTALLATION (ceph_origin==local)
-#
-# Path to DESTDIR of the ceph install
-#ceph_installation_dir: "/path/to/ceph_installation/"
-# Whether or not to use installer script rundep_installer.sh
-# This script takes in rundep and installs the packages line by line onto the machine
-# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
-# all runtime dependencies installed
-#use_installer: false
-# Root directory for ceph-ansible
-#ansible_dir: "/path/to/ceph-ansible"
 
-ceph_use_distro_backports: false # DEBIAN ONLY
+ceph_repository: dummy
+valid_ceph_repository:
+  - community
+  - rhcs
+  - dev
+  - uca
+  - custom
 
-# STABLE
-########
 
-# COMMUNITY VERSION
-ceph_stable: false # use ceph stable branch
+# REPOSITORY: COMMUNITY VERSION
+#
+# Enabled when ceph_repository == 'community'
+#
 ceph_mirror: http://download.ceph.com
 ceph_stable_key: https://download.ceph.com/keys/release.asc
 ceph_stable_release: dummy
 ceph_stable_repo: "{{ ceph_mirror }}/debian-{{ ceph_stable_release }}"
 
-######################################
-# Releases name to number dictionary #
-######################################
-ceph_release_num:
-  dumpling: 0.67
-  emperor: 0.72
-  firefly: 0.80
-  giant: 0.87
-  hammer: 0.94
-  infernalis: 9
-  jewel: 10
-  kraken: 11
-  luminous: 12
-  mimic: 13
-
 # Use the option below to specify your applicable package tree, eg. when using non-LTS Ubuntu versions
 # # for a list of available Debian distributions, visit http://download.ceph.com/debian-{{ ceph_stable_release }}/dists/
 # for more info read: https://github.com/ceph/ceph-ansible/issues/305
-#ceph_stable_distro_source:
+#ceph_stable_distro_source: "{{ ansible_lsb.codename }}"
 
 # This option is needed for _both_ stable and dev version, so please always fill the right version
 # # for supported distros, see http://download.ceph.com/rpm-{{ ceph_stable_release }}/
 ceph_stable_redhat_distro: el7
 
-# ENTERPRISE VERSION RED HAT STORAGE (from 1.3)
+
+# REPOSITORY: RHCS VERSION RED HAT STORAGE (from 1.3)
+#
+# Enabled when ceph_repository == 'rhcs'
+#
 # This version is only supported on RHEL >= 7.1
 # As of RHEL 7.1, libceph.ko and rbd.ko are now included in Red Hat's kernel
 # packages natively. The RHEL 7.1 kernel packages are more stable and secure than
@@ -143,48 +156,64 @@ ceph_stable_redhat_distro: el7
 # on RHEL 7.
 #
 #
-# Backward compatibility of variable names
-# Commit 492518a2 changed variable names of rhcs installations
-# to not break backward compatiblity we re-declare these variables
-# with the content of the new variable
-ceph_rhcs: "{{ ceph_stable_rh_storage | default(false) }}"
-# This will affect how/what repositories are enabled depending on the desired
-# version. The previous version was 1.3. The current version is 2.
 ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(2) }}"
-ceph_rhcs_cdn_install: "{{ ceph_stable_rh_storage_cdn_install | default(false) }}" # assumes all the nodes can connect to cdn.redhat.com
-ceph_rhcs_cdn_debian_repo: https://customername:customerpasswd@rhcs.download.redhat.com
-ceph_rhcs_iso_install: "{{ ceph_stable_rh_storage_iso_install | default(false) }}" # usually used when nodes don't have access to cdn.redhat.com
+ceph_repository_type: dummy
+valid_ceph_repository_type:
+  - cdn
+  - iso
 ceph_rhcs_iso_path: "{{ ceph_stable_rh_storage_iso_path | default('') }}"
 ceph_rhcs_mount_path: "{{ ceph_stable_rh_storage_mount_path | default('/tmp/rh-storage-mount') }}"
 ceph_rhcs_repository_path: "{{ ceph_stable_rh_storage_repository_path | default('/tmp/rh-storage-repo') }}" # where to copy iso's content
 
 
-# UBUNTU CLOUD ARCHIVE
+# REPOSITORY: UBUNTU CLOUD ARCHIVE
+#
+# Enabled when ceph_repository == 'uca'
+#
 # This allows the install of Ceph from the Ubuntu Cloud Archive.  The Ubuntu Cloud Archive
 # usually has newer Ceph releases than the normal distro repository.
 #
-ceph_stable_uca: false
+#
 #ceph_stable_repo_uca: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
 #ceph_stable_openstack_release_uca: liberty
 #ceph_stable_release_uca: "{{ansible_lsb.codename}}-updates/{{ceph_stable_openstack_release_uca}}"
 
-# DEV
-# ###
 
-ceph_dev: false # use ceph development branch
+# REPOSITORY: DEV
+#
+# Enabled when ceph_repository == 'dev'
+#
 ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack
 ceph_dev_sha1: latest # distinct sha1 to use, defaults to 'latest' (as in latest built)
 
-# CUSTOM
-# ###
 
+
+# REPOSITORY: CUSTOM
+#
+# Enabled when ceph_repository == 'custom'
+#
 # Use a custom repository to install ceph.  For RPM, ceph_custom_repo should be
 # a URL to the .repo file to be installed on the targets.  For deb,
 # ceph_custom_repo should be the URL to the repo base.
-ceph_custom: false # use custom ceph repository
+#
 ceph_custom_repo: https://server.domain.com/ceph-custom-repo
 
 
+# ORIGIN: LOCAL CEPH INSTALLATION
+#
+# Enabled when ceph_repository == 'local'
+#
+# Path to DESTDIR of the ceph install
+#ceph_installation_dir: "/path/to/ceph_installation/"
+# Whether or not to use installer script rundep_installer.sh
+# This script takes in rundep and installs the packages line by line onto the machine
+# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
+# all runtime dependencies installed
+#use_installer: false
+# Root directory for ceph-ansible
+#ansible_dir: "/path/to/ceph-ansible"
+
+
 ######################
 # CEPH CONFIGURATION #
 ######################
index f35ee302f0f3b2c852003d24009c3f6c03ffe8a2..24be5a99c47625973a55edc5ff5337a427fc1a74 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 cluster: test
 monitor_interface: eth1
 radosgw_interface: eth1
index 2a3d1480375927bb8521c966602eb2740059eb45..d533b666cd5444345e3d02472be499a96c45d522 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 public_network: "192.168.11.0/24"
 cluster_network: "192.168.12.0/24"
 journal_size: 100
index 6b701dc86d1b9dac8042b1cc6c032b139d46ff9d..f2ae187e86393bebdb2ae8d5b2c6a43af30bf53f 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 public_network: "192.168.13.0/24"
 cluster_network: "192.168.14.0/24"
 journal_size: 100
index 7b96a4f7ed80293c517464d7812e4592c4ecfeb7..17f7d3ba095173165c724ce9f177f7fb2927c5e1 100644 (file)
@@ -1,7 +1,6 @@
 ---
 docker: true
 containerized_deployment: True
-ceph_stable: True
 ceph_mon_docker_subnet: "{{ public_network }}"
 public_network: "192.168.23.0/24"
 cluster_network: "192.168.24.0/24"
index 44232c7c6d145fc8e052a3581ce0224eef6512b4..4197480ce8b55ddfb425ddb9b143dc670d9f08fe 100644 (file)
@@ -3,7 +3,6 @@
 # that this scenario is using docker
 docker: True
 
-ceph_stable: True
 containerized_deployment: True
 cluster: test
 monitor_interface: eth1
index 6f34d9eaea68a0e16edde76b4ed540b489f3f512..4b2fc1cc11c158d30a527759b40110ff59aaa5d6 100644 (file)
@@ -3,7 +3,6 @@
 # that this scenario is using docker
 docker: True
 
-ceph_stable: True
 containerized_deployment: True
 cluster: test
 monitor_interface: eth1
index 6d4fc1190488fb1986dff0f6ae51b46a24a36558..8e4baf863d3d8c2cba07d848a3e3473a1249b109 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 cluster: test
 monitor_interface: eth1
 radosgw_interface: eth1
index e90587a26a29b6013ef65f00c9c0f897217de665..5e3e6781937a32a8ecc174d24c2e4c1dff8e9f7c 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 cluster: test
 public_network: "192.168.1.0/24"
 cluster_network: "192.168.2.0/24"
index ef1fa393c890d45b489d5c1e751893d16dea89e4..c99b892f562721bf82891082e088c4eb10ecf963 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 public_network: "192.168.11.0/24"
 cluster_network: "192.168.12.0/24"
 journal_size: 100
index e7c2134defbef7f1a96ad6a875a01c44ea60eb95..6ded583823d664b01cb1b01c26e525b3c44cb6be 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 public_network: "192.168.13.0/24"
 cluster_network: "192.168.14.0/24"
 journal_size: 100
index b042cb62d597e8247dd843b4bb8d95f77741fd7a..49336fbfdbacf53590633c7baa785f363680dd96 100644 (file)
@@ -3,7 +3,6 @@
 # that this scenario is using docker
 docker: True
 
-ceph_stable: True
 containerized_deployment: True
 cluster: ceph
 monitor_interface: eth1
index 74c84409f193af424c6c4ac22c160c037df139eb..03e8f233d7e1deaa5432e3b93b56ac98bbadc653 100644 (file)
@@ -3,7 +3,6 @@
 # that this scenario is using docker
 docker: True
 
-ceph_stable: True
 containerized_deployment: True
 cluster: test
 monitor_interface: eth1
index 864ec8c9fa764f5bc4b230fcdfe8fc781314141a..265db496430c30dd319558baf28a4db5d2961228 100644 (file)
@@ -3,7 +3,6 @@
 # that this scenario is using docker
 docker: True
 
-ceph_stable: True
 containerized_deployment: True
 cluster: test
 monitor_interface: eth1
index 9683f9760450e4c2abb37cc65c86d5fd09a5a93a..25807504d51b2cc836adbbf3beb7f7254aaa5716 100644 (file)
@@ -16,4 +16,4 @@ rgw0
 mgr0
 
 [clients]
-client0
+client0 ceph_origin="repository" ceph_repository="community" containerized_deployment="False"
index 88d7a335d44cbcd1582ab916730edde988bd9256..7e6ef1b4d4179aa0f7cdecbb9008390a8637e38a 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 cluster: test
 public_network: "192.168.3.0/24"
 cluster_network: "192.168.4.0/24"
index bf07351c659cb860b742a783996667df2f09867b..1fa60cda519695e5e4f607069a01108e2aee2b6c 100644 (file)
@@ -6,16 +6,10 @@
     - vagrant_setup
   tasks:
 
-    - name: change ceph_stable to False
+    - name: change ceph_repository to 'dev'
       replace:
-        regexp: "ceph_stable:.*"
-        replace: "ceph_stable: False"
-        dest: "{{ change_dir }}/group_vars/all"
-      when: change_dir is defined
-
-    - name: set ceph_dev to True
-      lineinfile:
-        line: "ceph_dev: True"
+        regexp: "ceph_repository:.*"
+        replace: "ceph_repository: dev"
         dest: "{{ change_dir }}/group_vars/all"
       when: change_dir is defined
 
index 78f131f876535d33342d83df44427b92712fda24..00f81310302cd0c58a1bcfdf57269b5280458494 100644 (file)
         dest: "{{ change_dir }}/vagrant_variables.yml"
       when: change_dir is defined
 
-    - name: change ceph_stable to False
+    - name: change ceph_origin to distro
       replace:
-        regexp: "ceph_stable:.*"
-        replace: "ceph_stable: False"
+        regexp: "ceph_origin:.*"
+        replace: "ceph_origin: distro"
         dest: "{{ change_dir }}/group_vars/all"
       when: change_dir is defined
 
-    - name: set ceph_rhcs to True
-      lineinfile:
-        line: "ceph_rhcs: True"
-        dest: "{{ change_dir }}/group_vars/all"
-      when: change_dir is defined
-
-    - name: set ceph_origin to distro
-      lineinfile:
-        line: "ceph_origin: distro"
+    - name: change ceph_repository to rhcs
+      replace:
+        regexp: "ceph_repository:.*"
+        replace: "ceph_repository: rhcs"
         dest: "{{ change_dir }}/group_vars/all"
       when: change_dir is defined
 
@@ -55,7 +50,8 @@
   tasks:
 
     - name: check if it is Atomic host
-      stat: path=/run/ostree-booted
+      stat:
+        path: /run/ostree-booted
       register: stat_ostree
       always_run: true
 
index 2fdb5cd327d84102b1f3a9e04b3be0305da1ff56..b12fab9c9c9150ecb123c43c15a4294af58149e8 100644 (file)
@@ -1,6 +1,7 @@
 ---
 
-ceph_stable: True
+ceph_origin: repository
+ceph_repository: community
 cluster: test
 public_network: "192.168.5.0/24"
 cluster_network: "192.168.6.0/24"
diff --git a/tox.ini b/tox.ini
index f6359c29258177a19c15d96a9c372d9ef6c35037..31355e9212c35abb4e33c9fdee8c6c025e0ce1d2 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -152,7 +152,7 @@ changedir=
 
 commands=
   rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
-  dev: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
+  dev: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_setup.yml --extra-vars "change_dir={changedir} ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}" --tags "vagrant_setup"
 
   vagrant up --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}