blob: 351eae293f3f5ae790851a73f2ce4116c528d782 [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 }}
{%- if common.pg_num is defined %}
osd pool default pg num = {{ common.pg_num }}
{%- endif %}
{%- if common.pgp_num is defined %}
osd pool default pgp num = {{ common.pgp_num }}
{%- endif %}
{# 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 ['rgw', '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 %}
{%- if osd.crush_initial_weight is defined %}
osd crush initial weight = {{ osd.crush_initial_weight }}
{%- 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/{{ common.get('cluster_name', 'ceph') }}.client.rgw.{{ grains.host }}.keyring
rgw socket path = /tmp/radosgw-{{ grains.host }}.sock
log file = /var/log/ceph/{{ common.get('cluster_name', 'ceph') }}-rgw-{{ grains.host }}.log
rgw data = /var/lib/ceph/radosgw/{{ common.get('cluster_name', 'ceph') }}-rgw.{{ grains.host }}
rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }} num_threads={{ radosgw.threads }}
rgw dns name = {{ radosgw.get('hostname', grains.host) }}
rgw swift versioning enabled = {{ radosgw.get('swift', {}).get('versioning', {}).get('enabled', 'false') }}
rgw swift enforce content length = {{ radosgw.get('swift', {}).get('enforce_content_length', 'false') }}
{%- 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 = {{ ident.get('accepted_roles', '_member_, Member, admin, swiftoperator') }}
rgw keystone revocation interval = {{ ident.get('revocation_interval', '1000000') }}
rgw keystone implicit tenants = {{ ident.get('implicit_tenants', 'false') }}
rgw s3 auth use keystone = {{ ident.get('s3_auth_use_keystone', 'true') }}
rgw keystone admin user = {{ ident.get('user', 'admin') }}
rgw keystone admin password = {{ ident.password }}
rgw keystone verify ssl = {{ ident.get('keystone_verify_ssl', 'False') }}
rgw keystone token cache size = {{ ident.get('cache', '10000') }}
{%- 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 %}
{# rgw key: value #}
{%- for key, value in common.get('config', {}).get('rgw', {}).iteritems() %}
{{ key }} = {{ value }}
{%- endfor %}
{%- endif %}