1f12204effeff27d8b9acd1259879a4b66634445
[stor4nfv.git] / ci / ansible / group_vars / ceph / osds.yml
1 ---
2 # Variables here are applicable to all host groups NOT roles
3
4 # This sample file generated by generate_group_vars_sample.sh
5
6 # Dummy variable to avoid error because ansible does not recognize the
7 # file as a good configuration file when no variable in it.
8 dummy:
9
10 # You can override default vars defined in defaults/main.yml here,
11 # but I would advice to use host or group vars instead
12
13 #raw_journal_devices: "{{ dedicated_devices }}" # backward compatibility with stable-2.2, will disappear in stable 3.1
14 #journal_collocation: False # backward compatibility with stable-2.2, will disappear in stable 3.1
15 #raw_multi_journal: False # backward compatibility with stable-2.2, will disappear in stable 3.1
16 #dmcrytpt_journal_collocation: False # backward compatibility with stable-2.2, will disappear in stable 3.1
17 #dmcrypt_dedicated_journal: False # backward compatibility with stable-2.2, will disappear in stable 3.1
18
19
20 ###########
21 # GENERAL #
22 ###########
23
24 # Even though OSD nodes should not have the admin key
25 # at their disposal, some people might want to have it
26 # distributed on OSD nodes. Setting 'copy_admin_key' to 'true'
27 # will copy the admin key to the /etc/ceph/ directory
28 #copy_admin_key: false
29
30
31 ####################
32 # OSD CRUSH LOCATION
33 ####################
34
35 # /!\
36 #
37 # BE EXTREMELY CAREFUL WITH THIS OPTION
38 # DO NOT USE IT UNLESS YOU KNOW WHAT YOU ARE DOING
39 #
40 # /!\
41 #
42 # It is probably best to keep this option to 'false' as the default
43 # suggests it. This option should only be used while doing some complex
44 # CRUSH map. It allows you to force a specific location for a set of OSDs.
45 #
46 # The following options will build a ceph.conf with OSD sections
47 # Example:
48 # [osd.X]
49 # osd crush location = "root=location"
50 #
51 # This works with your inventory file
52 # To match the following 'osd_crush_location' option the inventory must look like:
53 #
54 # [osds]
55 # osd0 ceph_crush_root=foo ceph_crush_rack=bar
56
57 #crush_location: false
58 #osd_crush_location: "\"root={{ ceph_crush_root }} rack={{ ceph_crush_rack }} host={{ ansible_hostname }}\""
59
60
61 ##############
62 # CEPH OPTIONS
63 ##############
64
65 # Devices to be used as OSDs
66 # You can pre-provision disks that are not present yet.
67 # Ansible will just skip them. Newly added disk will be
68 # automatically configured during the next run.
69 #
70
71
72 # Declare devices to be used as OSDs
73 # All scenario(except 3rd) inherit from the following device declaration
74
75 devices:
76 #  - /dev/sda
77 #  - /dev/sdc
78 #  - /dev/sdd
79 #  - /dev/sde
80
81 #devices: []
82
83
84 #'osd_auto_discovery'  mode prevents you from filling out the 'devices' variable above.
85 #  You can use this option with First and Forth and Fifth OSDS scenario.
86 # Device discovery is based on the Ansible fact 'ansible_devices'
87 # which reports all the devices on a system. If chosen all the disks
88 # found will be passed to ceph-disk. You should not be worried on using
89 # this option since ceph-disk has a built-in check which looks for empty devices.
90 # Thus devices with existing partition tables will not be used.
91 #
92 #osd_auto_discovery: false
93
94 # Encrypt your OSD device using dmcrypt
95 # If set to True, no matter which osd_objecstore and osd_scenario you use the data will be encrypted
96 #dmcrypt: "{{ True if dmcrytpt_journal_collocation or dmcrypt_dedicated_journal else False }}" # backward compatibility with stable-2.2, will disappear in stable 3.1
97
98
99 # I. First scenario: collocated
100 #
101 # To enable this scenario do: osd_scenario: collocated
102 #
103 #
104 # If osd_objectstore: filestore is enabled both 'ceph data' and 'ceph journal' partitions
105 # will be stored on the same device.
106 #
107 # If osd_objectstore: bluestore is enabled 'ceph data', 'ceph block', 'ceph block.db', 'ceph block.wal' will be stored
108 # on the same device. The device will get 2 partitions:
109 # - One for 'data', called 'ceph data'
110 # - One for 'ceph block', 'ceph block.db', 'ceph block.wal' called 'ceph block'
111 #
112 # Example of what you will get:
113 # [root@ceph-osd0 ~]# blkid /dev/sda*
114 # /dev/sda: PTTYPE="gpt"
115 # /dev/sda1: UUID="9c43e346-dd6e-431f-92d8-cbed4ccb25f6" TYPE="xfs" PARTLABEL="ceph data" PARTUUID="749c71c9-ed8f-4930-82a7-a48a3bcdb1c7"
116 # /dev/sda2: PARTLABEL="ceph block" PARTUUID="e6ca3e1d-4702-4569-abfa-e285de328e9d"
117 #
118
119 #osd_scenario: "{{ 'collocated' if journal_collocation or dmcrytpt_journal_collocation else 'non-collocated' if raw_multi_journal or dmcrypt_dedicated_journal else 'dummy' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1
120 #valid_osd_scenarios:
121 #  - collocated
122 #  - non-collocated
123 #  - lvm
124 osd_scenario: collocated
125
126 # II.  Second scenario: non-collocated
127 #
128 # To enable this scenario do: osd_scenario: non-collocated
129 #
130 # If osd_objectstore: filestore is enabled 'ceph data' and 'ceph journal' partitions
131 # will be stored on different devices:
132 # - 'ceph data' will be stored on the device listed in 'devices'
133 # - 'ceph journal' will be stored on the device listed in 'dedicated_devices'
134 #
135 # Let's take an example, imagine 'devices' was declared like this:
136 #
137 # devices:
138 #   - /dev/sda
139 #   - /dev/sdb
140 #   - /dev/sdc
141 #   - /dev/sdd
142 #
143 # And 'dedicated_devices' was declared like this:
144 #
145 # dedicated_devices:
146 #   - /dev/sdf
147 #   - /dev/sdf
148 #   - /dev/sdg
149 #   - /dev/sdg
150 #
151 # This will result in the following mapping:
152 # - /dev/sda will have /dev/sdf1 as journal
153 # - /dev/sdb will have /dev/sdf2 as a journal
154 # - /dev/sdc will have /dev/sdg1 as a journal
155 # - /dev/sdd will have /dev/sdg2 as a journal
156 #
157 #
158 # If osd_objectstore: bluestore is enabled, both 'ceph block.db' and 'ceph block.wal' partitions will be stored
159 # on a dedicated device.
160 #
161 # So the following will happen:
162 # - The devices listed in 'devices' will get 2 partitions, one for 'block' and one for 'data'.
163 # 'data' is only 100MB big and do not store any of your data, it's just a bunch of Ceph metadata.
164 # 'block' will store all your actual data.
165 # - The devices in 'dedicated_devices' will get 1 partition for RocksDB DB, called 'block.db'
166 #  and one for RocksDB WAL, called 'block.wal'
167 #
168 # By default dedicated_devices will represent block.db
169 #
170 # Example of what you will get:
171 # [root@ceph-osd0 ~]# blkid /dev/sd*
172 # /dev/sda: PTTYPE="gpt"
173 # /dev/sda1: UUID="c6821801-2f21-4980-add0-b7fc8bd424d5" TYPE="xfs" PARTLABEL="ceph data" PARTUUID="f2cc6fa8-5b41-4428-8d3f-6187453464d0"
174 # /dev/sda2: PARTLABEL="ceph block" PARTUUID="ea454807-983a-4cf2-899e-b2680643bc1c"
175 # /dev/sdb: PTTYPE="gpt"
176 # /dev/sdb1: PARTLABEL="ceph block.db" PARTUUID="af5b2d74-4c08-42cf-be57-7248c739e217"
177 # /dev/sdb2: PARTLABEL="ceph block.wal" PARTUUID="af3f8327-9aa9-4c2b-a497-cf0fe96d126a"
178 #dedicated_devices: []
179
180
181 # More device granularity for Bluestore
182 #
183 # ONLY if osd_objectstore: bluestore is enabled.
184 #
185 # By default, if 'bluestore_wal_devices' is empty, it will get the content of 'dedicated_devices'.
186 # If set, then you will have a dedicated partition on a specific device for block.wal.
187 #
188 # Example of what you will get:
189 # [root@ceph-osd0 ~]# blkid /dev/sd*
190 # /dev/sda: PTTYPE="gpt"
191 # /dev/sda1: UUID="39241ae9-d119-4335-96b3-0898da8f45ce" TYPE="xfs" PARTLABEL="ceph data" PARTUUID="961e7313-bdb7-49e7-9ae7-077d65c4c669"
192 # /dev/sda2: PARTLABEL="ceph block" PARTUUID="bff8e54e-b780-4ece-aa16-3b2f2b8eb699"
193 # /dev/sdb: PTTYPE="gpt"
194 # /dev/sdb1: PARTLABEL="ceph block.db" PARTUUID="0734f6b6-cc94-49e9-93de-ba7e1d5b79e3"
195 # /dev/sdc: PTTYPE="gpt"
196 # /dev/sdc1: PARTLABEL="ceph block.wal" PARTUUID="824b84ba-6777-4272-bbbd-bfe2a25cecf3"
197 #bluestore_wal_devices: "{{ dedicated_devices }}"
198
199 # III. Use ceph-volume to create OSDs from logical volumes.
200 # Use 'osd_scenario: lvm' to enable this scenario. Currently we only support dedicated journals
201 # when using lvm, not collocated journals.
202 # lvm_volumes is a list of dictionaries. Each dictionary must contain a data, journal and vg_name
203 # key. Any logical volume or logical group used must be a name and not a path.
204 # data must be a logical volume
205 # journal can be either a lv, device or partition. You can not use the same journal for many data lvs.
206 # data_vg must be the volume group name of the data lv
207 # journal_vg is optional and must be the volume group name of the journal lv, if applicable
208 # For example:
209 # lvm_volumes:
210 #   - data: data-lv1
211 #     data_vg: vg1
212 #     journal: journal-lv1
213 #     journal_vg: vg2
214 #   - data: data-lv2
215 #     journal: /dev/sda
216 #     data_vg: vg1
217 #   - data: data-lv3
218 #     journal: /dev/sdb1
219 #     data_vg: vg2
220 #lvm_volumes: []
221
222
223 ##########
224 # DOCKER #
225 ##########
226
227 #ceph_config_keys: [] # DON'T TOUCH ME
228
229 # Resource limitation
230 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
231 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
232 # These options can be passed using the 'ceph_osd_docker_extra_env' variable.
233 #ceph_osd_docker_memory_limit: 1g
234 #ceph_osd_docker_cpu_limit: 1
235
236 # PREPARE DEVICE
237 #
238 # WARNING /!\ DMCRYPT scenario ONLY works with Docker version 1.12.5 and above
239 #
240 #ceph_osd_docker_devices: "{{ devices }}"
241 #ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }}
242
243 # ACTIVATE DEVICE
244 #
245 #ceph_osd_docker_extra_env:
246 #ceph_osd_docker_run_script_path: "/usr/share" # script called by systemd to run the docker command
247
248
249 ###########
250 # SYSTEMD #
251 ###########
252
253 # ceph_osd_systemd_overrides will override the systemd settings
254 # for the ceph-osd services.
255 # For example,to set "PrivateDevices=false" you can specify:
256 #ceph_osd_systemd_overrides:
257 #  Service:
258 #    PrivateDevices: False
259