Merge pull request #306 from ceph/cdn-mode-rh-storage

Add red hat storage cdn installation
pull/309/head
Leseb 2015-07-03 14:41:32 +02:00
commit 071fdcf3d5
10 changed files with 88 additions and 43 deletions

View File

@ -52,10 +52,11 @@ dummy:
# on RHEL 7. # on RHEL 7.
# #
#ceph_stable_rh_storage: false #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_cdn_install: true # assumes all the nodes can connect to cdn.redhat.com
#ceph_stable_rh_storage_iso_checksum: #ceph_stable_rh_storage_iso_install: false # usually used when nodes don't have access to cdn.redhat.com
#ceph_stable_rh_storage_mount_path: /tmp/rh-storage-repo #ceph_stable_rh_storage_iso_path:
#ceph_stable_rh_storage_download_path: /tmp/ #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 # DEV
# ### # ###

View File

@ -49,11 +49,11 @@ ceph_stable_ice: false # use Inktank Ceph Enterprise
# on RHEL 7. # on RHEL 7.
# #
ceph_stable_rh_storage: false 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_cdn_install: true # assumes all the nodes can connect to cdn.redhat.com
#ceph_stable_rh_storage_iso_checksum: ceph_stable_rh_storage_iso_install: false # usually used when nodes don't have access to cdn.redhat.com
ceph_stable_rh_storage_mount_path: /tmp/rh-storage-repo #ceph_stable_rh_storage_iso_path:
ceph_stable_rh_storage_download_path: /tmp/ 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 # DEV
# ### # ###

View File

@ -30,9 +30,11 @@
- name: install red hat storage repository key - name: install red hat storage repository key
rpm_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 state=present
when: ceph_stable_rh_storage when:
ceph_stable_rh_storage and
ceph_stable_rh_storage_iso_install
- name: add Ceph stable repository - 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 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
@ -60,7 +62,9 @@
owner=root owner=root
group=root group=root
mode=0644 mode=0644
when: ceph_stable_rh_storage when:
ceph_stable_rh_storage and
ceph_stable_rh_storage_iso_install
- name: install Ceph - name: install Ceph
yum: > yum: >

View File

@ -7,8 +7,11 @@
- include: prerequisite_ice.yml - include: prerequisite_ice.yml
when: ceph_stable_ice when: ceph_stable_ice
- include: prerequisite_rh_storage.yml - include: prerequisite_rh_storage_iso_install.yml
when: ceph_stable_rh_storage 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 - include: install_on_redhat.yml
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'

View File

@ -1,18 +0,0 @@
---
- 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

View File

@ -0,0 +1,17 @@
---
- 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

View File

@ -0,0 +1,33 @@
---
- 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

View File

@ -1,36 +1,36 @@
# {{ ansible_managed }} # {{ ansible_managed }}
[rh_storage_mon] [rh_storage_mon]
name=Red Hat Storage Ceph - local packages for Ceph 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 enabled=1
gpgcheck=1 gpgcheck=1
type=rpm-md type=rpm-md
priority=1 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] [rh_storage_osd]
name=Red Hat Storage Ceph - local packages for Ceph 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 enabled=1
gpgcheck=1 gpgcheck=1
type=rpm-md type=rpm-md
priority=1 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] [rh_storage_calamari]
name=Red Hat Storage Ceph - local packages for Ceph 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 enabled=1
gpgcheck=1 gpgcheck=1
type=rpm-md type=rpm-md
priority=1 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] [rh_storage_installer]
name=Red Hat Storage Ceph - local packages for Ceph 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 enabled=1
gpgcheck=1 gpgcheck=1
type=rpm-md type=rpm-md
priority=1 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

View File

@ -11,7 +11,7 @@
- include: create_mds_filesystems.yml - include: create_mds_filesystems.yml
when: when:
not ceph_containerized_deployment and not ceph_containerized_deployment and
mds_group_name is defined groups[mds_group_name] is defined
- include: secure_cluster.yml - include: secure_cluster.yml
when: when:

View File

@ -12,9 +12,14 @@
ansible_os_family != 'RedHat' ansible_os_family != 'RedHat'
- name: start RGW - name: start RGW
service: name=radosgw-all state=started service: >
name=radosgw-all
state=started
when: ansible_distribution == "Ubuntu" when: ansible_distribution == "Ubuntu"
- name: start RGW - name: start RGW
service: name=ceph-radosgw state=started service: >
name=ceph-radosgw
state=started
enabled=yes
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'