Merge "Add custom public IP support to the undercloud."
[apex-tripleo-heat-templates.git] / swift-storage-source.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Common Swift Storage Configuration'
3 Parameters:
4   SwiftStorageImage:
5     Type: String
6     Default: overcloud-swift-storage
7   OvercloudSwiftStorageFlavor:
8     Default: baremetal
9     Description: Flavor for Swift storage nodes to request when deploying.
10     Type: String
11   NeutronNetworkType:
12     Type: String
13     Default: 'gre'
14   NeutronEnableTunnelling:
15     Type: String
16     Default: True
17 Resources:
18   SwiftStorage0:
19     Type: OS::Nova::Server
20     Properties:
21       image: {Ref: SwiftStorageImage}
22       flavor: {Ref: OvercloudSwiftStorageFlavor}
23       key_name: {Ref: KeyName}
24       user_data_format: SOFTWARE_CONFIG
25   SwiftKeystoneConfig:
26     Type: OS::Heat::StructuredConfig
27     Properties:
28       config:
29         keystone:
30           host: {get_input: keystone_host}
31   SwiftStorage0Keystone:
32     Type: OS::Heat::StructuredDeployment
33     Properties:
34       server: {Ref: SwiftStorage0}
35       config: {Ref: SwiftKeystoneConfig}
36       signal_transport: NO_SIGNAL
37       input_values:
38         keystone_host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
39   SwiftStorage0Deploy:
40     Type: OS::Heat::StructuredDeployment
41     Properties:
42       server: {Ref: SwiftStorage0}
43       config: {Ref: SwiftConfig}
44       signal_transport: NO_SIGNAL
45       input_values:
46         neutron_local_ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [SwiftStorage0, networks]} ]} ] }
47         swift_hash_suffix: {Ref: SwiftHashSuffix}
48         swift_password: {Ref: SwiftPassword}
49         swift_devices:
50           Fn::Join:
51           - ', '
52           - - Fn::Join:
53               - ''
54               - - 'r1z1-'
55                 - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
56                 - ':%PORT%/d1'
57             - Fn::Join:
58               - ', '
59               - Merge::Map:
60                   SwiftStorage0:
61                     Fn::Join:
62                     - ''
63                     - - 'r1z1-'
64                       - Fn::Select:
65                         - 0
66                         - Fn::Select:
67                           - 'ctlplane'
68                           - Fn::GetAtt:
69                             - SwiftStorage0
70                             - networks
71                       - ':%PORT%/d1'
72         swift_proxy_memcache:
73           Fn::Join:
74           - ', '
75           - - Fn::Join:
76               - ''
77               - - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
78                 - ':11211'
79             - Fn::Join:
80               - ', '
81               - Merge::Map:
82                   SwiftStorage0:
83                     Fn::Join:
84                     - ''
85                     - - Fn::Select:
86                         - 0
87                         - Fn::Select:
88                           - 'ctlplane'
89                           - Fn::GetAtt:
90                             - SwiftStorage0
91                             - networks
92                       - ':11211'