# 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/
+#ceph_stable_rh_storage_cdn_install: true # assumes all the nodes can connect to cdn.redhat.com
+#ceph_stable_rh_storage_iso_install: false # usually used when nodes don't have access to cdn.redhat.com
+#ceph_stable_rh_storage_iso_path:
+#ceph_stable_rh_storage_mount_path: /tmp/rh-storage-mount
+#ceph_stable_rh_storage_repository_path: /tmp/rh-storage-repo # where to copy iso's content
# DEV
# ###
# 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
+ceph_stable_rh_storage_cdn_install: true # assumes all the nodes can connect to cdn.redhat.com\r
+ceph_stable_rh_storage_iso_install: false # usually used when nodes don't have access to cdn.redhat.com\r
+#ceph_stable_rh_storage_iso_path:\r
+ceph_stable_rh_storage_mount_path: /tmp/rh-storage-mount\r
+ceph_stable_rh_storage_repository_path: /tmp/rh-storage-repo # where to copy iso's content\r
\r
# DEV\r
# ###\r
- name: install red hat storage repository key
rpm_key: >
- key={{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+ key={{ ceph_stable_rh_storage_repository_path }}/RPM-GPG-KEY-redhat-release
state=present
- when: ceph_stable_rh_storage
+ when:
+ ceph_stable_rh_storage and
+ ceph_stable_rh_storage_iso_install
- 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
owner=root
group=root
mode=0644
- when: ceph_stable_rh_storage
+ when:
+ ceph_stable_rh_storage and
+ ceph_stable_rh_storage_iso_install
- name: install Ceph
yum: >
- include: prerequisite_ice.yml
when: ceph_stable_ice
-- include: prerequisite_rh_storage.yml
- when: ceph_stable_rh_storage
+- include: prerequisite_rh_storage_iso_install.yml
+ when: ceph_stable_rh_storage_iso_install
+
+- include: prerequisite_rh_storage_cdn_install.yml
+ when: ceph_stable_rh_storage_cdn_install
- include: install_on_redhat.yml
when: ansible_os_family == 'RedHat'
+++ /dev/null
----
-- name: create red hat storage package directory
- file: >
- path={{ ceph_stable_rh_storage_mount_path }}
- state=directory
-
-- 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
--- /dev/null
+---
+- name: determine if node is registered with subscription-manager.
+ command: subscription-manager identity
+ register: subscription
+ changed_when: false
+
+- name: enable red hat storage monitor repository
+ command: subscription-manager repos --enable rhel-7-server-rhceph-1.3-mon-rpms
+ when: mon_group_name in group_names
+
+- name: enable red hat storage osd repository
+ command: subscription-manager repos --enable rhel-7-server-rhceph-1.3-osd-rpms
+ when: osd_group_name in group_names
+
+- name: enable red hat storage rados gateway repository
+ command: subscription-manager repos --enable rhel-7-server-rhceph-1.3-tools-rpms
+ when: rgw_group_name in group_names
--- /dev/null
+---
+- name: create red hat storage package directories
+ file: >
+ path={{ item }}
+ state=directory
+ with_items:
+ - "{{ ceph_stable_rh_storage_mount_path }}"
+ - "{{ ceph_stable_rh_storage_repository_path }}"
+
+- name: fetch the red hat storage iso from the ansible server
+ fetch: >
+ src={{ ceph_stable_rh_storage_iso_path }}
+ dest={{ ceph_stable_rh_storage_iso_path }}
+ flat=yes
+
+- name: mount red hat storage iso file
+ mount: >
+ name={{ ceph_stable_rh_storage_mount_path }}
+ src={{ ceph_stable_rh_storage_iso_path }}
+ fstype=iso9660
+ state=mounted
+
+- name: copy red hat storage iso content
+ shell:
+ cp -r {{ ceph_stable_rh_storage_mount_path }}/* {{ ceph_stable_rh_storage_repository_path }}
+ creates={{ ceph_stable_rh_storage_repository_path }}/README
+
+- name: mount red hat storage iso file
+ mount: >
+ name={{ ceph_stable_rh_storage_mount_path }}
+ src={{ ceph_stable_rh_storage_iso_path }}
+ fstype=iso9660
+ state=unmounted
# {{ ansible_managed }}
[rh_storage_mon]
name=Red Hat Storage Ceph - local packages for Ceph
-baseurl=file://{{ ceph_stable_rh_storage_mount_path }}/MON
+baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/MON
enabled=1
gpgcheck=1
type=rpm-md
priority=1
-gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+gpgkey=file://{{ ceph_stable_rh_storage_repository_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
+baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/OSD
enabled=1
gpgcheck=1
type=rpm-md
priority=1
-gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+gpgkey=file://{{ ceph_stable_rh_storage_repository_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
+baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/Calamari
enabled=1
gpgcheck=1
type=rpm-md
priority=1
-gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+gpgkey=file://{{ ceph_stable_rh_storage_repository_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
+baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/Installer
enabled=1
gpgcheck=1
type=rpm-md
priority=1
-gpgkey=file://{{ ceph_stable_rh_storage_mount_path }}/RPM-GPG-KEY-redhat-release
+gpgkey=file://{{ ceph_stable_rh_storage_repository_path }}/RPM-GPG-KEY-redhat-release
- include: create_mds_filesystems.yml
when:
not ceph_containerized_deployment and
- mds_group_name is defined
+ groups[mds_group_name] is defined
- include: secure_cluster.yml
when:
ansible_os_family != 'RedHat'
- name: start RGW
- service: name=radosgw-all state=started
+ service: >
+ name=radosgw-all
+ state=started
when: ansible_distribution == "Ubuntu"
- name: start RGW
- service: name=ceph-radosgw state=started
+ service: >
+ name=ceph-radosgw
+ state=started
+ enabled=yes
when: ansible_os_family == 'RedHat'