diff --git a/group_vars/all.sample b/group_vars/all.sample index 4d3e7e15a..0779a6269 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -144,15 +144,15 @@ dummy: # 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_rhcs: false # This will affect how/what repositories are enabled depending on the desired # version. The next version will use "2" not "2.0" which would not work. -#ceph_stable_rh_storage_version: 1.3 # next version is 2 -#ceph_stable_rh_storage_cdn_install: false # 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 +#ceph_rhcs_version: 1.3 # next version is 2 +#ceph_rhcs_cdn_install: false # assumes all the nodes can connect to cdn.redhat.com +#ceph_rhcs_iso_install: false # usually used when nodes don't have access to cdn.redhat.com +#ceph_rhcs_iso_path: +#ceph_rhcs_mount_path: /tmp/rh-storage-mount +#ceph_rhcs_repository_path: /tmp/rh-storage-repo # where to copy iso's content # UBUNTU CLOUD ARCHIVE diff --git a/roles/ceph-common/README.md b/roles/ceph-common/README.md index 6c1b81fd1..3a09fae4e 100644 --- a/roles/ceph-common/README.md +++ b/roles/ceph-common/README.md @@ -25,7 +25,7 @@ Have a look at `defaults/main.yml`. * Install source, choose one of these: * `ceph_stable` * `ceph_dev` - * `ceph_stable_rh_storage` + * `ceph_rhcs` * `ceph_custom` * `journal_size` * `monitor_interface` diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index fe9d16849..3f6dc4ccd 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -136,15 +136,15 @@ ceph_stable_redhat_distro: el7 # 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_rhcs: false # This will affect how/what repositories are enabled depending on the desired # version. The next version will use "2" not "2.0" which would not work. -ceph_stable_rh_storage_version: 1.3 # next version is 2 -ceph_stable_rh_storage_cdn_install: false # 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 +ceph_rhcs_version: 1.3 # next version is 2 +ceph_rhcs_cdn_install: false # assumes all the nodes can connect to cdn.redhat.com +ceph_rhcs_iso_install: false # usually used when nodes don't have access to cdn.redhat.com +#ceph_rhcs_iso_path: +ceph_rhcs_mount_path: /tmp/rh-storage-mount +ceph_rhcs_repository_path: /tmp/rh-storage-repo # where to copy iso's content # UBUNTU CLOUD ARCHIVE diff --git a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml index e317589b7..ed800d992 100644 --- a/roles/ceph-common/tasks/checks/check_mandatory_vars.yml +++ b/roles/ceph-common/tasks/checks/check_mandatory_vars.yml @@ -16,18 +16,18 @@ - ceph_origin == 'upstream' - not ceph_stable - not ceph_dev - - not ceph_stable_rh_storage + - not ceph_rhcs - not ceph_stable_uca tags: - package-install - name: verify that a method was chosen for red hat storage fail: - msg: "choose between ceph_stable_rh_storage_cdn_install and ceph_stable_rh_storage_iso_install" + msg: "choose between ceph_rhcs_cdn_install and ceph_rhcs_iso_install" when: - - ceph_stable_rh_storage - - not ceph_stable_rh_storage_cdn_install - - not ceph_stable_rh_storage_iso_install + - ceph_rhcs + - not ceph_rhcs_cdn_install + - not ceph_rhcs_iso_install - ceph_origin == "upstream" tags: - package-install diff --git a/roles/ceph-common/tasks/checks/check_system.yml b/roles/ceph-common/tasks/checks/check_system.yml index 9338a3e5a..21e348c96 100644 --- a/roles/ceph-common/tasks/checks/check_system.yml +++ b/roles/ceph-common/tasks/checks/check_system.yml @@ -18,7 +18,7 @@ fail: msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Ceph Storage, only RHEL 7.1" when: - - ceph_stable_rh_storage + - ceph_rhcs - ansible_distribution_version | version_compare('7.1', '<') - name: fail on unsupported distribution for ubuntu cloud archive 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 index 8bc5452a9..b82ca8833 100644 --- a/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml +++ b/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml @@ -5,15 +5,15 @@ # intelligent way to determine the location of the key. - name: install the rh ceph storage repository key apt_key: - file: "{{ ceph_stable_rh_storage_repository_path }}/MON/release.asc" + file: "{{ ceph_rhcs_repository_path }}/MON/release.asc" state: present when: - - ceph_stable_rh_storage - - ceph_stable_rh_storage_iso_install + - ceph_rhcs + - ceph_rhcs_iso_install - name: add rh ceph storage repositories apt_repository: - repo: "deb file://{{ ceph_stable_rh_storage_repository_path }}/{{ item }}/ {{ ansible_lsb.codename }} main" + repo: "deb file://{{ ceph_rhcs_repository_path }}/{{ item }}/ {{ ansible_lsb.codename }} main" state: present changed_when: false with_items: @@ -22,14 +22,14 @@ - "Tools" - "Agent" when: - - ceph_stable_rh_storage - - ceph_stable_rh_storage_iso_install + - ceph_rhcs + - ceph_rhcs_iso_install - name: add the red hat storage apt-key apt_key: data: "{{ lookup('file', role_path+'/files/cephstablerhcs.asc') }}" state: present - when: not ceph_stable_rh_storage_iso_install + when: not ceph_rhcs_iso_install - name: install dependencies apt: 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 index dfdfba574..b950e1136 100644 --- a/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml @@ -1,10 +1,10 @@ --- - name: install red hat storage repository key rpm_key: - key: "{{ ceph_stable_rh_storage_repository_path }}/RPM-GPG-KEY-redhat-release" + key: "{{ ceph_rhcs_repository_path }}/RPM-GPG-KEY-redhat-release" state: present when: - - ceph_stable_rh_storage_iso_install + - ceph_rhcs_iso_install - name: add red hat storage repository template: @@ -14,7 +14,7 @@ group: root mode: 0644 when: - - ceph_stable_rh_storage_iso_install + - ceph_rhcs_iso_install - name: install dependencies yum: diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index cd87f5e70..54edb2256 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -11,15 +11,15 @@ - include: ./pre_requisites/prerequisite_rh_storage_iso_install.yml when: - - ceph_stable_rh_storage - - ceph_stable_rh_storage_iso_install + - ceph_rhcs + - ceph_rhcs_iso_install tags: - package-install - include: ./pre_requisites/prerequisite_rh_storage_cdn_install.yml when: - - ceph_stable_rh_storage - - ceph_stable_rh_storage_cdn_install + - ceph_rhcs + - ceph_rhcs_cdn_install - ansible_os_family == "RedHat" tags: - package-install @@ -27,28 +27,28 @@ - include: ./installs/install_on_redhat.yml when: ansible_os_family == 'RedHat' and - not ceph_stable_rh_storage_iso_install + not ceph_rhcs_iso_install tags: - package-install - include: ./installs/install_rh_storage_on_redhat.yml when: - ansible_distribution == "RedHat" - - ceph_stable_rh_storage + - ceph_rhcs tags: - package-install - include: ./installs/install_on_debian.yml when: - ansible_os_family == 'Debian' - - not ceph_stable_rh_storage + - not ceph_rhcs tags: - package-install - include: ./installs/install_rh_storage_on_debian.yml when: - ansible_os_family == 'Debian' - - ceph_stable_rh_storage + - ceph_rhcs tags: - package-install diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml index 4c1583066..d2d7ab864 100644 --- a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml +++ b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml @@ -5,42 +5,42 @@ changed_when: false - name: check if the red hat storage monitor repo is already present - shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_stable_rh_storage_version }}-mon-rpms + shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms changed_when: false failed_when: false register: rh_storage_mon_repo when: mon_group_name in group_names - name: enable red hat storage monitor repository - command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_stable_rh_storage_version }}-mon-rpms + command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms changed_when: false when: - mon_group_name in group_names - rh_storage_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_stable_rh_storage_version }}-osd-rpms + shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms changed_when: false failed_when: false register: rh_storage_osd_repo when: osd_group_name in group_names - name: enable red hat storage osd repository - command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_stable_rh_storage_version }}-osd-rpms + command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms changed_when: false when: - osd_group_name in group_names - rh_storage_osd_repo.rc != 0 - name: check if the red hat storage rados gateway repo is already present - shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_stable_rh_storage_version }}-tools-rpms + shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms changed_when: false failed_when: false register: rh_storage_rgw_repo when: rgw_group_name in group_names - name: enable red hat storage rados gateway repository - command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_stable_rh_storage_version }}-tools-rpms + command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms changed_when: false when: - rgw_group_name in group_names diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml index c376e6b56..e589fec34 100644 --- a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml +++ b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml @@ -4,40 +4,40 @@ path: "{{ item }}" state: directory with_items: - - "{{ ceph_stable_rh_storage_mount_path }}" - - "{{ ceph_stable_rh_storage_repository_path }}" + - "{{ ceph_rhcs_mount_path }}" + - "{{ ceph_rhcs_repository_path }}" - name: ensure destination iso directory exists file: - path: "{{ ceph_stable_rh_storage_iso_path | dirname }}" + path: "{{ ceph_rhcs_iso_path | dirname }}" state: directory recurse: yes - when: "'{{ ceph_stable_rh_storage_iso_path | dirname }}' != '/'" + when: "'{{ ceph_rhcs_iso_path | dirname }}' != '/'" - name: fetch the red hat storage iso from the ansible server copy: - src: "{{ ceph_stable_rh_storage_iso_path }}" - dest: "{{ ceph_stable_rh_storage_iso_path }}" + src: "{{ ceph_rhcs_iso_path }}" + dest: "{{ ceph_rhcs_iso_path }}" -# assumption: ceph_stable_rh_storage_mount_path does not specify directory +# assumption: ceph_rhcs_mount_path does not specify directory - name: mount red hat storage iso file mount: - name: "{{ ceph_stable_rh_storage_mount_path }}" - src: "{{ ceph_stable_rh_storage_iso_path }}" + 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_stable_rh_storage_mount_path }}/* {{ ceph_stable_rh_storage_repository_path }} + shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }} args: - creates: "{{ ceph_stable_rh_storage_repository_path }}/README" + creates: "{{ ceph_rhcs_repository_path }}/README" - name: unmount red hat storage iso file mount: - name: "{{ ceph_stable_rh_storage_mount_path }}" - src: "{{ ceph_stable_rh_storage_iso_path }}" + name: "{{ ceph_rhcs_mount_path }}" + src: "{{ ceph_rhcs_iso_path }}" fstype: iso9660 state: unmounted diff --git a/roles/ceph-common/templates/redhat_storage_repo.j2 b/roles/ceph-common/templates/redhat_storage_repo.j2 index 45828a83c..16f57c483 100644 --- a/roles/ceph-common/templates/redhat_storage_repo.j2 +++ b/roles/ceph-common/templates/redhat_storage_repo.j2 @@ -1,21 +1,21 @@ # {{ ansible_managed }} [rh_storage_mon] name=Red Hat Ceph Storage - local packages for Ceph monitor -baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/MON +baseurl=file://{{ ceph_rhcs_repository_path }}/MON enabled=1 gpgcheck=1 priority=1 [rh_storage_osd] name=Red Hat Ceph Storage - local packages for Ceph OSD -baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/OSD +baseurl=file://{{ ceph_rhcs_repository_path }}/OSD enabled=1 gpgcheck=1 priority=1 [rh_storage_tools] name=Red Hat Ceph Storage - local packages for Ceph client, MDS, and RGW -baseurl=file://{{ ceph_stable_rh_storage_repository_path }}/Tools +baseurl=file://{{ ceph_rhcs_repository_path }}/Tools enabled=1 gpgcheck=1 priority=1