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