Merge "mysql: Only set certificate specs if TLS everywhere is enabled" into stable...
[apex-tripleo-heat-templates.git] / docker / services / swift-ringbuilder.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Swift Ringbuilder
5
6 parameters:
7   DockerSwiftConfigImage:
8     description: The container image to use for the swift config_volume
9     type: string
10   DockerSwiftRingbuilderConfigImage:
11     description: Fake parameter to bypass config_volume yaml validation
12     type: string
13     default: ''
14   ServiceData:
15     default: {}
16     description: Dictionary packing service data
17     type: json
18   ServiceNetMap:
19     default: {}
20     description: Mapping of service_name -> network name. Typically set
21                  via parameter_defaults in the resource registry.  This
22                  mapping overrides those in ServiceNetMapDefaults.
23     type: json
24   DefaultPasswords:
25     default: {}
26     type: json
27   RoleName:
28     default: ''
29     description: Role name on which the service is applied
30     type: string
31   RoleParameters:
32     default: {}
33     description: Parameters specific to the role
34     type: json
35   EndpointMap:
36     default: {}
37     description: Mapping of service endpoint -> protocol. Typically set
38                  via parameter_defaults in the resource registry.
39     type: json
40   SwiftMinPartHours:
41     type: number
42     default: 1
43     description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
44   SwiftPartPower:
45     default: 10
46     description: Partition Power to use when building Swift rings
47     type: number
48   SwiftRingBuild:
49     default: true
50     description: Whether to manage Swift rings or not
51     type: boolean
52   SwiftReplicas:
53     type: number
54     default: 3
55     description: How many replicas to use in the swift rings.
56   SwiftRawDisks:
57     default: {}
58     description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
59     type: json
60   SwiftUseLocalDir:
61     default: true
62     description: 'Use a local directory for Swift storage services when building rings'
63     type: boolean
64   SwiftRingGetTempurl:
65     default: ''
66     description: A temporary Swift URL to download rings from.
67     type: string
68   SwiftRingPutTempurl:
69     default: ''
70     description: A temporary Swift URL to upload rings to.
71     type: string
72
73 resources:
74
75   SwiftRingbuilderBase:
76     type: ../../puppet/services/swift-ringbuilder.yaml
77     properties:
78       EndpointMap: {get_param: EndpointMap}
79       ServiceData: {get_param: ServiceData}
80       ServiceNetMap: {get_param: ServiceNetMap}
81       DefaultPasswords: {get_param: DefaultPasswords}
82       RoleName: {get_param: RoleName}
83       RoleParameters: {get_param: RoleParameters}
84
85 outputs:
86   role_data:
87     description: Role data for Swift Ringbuilder configuration in containers.
88     value:
89       service_name: {get_attr: [SwiftRingbuilderBase, role_data, service_name]}
90       config_settings:
91         map_merge:
92           - {get_attr: [SwiftRingbuilderBase, role_data, config_settings]}
93           - tripleo::profile::base::swift::ringbuilder:skip_consistency_check: true
94       logging_source: {get_attr: [SwiftRingbuilderBase, role_data, logging_source]}
95       logging_groups: {get_attr: [SwiftRingbuilderBase, role_data, logging_groups]}
96       step_config: &step_config
97         get_attr: [SwiftRingbuilderBase, role_data, step_config]
98       service_config_settings: {get_attr: [SwiftRingbuilderBase, role_data, service_config_settings]}
99       # BEGIN DOCKER SETTINGS
100       puppet_config:
101         config_volume: 'swift_ringbuilder'
102         puppet_tags: exec,fetch_swift_ring_tarball,extract_swift_ring_tarball,ring_object_device,swift::ringbuilder::create,tripleo::profile::base::swift::add_devices,swift::ringbuilder::rebalance,create_swift_ring_tarball,upload_swift_ring_tarball
103         step_config: *step_config
104         config_image: &swift_ringbuilder_image {get_param: DockerSwiftConfigImage}
105       kolla_config: {}
106       docker_config:
107         step_3:
108           swift_copy_rings:
109             image: *swift_ringbuilder_image
110             user: root
111             detach: false
112             command:
113               # Use bash to run the cp command so that wildcards can be used
114               - '/bin/bash'
115               - '-c'
116               - 'cp -v -a -t /etc/swift /swift_ringbuilder/etc/swift/*.gz /swift_ringbuilder/etc/swift/*.builder /swift_ringbuilder/etc/swift/backups'
117             volumes:
118               - /var/lib/config-data/puppet-generated/swift/etc/swift:/etc/swift:rw
119               - /var/lib/config-data/swift_ringbuilder:/swift_ringbuilder:ro