From 5c88c14b557f3dcc01391fd4c53fb588ccb837db Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Mon, 1 Jun 2026 12:50:23 +0100 Subject: [PATCH] feat: add support for `RGW` in `ci-multinode` Signed-off-by: Jack Hodgkiss --- .../environments/ci-multinode/cephadm.yml | 49 ++++++++++++++++++- .../group_vars/storage/network-interfaces | 2 + .../environments/ci-multinode/kolla.yml | 1 + .../ci-multinode/kolla/globals.yml | 15 ++++++ .../environments/ci-multinode/storage.yml | 19 ++++++- 5 files changed, 84 insertions(+), 2 deletions(-) diff --git a/etc/kayobe/environments/ci-multinode/cephadm.yml b/etc/kayobe/environments/ci-multinode/cephadm.yml index 7095ea70ca..961b133720 100644 --- a/etc/kayobe/environments/ci-multinode/cephadm.yml +++ b/etc/kayobe/environments/ci-multinode/cephadm.yml @@ -71,7 +71,54 @@ cephadm_keys: # List of Cephadm commands to run. See stackhpc.cephadm.commands role for format. cephadm_commands_pre: [] -cephadm_commands_post: "{{ cephadm_commands_manila_cephfs_native if (kolla_enable_manila | bool and kolla_enable_manila_backend_cephfs_native | bool) else [] }}" +cephadm_commands_post: >- + {{ + (cephadm_commands_manila_cephfs_native + if (kolla_enable_manila | bool and kolla_enable_manila_backend_cephfs_native | bool) + else []) + + + (cephadm_commands_rgw + if (kolla_enable_ceph_rgw | bool) + else []) + }} cephadm_commands_manila_cephfs_native: - "fs new manila-cephfs cephfs_metadata cephfs_data" - "orch apply mds manila-cephfs" + +cephadm_commands_rgw: + - "config set client.rgw rgw_content_length_compat true" + - "config set client.rgw rgw_enable_apis 's3, swift, swift_auth, admin'" + - "config set client.rgw rgw_enforce_swift_acls true" + - "config set client.rgw rgw_keystone_accepted_admin_roles 'admin'" + - "config set client.rgw rgw_keystone_accepted_roles 'member, admin'" + - "config set client.rgw rgw_keystone_admin_domain Default" + - "config set client.rgw rgw_keystone_admin_password {{ (lookup('file', kayobe_env_config_path ~ '/kolla/passwords.yml') | from_yaml).ceph_rgw_keystone_password }}" + - "config set client.rgw rgw_keystone_admin_project service" + - "config set client.rgw rgw_keystone_admin_user 'ceph_rgw'" + - "config set client.rgw rgw_keystone_api_version '3'" + - "config set client.rgw rgw_keystone_token_cache_size '10000'" + - "config set client.rgw rgw_keystone_url {{ 'https' if kolla_enable_tls_internal | bool else 'http' }}://{{ kolla_internal_fqdn }}:5000" + - "config set client.rgw rgw_keystone_verify_ssl true" + - "config set client.rgw rgw_max_attr_name_len '1000'" + - "config set client.rgw rgw_max_attr_size '1000'" + - "config set client.rgw rgw_max_attrs_num_in_req '1000'" + - "config set client.rgw rgw_s3_auth_use_keystone true" + - "config set client.rgw rgw_swift_account_in_url true" + - "config set client.rgw rgw_swift_versioning_enabled true" + +cephadm_radosgw_services: + - id: myrgw + count_per_host: 1 + spec: + rgw_frontend_port: 8100 + +ca_bundle_path: >- + {{ + '/etc/ssl/certs/ca-certificates.crt' + if os_distribution == 'ubuntu' + else '/etc/pki/tls/certs/ca-bundle.crt' + }} + +cephadm_extra_container_args: + - "-v" + - "{{ ca_bundle_path }}:/etc/pki/tls/certs/ca-bundle.crt:ro" diff --git a/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces b/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces index 6594897c4c..105a3581c1 100644 --- a/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces +++ b/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces @@ -6,6 +6,8 @@ admin_oc_interface: "{{ ansible_facts.default_ipv4.interface }}" internal_interface: "{{ vxlan_interfaces[0].device }}.{{ internal_vlan }}" +public_interface: "{{ vxlan_interfaces[0].device }}.{{ public_vlan }}" + storage_interface: "{{ vxlan_interfaces[0].device }}.{{ storage_vlan }}" storage_mgmt_interface: "{{ vxlan_interfaces[0].device }}.{{ storage_mgmt_vlan }}" diff --git a/etc/kayobe/environments/ci-multinode/kolla.yml b/etc/kayobe/environments/ci-multinode/kolla.yml index 809c71142e..c13e2737d1 100644 --- a/etc/kayobe/environments/ci-multinode/kolla.yml +++ b/etc/kayobe/environments/ci-multinode/kolla.yml @@ -1,4 +1,5 @@ --- +kolla_enable_ceph_rgw: true kolla_enable_cinder: true kolla_enable_cinder_backup: true kolla_enable_neutron_provider_networks: true diff --git a/etc/kayobe/environments/ci-multinode/kolla/globals.yml b/etc/kayobe/environments/ci-multinode/kolla/globals.yml index bf74fb4ab7..97bed8e3df 100644 --- a/etc/kayobe/environments/ci-multinode/kolla/globals.yml +++ b/etc/kayobe/environments/ci-multinode/kolla/globals.yml @@ -70,3 +70,18 @@ external_api_firewalld_zone: "{{ public_net_name | net_zone }}" # Test cinder cluster cinder_cluster_name: "stackhpc_test_cinder_cluster" + +# RGW configuration +ceph_rgw_swift_compatibility: false +ceph_rgw_swift_account_in_url: true + +ceph_rgw_hosts: + - host: "{{ hostvars[groups['rgws'][0]].ansible_hostname }}" + ip: "{{ lookup('vars', storage_net_name ~ '_ips')[groups.rgws.0] }}" + port: 8100 + - host: "{{ hostvars[groups['rgws'][1]].ansible_hostname }}" + ip: "{{ lookup('vars', storage_net_name ~ '_ips')[groups.rgws.1] }}" + port: 8100 + - host: "{{ {{ hostvars[groups['rgws'][2]].ansible_hostname }} }}" + ip: "{{ lookup('vars', storage_net_name ~ '_ips')[groups.rgws.2] }}" + port: 8100 diff --git a/etc/kayobe/environments/ci-multinode/storage.yml b/etc/kayobe/environments/ci-multinode/storage.yml index bcf8d38006..fed932603b 100644 --- a/etc/kayobe/environments/ci-multinode/storage.yml +++ b/etc/kayobe/environments/ci-multinode/storage.yml @@ -1,6 +1,23 @@ --- +############################################################################### +# Storage node configuration. + +# User with which to access the storage nodes via SSH during bootstrap, in +# order to setup the Kayobe user account. Default is 'cloud-user' if +# os_distribution is set to centos, otherwise 'os_distribution'. storage_bootstrap_user: "{{ os_distribution if os_distribution == 'ubuntu' else 'cloud-user' }}" -# List of storage volume groups. See mrlesmithjr.manage-lvm role for + +############################################################################### +# Storage network interface configuration. + +# List of extra networks to which storage nodes are attached. +storage_extra_network_interfaces: + - public + +############################################################################### +# Storage node LVM configuration. + +# List of storage volume groups. See mrlesmithjr.manage_lvm role for # format. storage_lvm_groups: - "{{ stackhpc_lvm_group_rootvg }}"