6496cfc0ba
In a deployment that has both Ceph or Swift deployed it can be useful to seperate the network traffic. This change adds support for dedicated storage networks for both Ceph and Swift. By default, the storage hosts are attached to the following networks: * Overcloud admin network * Internal network * Storage network * Storage management network This adds four additional networks, which can be used to seperate the storage network traffic as follows: * Ceph storage network (ceph_storage_net_name) is used to carry Ceph storage data traffic. Defaults to the storage network (storage_net_name). * Ceph storage management network (ceph_storage_mgmt_net_name) is used to carry storage management traffic. Defaults to the storage management network (storage_mgmt_net_name). * Swift storage network (swift_storage_net_name) is used to carry Swift storage data traffic. Defaults to the storage network (storage_net_name). * Swift storage replication network (swift_storage_replication_net_name) is used to carry storage management traffic. Defaults to the storage management network (storage_mgmt_net_name). This change also includes several improvements to Swift device management and ring generation. The device management and ring generation are now separate, with device management occurring during 'kayobe overcloud host configure', and ring generation during a new command, 'kayobe overcloud swift rings generate'. For the device management, we now use standard Ansible modules rather than commands for device preparation. File system labels can be configured for each device individually. For ring generation, all commands are run on a single host, by default a host in the Swift storage group. A python script runs in one of the kolla Swift containers, which consumes an autogenerated YAML config file that defines the layout of the rings. Change-Id: Iedc7535532d706f02d710de69b422abf2f6fe54c
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
---
|
|
- name: Ensure swift ring files exist
|
|
hosts: localhost
|
|
tags:
|
|
- swift
|
|
- swift-rings
|
|
tasks:
|
|
- name: Initialise a fact about swift hosts
|
|
set_fact:
|
|
swift_host_config: []
|
|
|
|
- name: Update a fact about Swift hosts
|
|
set_fact:
|
|
swift_host_config: "{{ swift_host_config + [swift_host] }}"
|
|
vars:
|
|
swift_host:
|
|
host: "{{ host }}"
|
|
region: "{{ hostvars[host]['swift_region'] }}"
|
|
zone: "{{ hostvars[host]['swift_zone'] }}"
|
|
ip: "{{ swift_storage_net_name | net_ip(inventory_hostname=host) }}"
|
|
ports: "{{ hostvars[host]['swift_service_ports'] }}"
|
|
replication_ip: "{{ swift_storage_replication_net_name | net_ip(inventory_hostname=host) }}"
|
|
replication_ports: "{{ hostvars[host]['swift_service_ports'] }}"
|
|
block_devices: "{{ hostvars[host]['swift_block_devices'] }}"
|
|
block_device_default_services: "{{ hostvars[host]['swift_block_device_default_services'] }}"
|
|
block_device_default_weight: "{{ hostvars[host]['swift_block_device_default_weight'] }}"
|
|
with_inventory_hostnames: "{{ swift_hosts }}"
|
|
loop_control:
|
|
loop_var: host
|
|
|
|
- include_role:
|
|
name: swift-rings
|
|
vars:
|
|
swift_config_path: "{{ kayobe_config_path }}/kolla/config/swift"
|
|
when: kolla_enable_swift | bool
|