# type.
#filestore_xattr_use_omap: null
+# define any ec profiles here if needed
+# example:
+# ec_profiles:
+# - {'name': 'my_ec_profile1', 'k': 2, 'm': 4, 'stripe_unit': 8192}
+# - {'name': 'my_ec_profile2', 'k': 4, 'm': 8, 'crush_root': 'HDD', 'crush_device_class': 'ssd'}
+
## MDS options
#
#mds_max_mds: 1
# type.
#filestore_xattr_use_omap: null
+# define any ec profiles here if needed
+# example:
+# ec_profiles:
+# - {'name': 'my_ec_profile1', 'k': 2, 'm': 4, 'stripe_unit': 8192}
+# - {'name': 'my_ec_profile2', 'k': 4, 'm': 8, 'crush_root': 'HDD', 'crush_device_class': 'ssd'}
+
## MDS options
#
#mds_max_mds: 1
# type.
filestore_xattr_use_omap: null
+# define any ec profiles here if needed
+# example:
+# ec_profiles:
+# - {'name': 'my_ec_profile1', 'k': 2, 'm': 4, 'stripe_unit': 8192}
+# - {'name': 'my_ec_profile2', 'k': 4, 'm': 8, 'crush_root': 'HDD', 'crush_device_class': 'ssd'}
+
## MDS options
#
mds_max_mds: 1
when: hostvars[groups[mon_group_name][0]]['crush_rule_config'] | default(crush_rule_config) | bool
tags: wait_all_osds_up
+- name: create erasure coded profile
+ ceph_ec_profile:
+ cluster: "{{ cluster }}"
+ name: "{{ item.name }}"
+ state: present
+ stripe_unit: "{{ item.stripe_unit | default(omit) }}"
+ k: "{{ item.k }}"
+ m: "{{ item.m }}"
+ crush_root: "{{ item.crush_root | default(omit) }}"
+ crush_device_class: "{{ item.crush_device_class | default(omit) }}"
+ with_items: "{{ ec_profiles }}"
+ environment:
+ CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
+ CEPH_CONTAINER_BINARY: "{{ container_binary }}"
+ when:
+ - ec_profiles is defined
+ - ec_profiles | length > 0
+ - inventory_hostname == ansible_play_hosts_all | last
+
# Create the pools listed in openstack_pools
- name: include openstack_config.yml
include_tasks: openstack_config.yml
- "{{ openstack_cinder_pool }}"
ceph_docker_registry: quay.ceph.io
ceph_docker_image: ceph-ci/daemon
-ceph_docker_image_tag: latest-master
\ No newline at end of file
+ceph_docker_image_tag: latest-master
+ec_profiles:
+ - {'name': 'my_ec_profile1', 'k': 2, 'm': 4, 'stripe_unit': 8192}
+ - {'name': 'my_ec_profile2', 'k': 4, 'm': 8, 'crush_root': 'HDD', 'crush_device_class': 'ssd'}
\ No newline at end of file
application: rbd
openstack_pools:
- "{{ openstack_glance_pool }}"
- - "{{ openstack_cinder_pool }}"
\ No newline at end of file
+ - "{{ openstack_cinder_pool }}"
+ec_profiles:
+ - {'name': 'my_ec_profile1', 'k': 2, 'm': 4, 'stripe_unit': 8192}
+ - {'name': 'my_ec_profile2', 'k': 4, 'm': 8, 'crush_root': 'HDD', 'crush_device_class': 'ssd'}
\ No newline at end of file