Merge "Parametrize Swift partition power"
[apex-tripleo-heat-templates.git] / swift-storage-source.yaml
1 heat_template_version: 2013-05-23
2 description: 'Common Swift Storage Configuration'
3 parameters:
4   SwiftStorageImage:
5     type: string
6     default: overcloud-swift-storage
7   SwiftReplicas:
8     type: number
9     default: 1
10     description: How many replicas to use in the swift rings.
11   OvercloudSwiftStorageFlavor:
12     default: baremetal
13     description: Flavor for Swift storage nodes to request when deploying.
14     type: string
15 resources:
16   SwiftStorage0:
17     type: OS::Nova::Server
18     properties:
19       image: {get_param: SwiftStorageImage}
20       flavor: {get_param: OvercloudSwiftStorageFlavor}
21       key_name: {get_param: KeyName}
22       user_data_format: SOFTWARE_CONFIG
23   SwiftKeystoneConfig:
24     type: OS::Heat::StructuredConfig
25     properties:
26       config:
27         keystone:
28           host: {get_input: keystone_host}
29   SwiftStorage0Keystone:
30     type: OS::Heat::StructuredDeployment
31     properties:
32       server: {get_resource: SwiftStorage0}
33       config: {get_resource: SwiftKeystoneConfig}
34       signal_transport: NO_SIGNAL
35       input_values:
36         keystone_host: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
37   SwiftStorage0Deploy:
38     type: OS::Heat::StructuredDeployment
39     properties:
40       server: {get_resource: SwiftStorage0}
41       config: {get_resource: SwiftConfig}
42       signal_transport: NO_SIGNAL
43       input_values:
44         swift_hash_suffix: {get_param: SwiftHashSuffix}
45         swift_password: {get_param: SwiftPassword}
46         swift_part_power: {get_param: SwiftPartPower}
47         swift_devices:
48           Fn::Join:
49           - ', '
50           - Merge::Map:
51               controller0:
52                 Fn::Join:
53                 - ''
54                 - - 'r1z1-'
55                   - {get_attr: [controller0, networks, ctlplane, 0]}
56                   - ':%PORT%/d1'
57               SwiftStorage0:
58                 Fn::Join:
59                 - ''
60                 - - 'r1z1-'
61                   - {get_attr: [SwiftStorage0, networks, ctlplane, 0]}
62                   - ':%PORT%/d1'
63         swift_proxy_memcache:
64           Fn::Join:
65             - ','
66             - Merge::Map:
67                 controller0:
68                   Fn::Join:
69                     - ', '
70                     - - Fn::Join:
71                         - ''
72                         - - {get_attr: [controller0, networks, ctlplane, 0]}
73                           - ':11211'
74         swift_replicas: { get_param: SwiftReplicas}