Skip to content

Commit 69176aa

Browse files
committed
Add support for Ceph RadosGW integration
* Register Swift-compatible endpoints in Keystone * Load balance across RadosGW API servers using HAProxy The support is exercised in the cephadm CI jobs, but since RGW is not currently enabled via cephadm, it is not yet tested. https://docs.ceph.com/en/latest/radosgw/keystone/ Implements: blueprint ceph-rgw Change-Id: I891c3ed4ed93512607afe65a42dd99596fd4dbf9 (cherry picked from commit 5b75fefb7d9f50c197f3cd86e18059cb31ca9984) (cherry picked from commit 31f18de)
1 parent ec53eb0 commit 69176aa

File tree

21 files changed

+236
-1
lines changed

21 files changed

+236
-1
lines changed

ansible/group_vars/all.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ blazar_api_port: "1234"
287287

288288
caso_tcp_output_port: "24224"
289289

290+
ceph_rgw_internal_fqdn: "{{ kolla_internal_fqdn }}"
291+
ceph_rgw_external_fqdn: "{{ kolla_external_fqdn }}"
292+
ceph_rgw_port: "6780"
293+
290294
cinder_internal_fqdn: "{{ kolla_internal_fqdn }}"
291295
cinder_external_fqdn: "{{ kolla_external_fqdn }}"
292296
cinder_api_port: "8776"
@@ -608,6 +612,8 @@ enable_ceilometer: "no"
608612
enable_ceilometer_ipmi: "no"
609613
enable_cells: "no"
610614
enable_central_logging: "no"
615+
enable_ceph_rgw: "no"
616+
enable_ceph_rgw_loadbalancer: "{{ enable_ceph_rgw | bool }}"
611617
enable_chrony: "yes"
612618
enable_cinder: "no"
613619
enable_cinder_backup: "yes"
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
project_name: "ceph-rgw"
3+
4+
ceph_rgw_services:
5+
# NOTE(mgoddard): There is no container deployment, this is used for load
6+
# balancer configuration.
7+
ceph-rgw:
8+
group: "all"
9+
enabled: "{{ enable_ceph_rgw | bool }}"
10+
haproxy:
11+
radosgw:
12+
enabled: "{{ enable_ceph_rgw_loadbalancer | bool }}"
13+
mode: "http"
14+
external: false
15+
port: "{{ ceph_rgw_port }}"
16+
custom_member_list: "{{ ceph_rgw_haproxy_members }}"
17+
radosgw_external:
18+
enabled: "{{ enable_ceph_rgw_loadbalancer | bool }}"
19+
mode: "http"
20+
external: true
21+
port: "{{ ceph_rgw_port }}"
22+
custom_member_list: "{{ ceph_rgw_haproxy_members }}"
23+
24+
####################
25+
# Load balancer
26+
####################
27+
28+
# List of Ceph RadosGW hostname:port to use as HAProxy backends.
29+
ceph_rgw_hosts: []
30+
ceph_rgw_haproxy_members: "{{ ceph_rgw_hosts | map('regex_replace', '(.*)', 'server \\1 \\1 ' + ceph_rgw_haproxy_healthcheck) | list }}"
31+
ceph_rgw_haproxy_healthcheck: "check inter 2000 rise 2 fall 5"
32+
33+
34+
####################
35+
# OpenStack
36+
####################
37+
38+
# Whether to register Ceph RadosGW swift-compatible endpoints in Keystone.
39+
enable_ceph_rgw_keystone: "{{ enable_ceph_rgw | bool }}"
40+
41+
# Enable/disable ceph-rgw compatibility with OpenStack Swift.
42+
ceph_rgw_compatibility: false
43+
44+
# Enable/disable including the account (project) in the endpoint URL. This
45+
# allows for cross-project and public object access.
46+
ceph_rgw_account_in_url: false
47+
48+
ceph_rgw_endpoint_path: "{{ '/' if ceph_rgw_compatibility | bool else '/swift/' }}v1{% if ceph_rgw_account_in_url | bool %}/AUTH_%(project_id)s{% endif %}"
49+
50+
ceph_rgw_admin_endpoint: "{{ admin_protocol }}://{{ ceph_rgw_internal_fqdn | put_address_in_context('url') }}:{{ ceph_rgw_port }}{{ ceph_rgw_endpoint_path }}"
51+
ceph_rgw_internal_endpoint: "{{ internal_protocol }}://{{ ceph_rgw_internal_fqdn | put_address_in_context('url') }}:{{ ceph_rgw_port }}{{ ceph_rgw_endpoint_path }}"
52+
ceph_rgw_public_endpoint: "{{ public_protocol }}://{{ ceph_rgw_external_fqdn | put_address_in_context('url') }}:{{ ceph_rgw_port }}{{ ceph_rgw_endpoint_path }}"
53+
54+
ceph_rgw_keystone_user: "ceph_rgw"
55+
56+
openstack_ceph_rgw_auth: "{{ openstack_auth }}"
57+
58+
59+
####################
60+
# Keystone
61+
####################
62+
ceph_rgw_ks_services:
63+
- name: "swift"
64+
type: "object-store"
65+
description: "Openstack Object Storage"
66+
endpoints:
67+
- {'interface': 'admin', 'url': '{{ ceph_rgw_admin_endpoint }}'}
68+
- {'interface': 'internal', 'url': '{{ ceph_rgw_internal_endpoint }}'}
69+
- {'interface': 'public', 'url': '{{ ceph_rgw_public_endpoint }}'}
70+
71+
ceph_rgw_ks_users:
72+
- project: "service"
73+
user: "{{ ceph_rgw_keystone_user }}"
74+
password: "{{ ceph_rgw_keystone_password }}"
75+
role: "admin"
76+
77+
ceph_rgw_ks_roles:
78+
- "ResellerAdmin"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
- import_tasks: register.yml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: "Configure haproxy for {{ project_name }}"
3+
import_role:
4+
role: haproxy-config
5+
vars:
6+
project_services: "{{ ceph_rgw_services }}"
7+
tags: always
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
- include_tasks: "{{ kolla_action }}.yml"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: Fail if load balancer members not set
3+
fail:
4+
msg: >-
5+
Ceph RadosGW load balancer configuration is enabled
6+
(enable_ceph_rgw_loadbalancer) but no HAProxy members are configured.
7+
Have you set ceph_rgw_hosts?
8+
when:
9+
- enable_ceph_rgw_loadbalancer | bool
10+
- ceph_rgw_haproxy_members | length == 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---

0 commit comments

Comments
 (0)