Add support for Rados Gateway configuration with Keystone

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/267/head
Sébastien Han 2015-06-03 19:01:23 +02:00 committed by Sébastien Han
parent a86439f2d2
commit bdd4cc4363
5 changed files with 42 additions and 0 deletions

View File

@ -112,6 +112,14 @@ dummy:
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
#radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml
#radosgw_civetweb_port: 80
#radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
#radosgw_keystone_url: # url:admin_port ie: http://192.168.0.1:35357
#radosgw_keystone_admin_token: password
#radosgw_keystone_accepted_roles: Member, _member_, admin
#radosgw_keystone_token_cache_size: 10000
#radosgw_keystone_revocation_internal: 900
#radosgw_s3_auth_use_keystone: "true"
#radosgw_nss_db_path: /var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}/nss
## REST API options
#

View File

@ -127,6 +127,14 @@ radosgw: false # referenced in monitor role too.
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml
radosgw_civetweb_port: 80
radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
#radosgw_keystone_url: # url:admin_port ie: http://192.168.0.1:35357
radosgw_keystone_admin_token: password
radosgw_keystone_accepted_roles: Member, _member_, admin
radosgw_keystone_token_cache_size: 10000
radosgw_keystone_revocation_internal: 900
radosgw_s3_auth_use_keystone: "true"
radosgw_nss_db_path: /var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}/nss
## REST API options
#

View File

@ -149,6 +149,15 @@
{% if radosgw_frontend == 'civetweb' %}
rgw frontends = civetweb port={{ radosgw_civetweb_port }}
{% endif %}
{% if radosgw_keystone %}
rgw keystone url = {{ radosgw_keystone_url }}
rgw keystone admin token = {{ radosgw_keystone_admin_token }}
rgw keystone accepted roles = {{ radosgw_keystone_accepted_roles }}
rgw keystone token cache size = {{ radosgw_keystone_token_cache_size }}
rgw keystone revocation interval = {{ radosgw_keystone_revocation_internal }}
rgw s3 auth use keystone = {{ radosgw_s3_auth_use_keystone }}
nss db path = {{ radosgw_nss_db_path }}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}

View File

@ -21,6 +21,9 @@
state=present
when: ansible_os_family == 'RedHat' and not ceph_containerized_deployment
- include: openstack-keystone.yml
when: radosgw_keystone
- include: start_radosgw.yml
when: not ceph_containerized_deployment

View File

@ -0,0 +1,14 @@
---
- name: create nss directory for Keystone certificates
file: >
path={{ radosgw_nss_db_path }}
state=directory
owner=root
group=root
mode=0644
- name: create nss entries for Keystone certificates
shell: "{{ item }}"
with_items:
- "openssl x509 -in /etc/keystone/ssl/certs/ca.pem -pubkey |certutil -d {{ radosgw_nss_db_path }} -A -n ca -t 'TCu,Cu,Tuw'"
- "openssl x509 -in /etc/keystone/ssl/certs/signing_cert.pem -pubkey | certutil -A -d {{ radosgw_nss_db_path }} -n signing_cert -t 'P,P,P'"