radosgw - ssl support for civetweb frontend
Change-Id: Ie01fca4dc86b4b34ad2a9ec0a1730f2816787935
Related-Prod: PROD-26892
diff --git a/ceph/files/jewel/ceph.conf.Debian b/ceph/files/jewel/ceph.conf.Debian
index 6437535..43cb2f7 100644
--- a/ceph/files/jewel/ceph.conf.Debian
+++ b/ceph/files/jewel/ceph.conf.Debian
@@ -95,7 +95,11 @@
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 }}
+{%- if radosgw.ssl is defined and radosgw.ssl.get("enabled", False) %}
+rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }}s num_threads={{ radosgw.threads }} ssl_certificate={{ radosgw.ssl.cert }}
+{%- else %}
rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }} num_threads={{ radosgw.threads }}
+{%- endif %}
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') }}
diff --git a/ceph/files/kraken/ceph.conf.Debian b/ceph/files/kraken/ceph.conf.Debian
index 6437535..43cb2f7 100644
--- a/ceph/files/kraken/ceph.conf.Debian
+++ b/ceph/files/kraken/ceph.conf.Debian
@@ -95,7 +95,11 @@
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 }}
+{%- if radosgw.ssl is defined and radosgw.ssl.get("enabled", False) %}
+rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }}s num_threads={{ radosgw.threads }} ssl_certificate={{ radosgw.ssl.cert }}
+{%- else %}
rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }} num_threads={{ radosgw.threads }}
+{%- endif %}
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') }}
diff --git a/ceph/files/luminous/ceph.conf.Debian b/ceph/files/luminous/ceph.conf.Debian
index 6437535..43cb2f7 100644
--- a/ceph/files/luminous/ceph.conf.Debian
+++ b/ceph/files/luminous/ceph.conf.Debian
@@ -95,7 +95,11 @@
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 }}
+{%- if radosgw.ssl is defined and radosgw.ssl.get("enabled", False) %}
+rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }}s num_threads={{ radosgw.threads }} ssl_certificate={{ radosgw.ssl.cert }}
+{%- else %}
rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }} num_threads={{ radosgw.threads }}
+{%- endif %}
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') }}