From 233696d1b1d4c33f8a4e2963b62cf7e3e44f0372 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 2 Jun 2017 10:10:03 +0200 Subject: [PATCH] Common: Add profiles Remove `rgw enable static website` and `rgw enable usage log` from ceph.conf and make it usable with ceph_config_overrides as profiles. Signed-off-by: Guillaume Abrioux --- profiles/rgw-keystone-v2 | 2 +- profiles/rgw-keystone-v3 | 2 +- profiles/rgw-radosgw-static-website | 11 +++++++++++ profiles/rgw-usage-log | 15 +++++++++++++++ roles/ceph-common/templates/ceph.conf.j2 | 11 ----------- 5 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 profiles/rgw-radosgw-static-website create mode 100644 profiles/rgw-usage-log diff --git a/profiles/rgw-keystone-v2 b/profiles/rgw-keystone-v2 index 5415dc000..6ba9fcf43 100644 --- a/profiles/rgw-keystone-v2 +++ b/profiles/rgw-keystone-v2 @@ -2,7 +2,7 @@ # THIS FILE IS AN EXAMPLE THAT CONTAINS A SET OF VARIABLE FOR A PARTICULAR PURPOSE # GOAL: CONFIGURE RADOS GATEWAY WITH KEYSTONE V2 # -# The following variables should be added in your group_vars/rgws file +# The following variables should be added in your group_vars/rgws.yml file # The double quotes are important, do NOT remove them. diff --git a/profiles/rgw-keystone-v3 b/profiles/rgw-keystone-v3 index 4635d9130..1044e6d44 100644 --- a/profiles/rgw-keystone-v3 +++ b/profiles/rgw-keystone-v3 @@ -2,7 +2,7 @@ # THIS FILE IS AN EXAMPLE THAT CONTAINS A SET OF VARIABLE FOR A PARTICULAR PURPOSE # GOAL: CONFIGURE RADOS GATEWAY WITH KEYSTONE V3 # -# The following variables should be added in your group_vars/rgws file +# The following variables should be added in your group_vars/rgws.yml file # The double quotes are important, do NOT remove them. diff --git a/profiles/rgw-radosgw-static-website b/profiles/rgw-radosgw-static-website new file mode 100644 index 000000000..cf2dd230d --- /dev/null +++ b/profiles/rgw-radosgw-static-website @@ -0,0 +1,11 @@ +--- +# THIS FILE IS AN EXAMPLE THAT CONTAINS A SET OF VARIABLE FOR A PARTICULAR PURPOSE +# GOAL: CONFIGURE RADOS GATEWAY WITH STATIC WEBSITE +# +# The following variables should be added in your group_vars/rgws.yml file +# The double quotes are important, do NOT remove them. + +ceph_conf_overrides: + "client.rgw.{{ hostvars[inventory_hostname]['ansible_hostname'] }}": + rgw enable static website = true + rgw dns s3website name = objects-website-region.domain.com diff --git a/profiles/rgw-usage-log b/profiles/rgw-usage-log new file mode 100644 index 000000000..40645281c --- /dev/null +++ b/profiles/rgw-usage-log @@ -0,0 +1,15 @@ +--- +# THIS FILE IS AN EXAMPLE THAT CONTAINS A SET OF VARIABLE FOR A PARTICULAR PURPOSE +# GOAL: CONFIGURE RADOS GATEWAY WITH USAGE LOG +# +# The following variables should be added in your group_vars/rgws.yml file +# The double quotes are important, do NOT remove them. + +ceph_conf_overrides: + "client.rgw.{{ hostvars[inventory_hostname]['ansible_hostname'] }}": + rgw enable usage log = true + rgw usage log tick interval = 30 + rgw usage log flush threshold = 1024 + rgw usage max shards = 32 + rgw usage max user shards = 1 + diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index 1179c428a..93440fc14 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -134,17 +134,6 @@ log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] rgw data = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }} rgw frontends = civetweb port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb_port }} num_threads={{ radosgw_civetweb_num_threads }} {% endif %} -{% if radosgw_usage_log | bool %} -rgw enable usage log = true -rgw usage log tick interval = {{ radosgw_usage_log_tick_interval }} -rgw usage log flush threshold = {{ radosgw_usage_log_flush_threshold }} -rgw usage max shards = {{ radosgw_usage_max_shards }} -rgw usage max user shards = {{ radosgw_usage_max_user_shards }} -{% endif %} -{% if radosgw_static_website | bool %} -rgw enable static website = {{ radosgw_static_website }} -rgw dns s3website name = {{ radosgw_dns_s3website_name }} -{% endif %} {% endfor %} {% endif %}