Merge "Enable mistral to run under mod_wsgi"
[apex-tripleo-heat-templates.git] / puppet / services / swift-ringbuilder.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Swift Ringbuilder
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29   SwiftMinPartHours:
30     type: number
31     default: 1
32     description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
33   SwiftPartPower:
34     default: 10
35     description: Partition Power to use when building Swift rings
36     type: number
37   SwiftRingBuild:
38     default: true
39     description: Whether to manage Swift rings or not
40     type: boolean
41   SwiftReplicas:
42     type: number
43     default: 3
44     description: How many replicas to use in the swift rings.
45   SwiftRawDisks:
46     default: {}
47     description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
48     type: json
49   SwiftUseLocalDir:
50     default: true
51     description: 'Use a local directory for Swift storage services when building rings'
52     type: boolean
53   SwiftRingGetTempurl:
54     default: ''
55     description: A temporary Swift URL to download rings from.
56     type: string
57   SwiftRingPutTempurl:
58     default: ''
59     description: A temporary Swift URL to upload rings to.
60     type: string
61
62 conditions:
63   swift_use_local_dir:
64     and:
65     - equals:
66       - get_param: SwiftUseLocalDir
67       - true
68     - equals:
69       - get_param: SwiftRawDisks
70       - {}
71
72 outputs:
73   role_data:
74     description: Role data for Swift Ringbuilder configuration.
75     value:
76       service_name: swift_ringbuilder
77       config_settings:
78         tripleo::profile::base::swift::ringbuilder::swift_ring_get_tempurl: {get_param: SwiftRingGetTempurl}
79         tripleo::profile::base::swift::ringbuilder::swift_ring_put_tempurl: {get_param: SwiftRingPutTempurl}
80         tripleo::profile::base::swift::ringbuilder::build_ring: {get_param: SwiftRingBuild}
81         tripleo::profile::base::swift::ringbuilder::replicas: {get_param: SwiftReplicas}
82         tripleo::profile::base::swift::ringbuilder::part_power: {get_param: SwiftPartPower}
83         tripleo::profile::base::swift::ringbuilder::min_part_hours: {get_param: SwiftMinPartHours}
84         tripleo::profile::base::swift::ringbuilder::raw_disk_prefix: 'r1z1-'
85         tripleo::profile::base::swift::ringbuilder::raw_disks:
86           yaql:
87             expression: $.data.raw_disk_lists.flatten()
88             data:
89               raw_disk_lists:
90               - {if: [swift_use_local_dir, [':%PORT%/d1'], []]}
91               - repeat:
92                   template: ':%PORT%/DEVICE'
93                   for_each:
94                     DEVICE: {get_param: SwiftRawDisks}
95       step_config: |
96         include ::tripleo::profile::base::swift::ringbuilder