Skip to content

Commit 31f18de

Browse files
markgoddardjovial
authored andcommitted
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)
1 parent 9ec49a3 commit 31f18de

21 files changed

Lines changed: 236 additions & 1 deletion

File tree

ansible/group_vars/all.yml

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

259259
caso_tcp_output_port: "24224"
260260

261+
ceph_rgw_internal_fqdn: "{{ kolla_internal_fqdn }}"
262+
ceph_rgw_external_fqdn: "{{ kolla_external_fqdn }}"
263+
ceph_rgw_port: "6780"
264+
261265
cinder_internal_fqdn: "{{ kolla_internal_fqdn }}"
262266
cinder_external_fqdn: "{{ kolla_external_fqdn }}"
263267
cinder_api_port: "8776"
@@ -576,6 +580,8 @@ enable_ceilometer: "no"
576580
enable_ceilometer_ipmi: "no"
577581
enable_cells: "no"
578582
enable_central_logging: "no"
583+
enable_ceph_rgw: "no"
584+
enable_ceph_rgw_loadbalancer: "{{ enable_ceph_rgw | bool }}"
579585
enable_chrony: "yes"
580586
enable_cinder: "no"
581587
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)