blob: ec373ca4910a658171bfdf9af423f22916206e37 [file] [log] [blame]
{%- from "ceph/map.jinja" import common, mon, osd, radosgw with context %}
[global]
mon initial members = {%- for member in common.members %}{{ member.name }}{% if not loop.last %},{% endif %}{%- endfor %}
mon host = {%- for member in common.members %}{{ member.host }}:6789{% if not loop.last %},{% endif %}{%- endfor %}
{%- if common.cluster_network is defined %}
cluster network = {{ common.cluster_network }}
{%- endif %}
{%- if common.public_network is defined %}
public network = {{ common.public_network }}
{%- endif %}
fsid = {{ common.fsid }}
##Global key: value
{%- for key_name, key in common.get('config', {}).get('global', {}).iteritems() %}
{{ key_name }} = {{ key }}
{%- endfor %}
##Other sections key: value
{%- for key_name, key in common.get('config', {}).iteritems() %}
{%- if key_name not in ['osd', 'mon', 'global'] %}
[{{ key_name }}]
{%- for value_name, value in key.iteritems() %}
{{ value_name }} = {{ value }}
{%- endfor %}
{%- endif %}
{%- endfor %}
{%- if osd.bluestore_block_size is defined %}
bluestore_block_size = {{ osd.bluestore_block_size }}
{%- endif %}
{%- if osd.bluestore_block_db_size is defined %}
bluestore_block_db_size = {{ osd.bluestore_block_db_size }}
{%- endif %}
{%- if osd.bluestore_block_wal_size is defined %}
bluestore_block_wal_size = {{ osd.bluestore_block_wal_size }}
{%- endif %}
{%- if pillar.ceph.mon is defined %}
[mon]
{%- for key, value in common.get('config', {}).get('mon', {}).iteritems() %}
{{ key }} = {{ value }}
{%- endfor %}
mon host = {%- for member in common.members %}{{ member.name }}{% if not loop.last %},{% endif %}{%- endfor %}
mon addr = {%- for member in common.members %}{{ member.host }}:6789{% if not loop.last %},{% endif %}{%- endfor %}
{%- for member in common.members %}
[mon.{{ member.name }}]
mon host = {{ member.name }}
mon addr = {{ member.host }}:6789
{%- if not loop.last %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- if pillar.ceph.osd is defined %}
[osd]
{%- if osd.crush is defined %}
crush location = {% for crush in osd.crush %}{{ crush.type }}={{ crush.name }}{% if not loop.last %} {% endif %}{% endfor %}
{%- endif %}
osd crush update on start = {{ osd.get('crush_update', 'true') }}
{%- if pillar.ceph.osd.journal_size is defined %}
osd journal size = {{ osd.journal_size }}
{%- endif %}
{%- for key, value in common.get('config', {}).get('osd', {}).iteritems() %}
{{ key }} = {{ value }}
{%- endfor %}
{%- endif %}
{%- if pillar.ceph.radosgw is defined %}
[client.rgw.{{ grains.host }}]
host = {{ grains.host }}
keyring = /etc/ceph/ceph.client.rgw.{{ grains.host }}.keyring
rgw socket path = /tmp/radosgw-{{ grains.host }}.sock
log file = /var/log/ceph/ceph-rgw-{{ grains.host }}.log
rgw data = /var/lib/ceph/radosgw/ceph-rgw.{{ grains.host }}
rgw frontends = civetweb port={{ radosgw.bind.port }} num_threads={{ radosgw.threads }}
rgw dns name = {{ radosgw.get('hostname', grains.host) }}
{%- if radosgw.identity.engine == 'keystone' %}
{%- set ident = radosgw.identity %}
rgw keystone api version = {{ ident.get('api_version', 3) }}
rgw keystone url = {{ ident.host }}:{{ ident.get('port', '5000') }}
rgw keystone accepted roles = _member_, Member, admin, swiftoperator
rgw keystone revocation interval = 1000000
rgw keystone implicit tenants = false
rgw s3 auth use keystone = true
rgw keystone admin user = {{ ident.get('user', 'admin') }}
rgw keystone admin password = {{ ident.password }}
rgw keystone verify ssl = False
{%- if ident.get('api_version', 3) == 2 %}
rgw keystone admin tenant = {{ ident.get('tenant', 'admin') }}
{%- else %}
rgw keystone admin project = {{ ident.get('project', 'admin') }}
rgw keystone admin domain = {{ ident.get('domain', 'admin') }}
{% endif %}
{%- endif %}
{%- endif %}