]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add red hat storage support 302/head
authorleseb <seb@redhat.com>
Wed, 1 Jul 2015 13:58:38 +0000 (15:58 +0200)
committerleseb <seb@redhat.com>
Wed, 1 Jul 2015 16:36:26 +0000 (18:36 +0200)
The new product version has jsut came out. ICE doesn't exist anymore and
Red Hat Storage is the name of the new product.

Signed-off-by: leseb <seb@redhat.com>
group_vars/all
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/install_on_redhat.yml
roles/ceph-common/tasks/main.yml
roles/ceph-common/tasks/os_check.yml
roles/ceph-common/tasks/prerequisite_rh_storage.yml [new file with mode: 0644]
roles/ceph-common/templates/redhat_storage_repo.j2 [new file with mode: 0644]

index acf2a8854434128e2ea93380f8fa97b348a782bb..8eb39e1702b3d86b5eaff98405839d75cd243f61 100644 (file)
@@ -27,7 +27,7 @@ dummy:
 # # for supported distros, see http://ceph.com/rpm-{{ ceph_stable_release }}/
 #ceph_stable_redhat_distro: el7
 
-# ENTERPRISE VERSION
+# ENTERPRISE VERSION ICE (old, prior to the 1.3)
 #ceph_stable_ice: false # use Inktank Ceph Enterprise
 #ceph_stable_ice_url: https://download.inktank.com/enterprise
 #ceph_stable_ice_temp_path: /opt/ICE/ceph-repo/
@@ -38,6 +38,24 @@ dummy:
 #ceph_stable_ice_user: # htaccess user
 #ceph_stable_ice_password: # htaccess password
 
+# ENTERPRISE VERSION RED HAT STORAGE (from 1.3)
+# 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
+# using these 3rd-party kmods with RHEL 7.0. Please update your systems to RHEL
+# 7.1 or later if you want to use the kernel RBD client.
+#
+# The CephFS kernel client is undergoing rapid development upstream, and we do
+# not recommend running the CephFS kernel module on RHEL 7's 3.10 kernel at this
+# time. Please use ELRepo's latest upstream 4.x kernels if you want to run CephFS
+# on RHEL 7.
+#
+#ceph_stable_rh_storage: false
+#ceph_stable_rh_storage_url: (can be found at https://access.redhat.com/products/red-hat-ceph-storage/get-started)
+#ceph_stable_rh_storage_iso_checksum:
+#ceph_stable_rh_storage_mount_path: /tmp/rh-storage-repo
+#ceph_stable_rh_storage_download_path: /tmp/
+
 # DEV
 # ###
 
index 48d2e9b95776f5e3867b0c8b184aa4699069836b..251570efee87ec6944bc2d3a701d5a07b0584054 100644 (file)
@@ -24,7 +24,7 @@ ceph_stable_release: hammer # ceph stable release
 # # for supported distros, see http://ceph.com/rpm-{{ ceph_stable_release }}/\r
 ceph_stable_redhat_distro: el7\r
 \r
-# ENTERPRISE VERSION\r
+# ENTERPRISE VERSION ICE (old, prior to the 1.3)\r
 ceph_stable_ice: false # use Inktank Ceph Enterprise\r
 #ceph_stable_ice_url: https://download.inktank.com/enterprise\r
 #ceph_stable_ice_temp_path: /opt/ICE/ceph-repo/\r
@@ -35,6 +35,25 @@ ceph_stable_ice: false # use Inktank Ceph Enterprise
 #ceph_stable_ice_user: # htaccess user\r
 #ceph_stable_ice_password: # htaccess password\r
 \r
+# ENTERPRISE VERSION RED HAT STORAGE (from 1.3)\r
+# This version is only supported on RHEL 7.1\r
+# As of RHEL 7.1, libceph.ko and rbd.ko are now included in Red Hat's kernel\r
+# packages natively. The RHEL 7.1 kernel packages are more stable and secure than\r
+# using these 3rd-party kmods with RHEL 7.0. Please update your systems to RHEL\r
+# 7.1 or later if you want to use the kernel RBD client.\r
+#\r
+# The CephFS kernel client is undergoing rapid development upstream, and we do\r
+# not recommend running the CephFS kernel module on RHEL 7's 3.10 kernel at this\r
+# time. Please use ELRepo's latest upstream 4.x kernels if you want to run CephFS\r
+# on RHEL 7.\r
+#\r
+ceph_stable_rh_storage: false\r
+#ceph_stable_rh_storage_url: (can be found at https://access.redhat.com/products/red-hat-ceph-storage/get-started)\r
+#ceph_stable_rh_storage_iso_checksum:\r
+#ceph_stable_rh_storage_mount_path: /tmp/rh-storage-repo\r
+#ceph_stable_rh_storage_download_path: /tmp/\r
+\r
+\r
 # DEV\r
 # ###\r
 \r
index 0774e14752450e663ff061bfbeb26843eeafc126..be163d73f435a065f5628cf39a5501fead7d8e96 100644 (file)
     state=present
   when: ceph_stable_ice
 
+- name: install red hat storage repository key
+  rpm_key: >
+    key={{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+    state=present
+  when: ceph_stable_rh_storage
+
 - name: add Ceph stable repository
   yum: name=http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
   changed_when: false
   yum: >
     name=ceph
     state=latest
+  when: not ceph_stable_rh_storage
+
+- name: install red hat storage ceph mon
+  yum: >
+    name={{ item }}
+    state=latest
+  with_items:
+    - ceph
+    - ceph-mon
+  when:
+    ceph_stable_rh_storage and
+    mon_group_name in group_names
+
+- name: install red hat storage ceph osd
+  yum: >
+    name={{ item }}
+    state=latest
+  with_items:
+    - ceph
+    - ceph-osd
+  when:
+    ceph_stable_rh_storage and
+    osd_group_name in group_names
 
 - name: install Inktank Ceph Enterprise RBD Kernel modules
   yum: >
index 397b93956b4e48ec98afbed59958cb04c8a3b9a1..def4774741da91376d787e53c3044512cf4d5cb2 100644 (file)
@@ -7,6 +7,9 @@
 - include: prerequisite_ice.yml
   when: ceph_stable_ice
 
+- include: prerequisite_rh_storage.yml
+  when: ceph_stable_rh_storage
+
 - include: install_on_redhat.yml
   when: ansible_os_family == 'RedHat'
 
index a70f12a4d70ea8b905e8e98889b0560c969f879e..c3b92b40099edc027b9d5ca541f620752ca15b4c 100644 (file)
@@ -10,3 +10,9 @@
 - name: fail on unsupported distribution
   fail: "msg=Distribution not supported {{ ansible_os_family }}"
   when: "ansible_os_family not in ['Debian', 'RedHat']"
+
+- name: fail on unsupported distribution for red hat storage
+  fail: "msg=Distribution not supported {{ ansible_distribution_version }} by Red Hat Storage, only RHEL 7.1"
+  when:
+    ceph_stable_rh_storage and
+    {{ ansible_distribution_version | version_compare('7.1', '<') }}
diff --git a/roles/ceph-common/tasks/prerequisite_rh_storage.yml b/roles/ceph-common/tasks/prerequisite_rh_storage.yml
new file mode 100644 (file)
index 0000000..496b1f4
--- /dev/null
@@ -0,0 +1,21 @@
+---
+- name: create red hat storage package directory
+  file: >
+    path={{ ceph_stable_rh_storage_mount_path }}
+    state=directory
+    owner=root
+    group=root
+    mode=0644
+
+- name: get red hat storage packages
+  get_url: >
+    url={{ ceph_stable_rh_storage_url }}
+    dest={{ ceph_stable_rh_storage_download_path }}/rh-storage.iso
+    sha256sum={{ ceph_stable_rh_storage_iso_checksum }}
+
+- name: mount red hat storage iso file
+  mount: >
+    name={{ ceph_stable_rh_storage_mount_path }}
+    src={{ ceph_stable_rh_storage_download_path }}/rh-storage.iso
+    fstype=iso9660
+    state=mounted
diff --git a/roles/ceph-common/templates/redhat_storage_repo.j2 b/roles/ceph-common/templates/redhat_storage_repo.j2
new file mode 100644 (file)
index 0000000..4af8d34
--- /dev/null
@@ -0,0 +1,36 @@
+# {{ ansible_managed }}
+[rh_storage_mon]
+name=Red Hat Storage Ceph - local packages for Ceph
+baseurl=file://{{ ceph_stable_rh_storage_mount_path }}/MON
+enabled=1
+gpgcheck=1
+type=rpm-md
+priority=1
+gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+
+[rh_storage_osd]
+name=Red Hat Storage Ceph - local packages for Ceph
+baseurl=file://{{ ceph_stable_rh_storage_mount_path }}/OSD
+enabled=1
+gpgcheck=1
+type=rpm-md
+priority=1
+gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+
+[rh_storage_calamari]
+name=Red Hat Storage Ceph - local packages for Ceph
+baseurl=file://{{ ceph_stable_rh_storage_mount_path }}/Calamari
+enabled=1
+gpgcheck=1
+type=rpm-md
+priority=1
+gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+
+[rh_storage_installer]
+name=Red Hat Storage Ceph - local packages for Ceph
+baseurl=file://{{ ceph_stable_rh_storage_mount_path }}/Installer
+enabled=1
+gpgcheck=1
+type=rpm-md
+priority=1
+gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release