Merge "Split out Nova software config"
[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   OvercloudSwiftStorageFlavor:
5     default: baremetal
6     description: Flavor for Swift storage nodes to request when deploying.
7     type: string
8   SwiftReplicas:
9     type: number
10     default: 1
11     description: How many replicas to use in the swift rings.
12   SwiftStorageImage:
13     type: string
14     default: overcloud-swift-storage
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_mount_check: {get_param: SwiftMountCheck}
46         swift_password: {get_param: SwiftPassword}
47         swift_part_power: {get_param: SwiftPartPower}
48         swift_devices:
49           Fn::Join:
50           - ', '
51           - Merge::Map:
52               controller0:
53                 Fn::Join:
54                 - ''
55                 - - 'r1z1-'
56                   - {get_attr: [controller0, networks, ctlplane, 0]}
57                   - ':%PORT%/d1'
58               SwiftStorage0:
59                 Fn::Join:
60                 - ''
61                 - - 'r1z1-'
62                   - {get_attr: [SwiftStorage0, networks, ctlplane, 0]}
63                   - ':%PORT%/d1'
64         swift_proxy_memcache:
65           Fn::Join:
66             - ','
67             - Merge::Map:
68                 controller0:
69                   Fn::Join:
70                     - ', '
71                     - - Fn::Join:
72                         - ''
73                         - - {get_attr: [controller0, networks, ctlplane, 0]}
74                           - ':11211'
75         swift_replicas: { get_param: SwiftReplicas}
76         swift_min_part_hours: { get_param: SwiftMinPartHours}